After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 659756 - Initialize dbus-glib threading for GConf
Initialize dbus-glib threading for GConf
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
3.2.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
: 668099 668357 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-21 19:17 UTC by Ian B. MacDonald
Modified: 2012-04-19 09:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
valgrind e-cal output (42.85 KB, text/plain)
2011-10-13 20:29 UTC, Ian B. MacDonald
  Details
gdb output from e-cal factory (10.73 KB, text/plain)
2011-10-16 13:54 UTC, Ian B. MacDonald
  Details
ABRT log for this crash on Fedora 16 (14.62 KB, text/plain)
2011-11-09 14:32 UTC, Oded Arbel
  Details
abrt backtrace (39.04 KB, text/plain)
2011-12-08 05:19 UTC, Benjamin
  Details
proposed eds patch (3.47 KB, patch)
2012-03-16 08:20 UTC, Milan Crha
committed Details | Review
eds patch (3.2.x) (3.47 KB, patch)
2012-03-19 17:25 UTC, Milan Crha
none Details | Review

Description Ian B. MacDonald 2011-09-21 19:17:56 UTC
Evolution e-factory crash when declining an invite in my calendar using 
3.1.91 on Ubuntu 11.10 B1.

I have three Google calendars configured, and made no selections other than to hit decline.

Downstream bug has some auto-traced details, and is currently linked to other private bugs downstream so there are some other similar cases.

https://bugs.launchpad.net/ubuntu/+source/evolution-data-server/+bug/853986 

SegvAnalysis:
 Segfault happened at: 0x7f12e8f4a6b0 <_dbus_watch_invalidate>:	movl $0xffffffff,0x4(%rdi)
 PC (0x7f12e8f4a6b0) ok
 source "$0xffffffff" ok
 destination "0x4(%rdi)" (0x00000004) not located in a known VMA region (needed writable region)!
 Stack memory exhausted (SP below stack segment)
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: evolution-data-server
StacktraceTop:
 _dbus_watch_invalidate (watch=0x0) at ../../dbus/dbus-watch.c:154
 free_watches (transport=0x7f12ee9c9ed0) at ../../dbus/dbus-transport-socket.c:83
 socket_disconnect (transport=0x7f12ee9c9ed0) at ../../dbus/dbus-transport-socket.c:987
 _dbus_transport_disconnect (transport=0x7f12ee9c9ed0) at ../../dbus/dbus-transport.c:507
 _dbus_transport_disconnect (transport=0x7f12ee9c9ed0) at ../../dbus/dbus-transport.c:498
Comment 1 Fabio Durán Verdugo 2011-09-21 20:19:35 UTC
Here the stacktrace, in launchpad this is dup of this bug https://bugs.launchpad.net/ubuntu/+source/evolution-data-server/+bug/847578

.

Thread 5 (Thread 0x7f1e6efbf700 (LWP 12229))

  • #0 read
    at ../sysdeps/unix/syscall-template.S line 82
  • #1 read
    at /usr/include/x86_64-linux-gnu/bits/unistd.h line 45
  • #2 unix_signal_helper_thread
    at /build/buildd/glib2.0-2.29.90/./glib/gmain.c line 4567
  • #3 g_thread_create_proxy
    at /build/buildd/glib2.0-2.29.90/./glib/gthread.c line 1962
  • #4 start_thread
    at pthread_create.c line 304
  • #5 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #6 ??

Comment 2 Ian B. MacDonald 2011-09-30 04:05:24 UTC
Still a problem in 3.2.0, no calendar interactions is basically the last major issue keeping me from moving from 2.32 as my daily driver. Anything more I can do to help with this one?
Comment 3 Milan Crha 2011-10-07 12:37:58 UTC
I noticed similar issues downstream too, and the common part is that one thread is calling gconf_client_add_dir, and the main thread is receiving DBus notifications. It seems to me like something with GConf, or evolution's usage of GConf in non-main thread, though looking into the backtrace it doesn't seem to be a concurrent reading or accessing GConf from multiple threads.
Comment 4 Milan Crha 2011-10-11 06:38:27 UTC
Similar downstream bug report from 3.2.0:
https://bugzilla.redhat.com/show_bug.cgi?id=744925

