Bug 655836

Summary: spicec dies with 'Error: unhandled exception: no window proc'
Product: [Fedora] Fedora Reporter: Matthew Booth <mbooth>
Component: spiceAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: alexl, hdegoede, jforbes, kraxel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-0.6.3-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-02 19:11:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
spicec thread backtraces at abort() none

Description Matthew Booth 2010-11-22 13:58:58 UTC
Description of problem:
spicec dies reasonably frequently in normal usage with the error message:

Error: unhandled exception: no window proc

I have not noticed any particular pattern to the crashes and have no reproducer. However, I am seeing this several times per day.

I have seen this in both spice-client-0.6.3-4.fc14.x86_64, and spice built from git c278cfa8. Both are on F14.

I appreciate this error report isn't useful in itself. I'll be happy to try out patches, even if they're just to gather more useful crash data.

Comment 1 Hans de Goede 2010-11-22 14:25:15 UTC
Hmm,

Bummer. So you did not see these crashes with spice-client-0.6.3-3 ? And when you say: "in spice-client-0.6.3-4.fc14.x86_64", you mean the scratchy build I did for bug 654265 I assume? As there has not been an official spice-client-0.6.3-4 release yet. And when you're using the git compiled version, have you included the patch I did for 654265 yourself, or is it just plain git ?

Also could you perhaps edit: client/x11/platform.cpp, goto line 298 and replace the:
            THROW("no window proc");
With:
            printf("no window proc\n");
            continue;

Re-compile and then start spicec under a debugger and set a break point at the
printf("no window proc\n"); Then use as normally until the break point hits, when the breakpoint hits, do a bt on all threads and print the contents of event.

Thanks,

Hans

Comment 2 Matthew Booth 2010-11-22 14:49:40 UTC
(In reply to comment #1)
> Hmm,
> 
> Bummer. So you did not see these crashes with spice-client-0.6.3-3 ? And when
> you say: "in spice-client-0.6.3-4.fc14.x86_64", you mean the scratchy build I
> did for bug 654265 I assume? As there has not been an official
> spice-client-0.6.3-4 release yet. And when you're using the git compiled
> version, have you included the patch I did for 654265 yourself, or is it just
> plain git ?

I think I did see these with 0.6.3-3, but didn't report them. I can't be 100% certain, though. Yes, the 0.6.3-4 I refer to is your scratch build. My local git repo has the fix for 654265 in it.

> Also could you perhaps edit: client/x11/platform.cpp, goto line 298 and replace
> the:
>             THROW("no window proc");
> With:
>             printf("no window proc\n");
>             continue;
> 
> Re-compile and then start spicec under a debugger and set a break point at the
> printf("no window proc\n"); Then use as normally until the break point hits,
> when the breakpoint hits, do a bt on all threads and print the contents of
> event.

Because of my lack of confidence in gdb's breakpoints in the face of optimisation, I've stuck an abort() immediately before the THROW(), and have enabled core dumps. Is there anything you can think of which might stop that from doing what I expect?

Comment 3 Hans de Goede 2010-11-22 15:01:52 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Hmm,
> > 
> > Bummer. So you did not see these crashes with spice-client-0.6.3-3 ? And when
> > you say: "in spice-client-0.6.3-4.fc14.x86_64", you mean the scratchy build I
> > did for bug 654265 I assume? As there has not been an official
> > spice-client-0.6.3-4 release yet. And when you're using the git compiled
> > version, have you included the patch I did for 654265 yourself, or is it just
> > plain git ?
> 
> I think I did see these with 0.6.3-3, but didn't report them. I can't be 100%
> certain, though. Yes, the 0.6.3-4 I refer to is your scratch build. My local
> git repo has the fix for 654265 in it.
> 
> > Also could you perhaps edit: client/x11/platform.cpp, goto line 298 and replace
> > the:
> >             THROW("no window proc");
> > With:
> >             printf("no window proc\n");
> >             continue;
> > 
> > Re-compile and then start spicec under a debugger and set a break point at the
> > printf("no window proc\n"); Then use as normally until the break point hits,
> > when the breakpoint hits, do a bt on all threads and print the contents of
> > event.
> 
> Because of my lack of confidence in gdb's breakpoints in the face of
> optimisation, I've stuck an abort() immediately before the THROW(), and have
> enabled core dumps. Is there anything you can think of which might stop that
> from doing what I expect?

No. that should work fine as far as I can see.

Comment 4 Matthew Booth 2010-11-22 16:18:18 UTC
Created attachment 462067 [details]
spicec thread backtraces at abort()

I've also included 'info locals' for the function containing the abort(). I'll keep the core and binary around for a bit.

Comment 5 Hans de Goede 2010-11-23 14:14:13 UTC
Matthew and I have been debugging this further by mail + irc. The problem is that when ibus XIM input gets used, an invisible window get created by XIM and sometimes we receive events on this window. Since this window is not created by us it does not have an event handler function stored as window context, causing us to raise the "no window proc" exception causing the crash reported here.

Specifically Matthew has been seeing _GTK_LOAD_ICONTHEMES type client messages been posted as events to this hidden window.

To reproduce do:
1) install ibus (yum groupinstall "Input Methods")
2) run im-chooser choose ibus
3) add Chinese - Pinyin input method
4) change an icon under /usr/share/icons/hicolor
5) touch /usr/share/icons/hicolor
6) gtk-update-icon-cache /usr/share/icons/hicolor
7) profit^W spicec terminated by "no window proc" exception

Comment 6 Hans de Goede 2010-11-25 10:57:51 UTC
I've a patch for this upstream, expect an update fixing this soon.

Comment 7 Fedora Update System 2010-11-25 11:38:00 UTC
spice-0.6.3-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/spice-0.6.3-4.fc14

Comment 8 Fedora Update System 2010-11-26 01:12:56 UTC
spice-0.6.3-4.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update spice'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/spice-0.6.3-4.fc14

Comment 9 Fedora Update System 2010-12-02 19:11:42 UTC
spice-0.6.3-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.