GNOME Bugzilla – Bug 617611
redo_queries calls gtk+ functions in non-main thread
Last modified: 2010-10-21 10:29:20 UTC
OS: opensuse 11.2 Evolution: 2.30.1 Account: Gmail IMAP Calendar backend: Google calendar Steps to reproduce: 1. Open evolution. 2. Go to calendar. 3. Click previous or next day button. Backtrace:
+ Trace 221700
Thanks for taking the time to report this bug. Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Could you please install some debugging packages [1], start the application as normal, and reproduce the crash, if possible? Once bug-buddy pops up, you can find the stacktrace in the Details, now containing way more information. Please copy that stacktrace and paste it as a comment here. Thanks in advance! [1] debugging packages for evolution, evolution-data-server, evolution-exchange, gtkhtml2, gtk2 and glib2 (as far as those packages are provided by your distribution). More details can be found here: http://live.gnome.org/GettingTraces
Here is the backtrace after installing debuginfo packages for evo, eds, gtkhtml2, gtk2 & glib2.
+ Trace 221703
Trace doesn't look useful :-( Are you sure that you have same debuginfo rpm version as package ? Btw if you run evolution under gdb, please don't forget to paste crash point (3-4 line before you do 'thread apply all bt'). Other wise it's difficult to identify in which thread application has crashed.
Trace does not show any debug symbols. Package version mismatches?
Yes somehow different version debuginfo packages were installed. I corrected it and collected below bt. 0x00007fd23271bd03 in poll () from /lib64/libc.so.6 (gdb) t a a bt
+ Trace 221721
Thanks for a bug report. I'm slightly confused, because the trace doesn't indicate any crash, every thread is "polling" there, though the first one in X. I partially recall I was fixing something similar in calendar, bug I do not recall when exactly. Could you try with either 2.30.3 or the best with just released 2.32.0, please?
This disappeared in 2.30.x but now I switched to 2.23.0 and I can reproduce again. I get following in GDB. The program 'evolution' received an X Window System error. This probably reflects a bug in the program. The error was 'BadValue (integer parameter out of range for operation)'. (Details: serial 13471 error_code 2 request_code 149 minor_code 5) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) [Thread 0x7fffd9e83710 (LWP 16030) exited] [Thread 0x7fffd8a10710 (LWP 16033) exited] [Thread 0x7fffdb686710 (LWP 16026) exited] [Thread 0x7fffdc2c7710 (LWP 16025) exited] [Thread 0x7fffdcac8710 (LWP 16023) exited] [Thread 0x7fffe29c2710 (LWP 16022) exited] [Thread 0x7fffeae03710 (LWP 16020) exited] Program exited with code 01.
Sorry for multiple mails, I forgot to change status first and now changing version also.
Thanks for the update. The backtrace from comment #8 doesn't seem to get it in, but reading the comments > (Note to programmers: normally, X errors are reported asynchronously; > that is, you will receive the error a while after causing it. > To debug your program, run it with the --sync command line > option to change this behavior. You can then get a meaningful > backtrace from your debugger if you break on the gdk_x_error() function.) I would like to ask you to follow that advice. If I got it right then it might do the thing when you run evolution from console under gdb like this: $ gdb evolution --ex "b gdk_x_error" --ex "r --sync" --ex "t a a bt" --ex q Only note that it'll ask you whether you want to add a pending breakpoint, where you should answer 'y' (the default is 'no').
Tried those steps and got following. evolution: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0. The program 'evolution' received an X Window System error. This probably reflects a bug in the program. The error was 'BadGC (invalid GC parameter)'. (Details: serial 18001 error_code 13 request_code 60 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) [Thread 0x7fffdb686710 (LWP 10208) exited] [Thread 0x7fffd8a10710 (LWP 10215) exited] [Thread 0x7fffd9e83710 (LWP 10212) exited] [Thread 0x7fffdc2c7710 (LWP 10207) exited] [Thread 0x7fffdcac8710 (LWP 10205) exited] [Thread 0x7fffe29c2710 (LWP 10204) exited] [Thread 0x7fffeae03710 (LWP 10202) exited] Program exited with code 01.
Strange, it's pretty same as comment #10. It seems it didn't stop on the gdk_x_error function.
Yeah, any other things to try?
None I would be 100% sure of the functionality, sadly. Maybe try the above command in steps, like: $ gdb evolution --ex "r --sync" when evolution is loaded, go to the terminal where you invoked the gdb and do these: Ctrl+C (gdb) b gdk_x_error now it should tell you it added a breakpoint to that function, indicating the line number and source file (gdb) c let it crash now, and if it stops in that function, then run: (gdb) t a a bt to obtain the backtrace of all currently running threads. Maybe try to catch me on irc.gimp.org #evolution, if the above will not work.
(gdb) t a a bt
+ Trace 224001
Thread 18 (Thread 0x7fffd895e710 (LWP 17357))
Thread 1 (Thread 0x7ffff7fb6940 (LWP 17330))
Thanks for the update. Thread 18 is in redo_queries, which does gtk+/X calls in a non-mainthread, which is causing this issue. it doesn't crash always, but it should be done.
Created attachment 172238 [details] [review] evo patch for evolution; Invokes items removal always from the main thread, for a price of little waiting on it to be finished and then continues with redo_queries task.
Created commit c83faa7 in evo master (2.91.1+) Created commit 011e106 in evo gnome-2-32 (2.32.1+)
*** Bug 626641 has been marked as a duplicate of this bug. ***