Though here it doesn't have the other thread working with DBus, it has only the one which crashes.
Comment 5 Adam Williamson 2011-10-11 22:15:45 UTC
Just hit https://bugzilla.redhat.com/show_bug.cgi?id=744925 , which was closed as a 'dupe' of this, trying to import http://canucks.nhl.com/v2/ext/schedule/1112/1112_games.ics on current F16. (also note that, for some reason, gedit - not Evo - is associated with .ics files).
Comment 6 Milan Crha 2011-10-12 10:19:37 UTC
(In reply to comment #5)
> Just hit https://bugzilla.redhat.com/show_bug.cgi?id=744925 , which was closed
> as a 'dupe' of this, trying to import
> http://canucks.nhl.com/v2/ext/schedule/1112/1112_games.ics on current F16.

Hmm, I can import it to a newly created On  This Computer/test calendar with not much issue, the e-calendar-factory process doesn't crash for me. I only do File->Import->Single file-><downloaded-file>->Appointments...

> (also note that, for some reason, gedit - not Evo - is associated with .ics
> files).

Please open a bug in Fedora, it should be treated there (I guess some packaging issue). Thanks.
Comment 7 Ian B. MacDonald 2011-10-12 15:24:51 UTC
The title of this bug was changed (not by me), but originally include the "Google Calendar" scope.  Local calendars work fine for me too.  As the reporter, I'll re-edit.
Comment 8 Ian B. MacDonald 2011-10-12 15:28:02 UTC
I also believe this to be a dupe of https://bugzilla.gnome.org/show_bug.cgi?id=659491. I was asked to separate the accept/decline observations in the initial report, however I think that request was based on a misunderstanding of the observations I had reported there.  In summary, this appears to be a duplicate.
Comment 9 Adam Williamson 2011-10-12 16:02:20 UTC
I was using a local calendar, not a Google calendar.
Comment 10 Milan Crha 2011-10-13 10:10:42 UTC
Hrm, I still can import the Canucks calendar into my google online account calendar without factory being crashed, the only output I see on evolution's console is:
> Evolution-Importer-WARNING **: receive_objects_ready_cb: Failed to receive
> objects: Cannot receive calendar objects: Unexpected HTTP status code 500
> returned (Server error code: 57471dc0)
Though I still see the new events in the calendar.
Comment 11 Ian B. MacDonald 2011-10-13 20:29:49 UTC
Created attachment 198974 [details]
valgrind e-cal output

No love here.. http://canucks.nhl.com/v2/ext/schedule/1112/1112_games.ics kills my e-cal-factory.

Apport didn't catch it.. but that's because it is no longer running by default; 11.10 was released today.  I am worried a lot of people are going to be upgrading into silent Google calendar death starting today.  

Attached is a valgrind capture of e-cal-factory crash.. hope I used it correctly.

$G_SLICE=always-malloc valgrind --num-callers=50 /usr/lib/evolution/e-calendar-factory &>111013_ecal.txt
Comment 12 Milan Crha 2011-10-14 13:58:05 UTC
Thanks for the valgrind log, good idea with that. I see some gnutls invalid reads there, but apart of it it even doesn't seem as the factory crashed, it probably exited earlier, as the Bye note is missing there, but the valgrind didn't catch the crash itself too. What does happen if you run the factory under gdb and reproduce the issue, please? Make sure there is not other e-calendar-factory running and invoke this command:
   $ gdb /usr/lib/evolution/e-calendar-factory --batch --ex r --ex "t a a bt"
     --ex q &>log.txt
then run evolution from another console.
Comment 13 Ian B. MacDonald 2011-10-16 13:54:32 UTC
Created attachment 199118 [details]
gdb output from e-cal factory

Attached is the gdb output.  During the capture I received this error message (which I see intermittently) on evo mailer startup though I don't think it impacted the crash or session.

GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._rest_2dproxy_2derror_2dquark.Code4: SSL handshake failed
Comment 14 Milan Crha 2011-10-17 10:17:21 UTC
hmm, it's the DBus and GConf related crash, one pretty old is bug #593017, with almost the same backtrace. Another similar bug with a "fix" is bug #602102, which avoids threading, but it's undoable for the factory and its backends. Furthermore, GConf seems to use dbus-glib (known to be thread-unsafe) instead of GDBus (being thread safe). I tend to move this to GConf.
Comment 15 Ian B. MacDonald 2011-10-19 18:41:52 UTC
The 3.2.1-0ubuntu1 version is working much better.  In my current session I have successfully accepted a number of invites and imported an ics file.
Comment 16 Ian B. MacDonald 2011-10-20 15:13:21 UTC
I can't seem to reproduce this now with current 3.2.1-0ubuntu1 on my Ubuntu 11.10 instance.  This clears the path for an upgrade of my daily driver.
Comment 17 Ian B. MacDonald 2011-10-24 20:40:06 UTC
After a few more days, it appears this bug disappeared from 3.2.1-0ubuntu1.
Comment 18 Oded Arbel 2011-11-09 14:32:56 UTC
Created attachment 201066 [details]
ABRT log for this crash on Fedora 16

I still get this problem on Evolution 3.2.1 from Fedora 16. Please see attached file for the ABRT log file generate (it wouldn't let me submit it to Redhat's bugzilla as the bug there is CLOSED UPSTREAM).
Comment 19 Akhil Laddha 2011-11-14 08:18:10 UTC
Oded, did you miss to attach log file because i don't see any stack trace in logs from comment#18 ?
Comment 20 Ian B. MacDonald 2011-11-29 14:44:04 UTC
Still happening in EDS 3.2.2-0ubuntu1~oneiric now part of Ubuntu 11.10 proposed repository. 

I let the downstream package retrace here:
https://bugs.launchpad.net/ubuntu/+source/evolution-data-server/+bug/897707
Comment 21 Benjamin 2011-12-08 05:19:48 UTC
Created attachment 203040 [details]
abrt backtrace

Backtrace generated from fedora retrace server.

I also have the dso_list and maps files that abrt generated, if someone wants them.
Comment 22 Ian B. MacDonald 2011-12-14 19:36:38 UTC
I think this one is fixed here, but no way to apply to my 3.2 sources

https://bugzilla.gnome.org/show_bug.cgi?id=659491
Comment 23 Adam Williamson 2012-03-05 21:37:06 UTC
I'm still hitting downstream https://bugzilla.redhat.com/show_bug.cgi?id=744925 with Evo 3.3.90 (current F17) every time I try and save an appointment to a Google calendar. Additionally, I'm seeing "Failed to load the calendar 'Google' (Invalid source)" for the first instance of my Google calendar, and I can't remove it. I created a second instance of my Google calendar named 'Google 2' and hit this whenever I try and save something to it.

Google calendar handling still seems unusably broken in 3.3.90, basically. I just tried saving the same appointment to my Personal calendar and that worked.
Comment 24 Milan Crha 2012-03-06 10:33:54 UTC
The issue with "invalid source" might be caused by bug #661265, you may want to reconfigure your Google calendar, as is discussed in bug #661265 comment #10 and below.

The Google calendar is using CalDAV at the background, if it fails due to network operations (thus some lag), then it's kinda pity. I'll try myself soon and let you know.
Comment 25 Milan Crha 2012-03-06 14:29:47 UTC
I'm able to reproduce the"invalid source" with my F17 installation and evolution 3.3.90, but as soon as I fix it, by retrieving list of Google calendars and left it as default, then the factory does not crash. I tried to create both an appointment or a meeting, set the Google calendar as the destination, and on Save the event/meeting is added, and I see it's also refetched from the Google server, because it has set the default alarm, as configured on Google server. I'm wondering what can be the difference, because we are using basically the same environment.
Comment 26 Adam Williamson 2012-03-06 16:40:21 UTC
Actually, I see the same thing - if I remove the 'Google 2' instance, and edit the 'Google' instance, retrieve the list of calendars, and leave it at the default, I can then successfully save to the 'Google' instance.
Comment 27 Milan Crha 2012-03-07 13:36:05 UTC
I tried once again, with two google calendars, one broken, and I can import to the live and importing to the broken doesn't lead to a crash. I might do something wrong, probably.
Comment 28 Adam Williamson 2012-03-07 18:59:58 UTC
I suppose me having two broken Google calendar instances might have confused it?
Comment 29 Milan Crha 2012-03-08 09:25:42 UTC
That's what I thought and tried yesterday, but it didn't trigger the bug for me. Even I have one broken google calendar, and one working, similar what I understood from comment #23. I tried importing/saving to both the broken calendar and to the working. As far as i can tell, this should be fixed by fixing definition of the google calendar, and even it would be good to have the crasher fixed, I'm still not able to reproduce it for some reason, thus I cannot help here, sadly.
Comment 30 Stephen Gallagher 2012-03-08 18:50:46 UTC
Evolution-data-server crashes on me in the same way regardless of whether I'm responding to an invitation to my Google Calendar or my WebDAV (Zimbra) calendar.
Comment 31 Adam Williamson 2012-03-08 22:04:07 UTC
Stephen: have you 'fixed' the Google calendar via the dodge above (retrieve the calendar list from the remote server)?
Comment 32 Milan Crha 2012-03-16 08:19:21 UTC
It seems we found a fix for this bug in the downstream
https://bugzilla.redhat.com/show_bug.cgi?id=755791

I had a chat with halfline and he pointed out that GConf library doesn't call
dbus_g_thread_init (), because it cannot, as it's supposed to be called only
once, and the GConf library cannot know whether its user called it or not.
evolution-data-server uses GConf from multiple threads (not the right thing to
do, but there is no way at the moment, the 3.6 may use GSettings exclusively,
which will fix it in the right way), thus it should initialize dbus-glib
threading for GConf in its main.

The temporary solution, till we move away from GConf completely, is to add back the depend on dbus-glib and initialize thread for GConf. The downstream reporters claim it's working for them.
Comment 33 Milan Crha 2012-03-16 08:20:49 UTC
Created attachment 209904 [details] [review]
proposed eds patch

for evolution-data-server;

This is the patch used downstream.
Comment 34 Matthew Barnes 2012-03-16 11:55:02 UTC
+1 from me on a temporary dbus-glib dependency.
Comment 35 Milan Crha 2012-03-16 15:18:22 UTC
We spoke with Matthew on IRC and decided to do a similar change in evolution itself too, just in case.

Created commit 990e108 in eds master (3.3.92+)
Created commit ea6e3bd in evo master (3.3.92+)
Comment 36 Ian B. MacDonald 2012-03-17 04:50:20 UTC
Is there a 3.2.3 patch that might be suitable for downstream?

https://bugs.launchpad.net/ubuntu/+source/evolution-data-server/+bug/847578
Comment 37 Milan Crha 2012-03-19 17:25:49 UTC
Created attachment 210103 [details] [review]
eds patch (3.2.x)

for evolution-data-server (3.2.x);

Try with this one.
Comment 38 Ian B. MacDonald 2012-03-19 18:43:50 UTC
suhweet; I'll give this some exercise too.
Comment 39 Ian B. MacDonald 2012-03-20 04:42:29 UTC
So far so good running alongside https://bugzilla.gnome.org/show_bug.cgi?id=669003 in my Ubuntu 12.04 Beta sources (evo 3.2.3ubuntu3/eds 3.2.3ubuntu4).
 
I have had two independent sessions (office earlier, now home) in row with no issues accepting invites, updating status, etc.  I don't recall that ever happening in the last year, as a good "session" where I could actually accept invites was a rare occasion.  At the very least, great improvement.. I'll give it some time before I check this one off the list. 

No more Calengoo/K9-Mail tablet dependency for invites. Thanks!

Really exited about getting this one into Ubuntu 12.04.
Comment 40 Milan Crha 2012-03-28 16:19:24 UTC
*** Bug 668099 has been marked as a duplicate of this bug. ***
Comment 41 Milan Crha 2012-04-19 09:42:13 UTC
*** Bug 668357 has been marked as a duplicate of this bug. ***