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 736006 - [abrt] Crash under backend_finalize() during online state change
[abrt] Crash under backend_finalize() during online state change
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Calendar
3.12.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2014-09-04 05:33 UTC by Milan Crha
Modified: 2015-01-12 13:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2014-09-04 05:33:02 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1136778

Version-Release number of selected component:
evolution-data-server-3.12.5-3.fc21

Additional info:
reporter:       libreport-2.2.3
backtrace_rating: 4
cmdline:        /usr/libexec/evolution-calendar-factory
crash_function: g_mutex_clear
executable:     /usr/libexec/evolution-calendar-factory
kernel:         3.16.1-300.fc21.x86_64

Core was generated by `/usr/libexec/evolution-calendar-factory'.
Program terminated with signal SIGABRT, Aborted.

Thread 1 (Thread 0x7fd4ab822840 (LWP 30395))

  • #0 __GI_raise
    at ../sysdeps/unix/sysv/linux/raise.c line 55
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_mutex_clear
    at gthread-posix.c line 1295
  • #3 cal_backend_finalize
    at e-cal-backend.c line 639
  • #4 g_object_unref
    at gobject.c line 3170
  • #5 data_cal_view_dispose
    at e-data-cal-view.c line 435
  • #6 g_object_unref
    at gobject.c line 3133
  • #7 e_cal_backend_remove_view
    at e-cal-backend.c line 1440
  • #8 impl_DataCalView_dispose
    at e-data-cal-view.c line 267
  • #9 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #10 ffi_call
    at ../src/x86/ffi64.c line 525
  • #11 g_cclosure_marshal_generic
    at gclosure.c line 1448
  • #12 g_closure_invoke
    at gclosure.c line 768
  • #13 signal_emit_unlocked_R
    at gsignal.c line 3553
  • #14 g_signal_emit_valist
    at gsignal.c line 3319
  • #15 g_signal_emit
    at gsignal.c line 3365
  • #16 e_gdbus_stub_handle_method_call
    at e-gdbus-templates.c line 678
  • #17 call_in_idle_cb
    at gdbusconnection.c line 4884
  • #18 g_main_dispatch
    at gmain.c line 3064
  • #19 g_main_context_dispatch
    at gmain.c line 3663
  • #20 g_main_context_iterate
    at gmain.c line 3734
  • #21 g_main_loop_run
    at gmain.c line 3928
  • #22 dbus_server_run_server
    at e-dbus-server.c line 230
  • #23 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #24 ffi_call
    at ../src/x86/ffi64.c line 525
  • #25 g_cclosure_marshal_generic_va
    at gclosure.c line 1541
  • #26 _g_closure_invoke_va
    at gclosure.c line 831
  • #27 g_signal_emit_valist
    at gsignal.c line 3218
  • #28 g_signal_emit
    at gsignal.c line 3365
  • #29 e_dbus_server_run
    at e-dbus-server.c line 419
  • #30 main
    at evolution-calendar-factory.c line 135

Comment 1 Michael Catanzaro 2014-10-10 17:36:22 UTC
I hit this immediately after using the Restore from Backup function with "launch Evolution after restore completes" checked. e-d-s crashed when Evolution was launched. The restoration seems to have otherwise worked properly.
Comment 2 Ankur Sinha (FranciscoD) 2014-10-16 13:40:05 UTC
3.12.7.1.1.fc21.x86_64 - still seeing this. Seems to happen a lot more often now :/
Comment 3 Ankur Sinha (FranciscoD) 2014-10-16 13:40:54 UTC
Abrt mangles the version - this is better: evolution-data-server-3.12.7.1-1.fc21.x86_64
Comment 4 Milan Crha 2014-10-17 07:07:54 UTC
Do you have any pattern, some kind of steps, which would trigger this? Or could you try to watch for one, please? I didn't get this crash myself yet.
Comment 5 Ankur Sinha (FranciscoD) 2014-10-17 08:40:10 UTC
I'll keep an eye out. It seems to "just happen" and I haven't been able to observe a pattern yet. I'll run evo from gdb and keep an eye out for this crash to find some reproducible steps.
Comment 6 Milan Crha 2014-11-14 12:44:40 UTC
I do not know how much related, but I've got a similar (forced-by-me) crash when a custom On This Computer calendar was closing. The calendar had set to refresh on the underlying file change. The commit in master is 03a0dfb (3.13.8+) and in stable f089ee9 (3.12.9+), but I would not be surprised if this is not related to your issue at all.
Comment 7 Cédric Bellegarde 2014-11-18 17:03:00 UTC
Happen here on a fresh login... 

So, it seems to be related to sync support... Maybee because i've got owncloud as a dav provider?
Comment 8 Milan Crha 2014-11-19 07:23:56 UTC
The crashing thread in the above backtrace doesn't ensure this being in a CalDAV calendar, but it's possible. I also agree that this can (or mainly?) happens on after/during sync of changes from the remote server (CalDAV speaking). There is a bug #701138 with a similar issue, which can be related. I'm still unable to reproduce this, unfortunately.
Comment 9 Michael Kuhn 2014-11-25 11:28:35 UTC
I have the same problem with evolution-data-server.x86_64 3.12.8-2.fc21 since I have set up my two ownCloud accounts (syncing only contacts and calendars).
Almost every time I log in, the crash occurs after some time.

I also think I have seen crashes in evolution-addressbook-factory with a similar backtrace.
Comment 10 Cédric Bellegarde 2014-11-25 11:30:30 UTC
For information.

This bug never happen in ArchLinux or Debian sid
Comment 11 Stephen Gallagher 2014-11-26 12:53:05 UTC
I'm experiencing the same issue on evolution-data-server-3.12.8-2.fc21.x86_64

I have several Online Accounts: a Jabber, an IRC, a Google account and a kerberos account. The crash occurred at login time.
Comment 12 Milan Crha 2014-11-26 18:34:01 UTC
I think this is addressed with my changes to bug #701138 and to libical within that bug report. I have test builds for Fedora 21 of both, you can get patched packages here:
 eds - http://koji.fedoraproject.org/koji/taskinfo?taskID=8238292
 libical - http://koji.fedoraproject.org/koji/taskinfo?taskID=8237668

Please try with them, who can. Thanks in advance. Also, with respect of libical, it should not show odd times, but just in case, if you notice anything, please let me know (my tests of the libical patch didn't uncover any issue/side-effect, but one never knows).
Comment 13 Brian J. Murrell 2015-01-05 13:04:20 UTC
I too see this on every start of evolution[-data-server processes].  I too have OwnCloud CardDav and CalDav accounts configured.

(In reply to comment #12)
>  eds - http://koji.fedoraproject.org/koji/taskinfo?taskID=8238292

This one is a version regression.  It's 3.12.8-2.6 where current F21 has 3.12.9-2.
Comment 14 Milan Crha 2015-01-05 18:09:37 UTC
(In reply to comment #13)
> This one is a version regression.  It's 3.12.8-2.6 where current F21 has
> 3.12.9-2.

It didn't a month ago :) The fix for bug #701138 is part of eds 3.12.9, the libical is awaiting review upstream. There is a libical update in updates-testing for Fedora with that change applied. If you still get the crash, then the changes from bug #701138 are unrelated to this particular crash.
Comment 15 Brian J. Murrell 2015-01-05 18:19:10 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > This one is a version regression.  It's 3.12.8-2.6 where current F21 has
> > 3.12.9-2.
> 
> It didn't a month ago :) The fix for bug #701138 is part of eds 3.12.9,

OK, cool.  I have that already then in F21.

> the
> libical is awaiting review upstream. There is a libical update in
> updates-testing for Fedora with that change applied.

Just installed 1.0-8.fc21 from updates-testing.

We'll see how it goes.
Comment 16 Milan Crha 2015-01-06 09:35:39 UTC
Hrm, according to another downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1178019

this is still an issue with 3.12.9. From the report:

Description of problem:

Repeated crash starting /usr/libexec/evolution-calendar-factory causing system to lock up with 100% CPU and IO as systemd processes the core dumps.

Version-Release number of selected component (if applicable):

The problem started occurring with evolution-data-server-3.12.8-1.fc21.x86_64 but did not occur with evolution-data-server-3.12.7.1-1.fc21.x86_64.

How reproducible:

Always happens

Steps to Reproduce:
1. Start with GNOME Desktop (or start Evolution manually in KDE)
2. 
3.

Actual results:

Evolution reports that the "The calendar backend servicing "Personal" has quit unexpectedly."

Expected results:

Evolution starts up and allows my calendars to be viewed.

Additional info:

I have a personal calendar stored in Evolution plus 3 external ical calendars from Google and Last.fm

----------------------------------------------------------------------------

I've discovered the underlying cause of the crash. It looks like the GNOME Online Accounts had a set of Google credentials. These had expired. Re-logging in cause the crash in the evolution calendar to stop happening.

During the investigation I had removed all of the evolution data files ( as per https://help.gnome.org/users/evolution/3.12/data-storage.html.en) while logged in through a text console. The crash kept happening.

  • #0 __GI_raise
    at ../sysdeps/unix/sysv/linux/raise.c line 55
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_mutex_clear
    at gthread-posix.c line 1295
  • #3 backend_finalize
    at e-backend.c line 357
  • #4 g_object_unref
    at gobject.c line 3170
  • #5 g_source_callback_unref
    at gmain.c line 1532
  • #6 g_source_destroy_internal
    at gmain.c line 1178
  • #7 g_source_destroy
    at gmain.c line 1227
  • #8 backend_update_online_state
    at e-backend.c line 197
  • #12 <emit signal ??? on instance 0x7fcb10018580 [GNetworkMonitorNetlink]>
    at gsignal.c line 3365
  • #13 emit_network_changed
    at gnetworkmonitorbase.c line 357
  • #14 g_main_context_dispatch
    at gmain.c line 3111
  • #15 g_main_context_dispatch
    at gmain.c line 3710
  • #16 g_main_context_iterate
    at gmain.c line 3781
  • #17 g_main_loop_run
    at gmain.c line 3975
  • #18 dbus_server_run_server
    at e-dbus-server.c line 230
  • #19 ffi_call_unix64
  • #20 ffi_call
  • #21 g_cclosure_marshal_generic_va
    at gclosure.c line 1541
  • #22 _g_closure_invoke_va
    at gclosure.c line 831
  • #23 g_signal_emit_valist
    at gsignal.c line 3218
  • #24 g_signal_emit
    at gsignal.c line 3365
  • #25 e_dbus_server_run
    at e-dbus-server.c line 419
  • #26 main
    at evolution-calendar-factory.c line 135

Comment 17 Milan Crha 2015-01-06 17:41:04 UTC
I still cannot reproduce this, with 3.12.9. I tried a Google calendar configured through GOA, then garbled its credentials, thus it could not connect to the server, but even on a network change the calendar factory did not crash. I see there is some reference imbalance, either caused by an incorrect call to an g_object_unref() on an EBackend (ECalBackend), or something called g_object_unref() on an already freed memory, which, by an accident, pointed to the ECalBackend structure. I thought of the later due to the findings in bug #701138, where was happening just that, but it doesn't seem to be the case for you (even the fix works for me just fine). Of course, the accident of unreffing always an ECalBackend is suspicious, but what I can know.
Comment 18 Brian J. Murrell 2015-01-10 15:08:35 UTC
This seems to happen for me on every reboot/login (probably just restart of evolution* processes even).
Comment 19 Brian J. Murrell 2015-01-10 15:38:49 UTC
Backtrace of mine is:

Thread 1 (Thread 0x7f1cda608840 (LWP 2910))

  • #0 __GI_raise
    at ../sysdeps/unix/sysv/linux/raise.c line 55
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_mutex_clear
    at gthread-posix.c line 1295
  • #3 backend_finalize
    at e-backend.c line 357
  • #4 g_object_unref
    at gobject.c line 3170
  • #5 g_source_callback_unref
    at gmain.c line 1532
  • #6 g_source_destroy_internal
    at gmain.c line 1178
  • #7 g_source_destroy
    at gmain.c line 1227
  • #8 backend_update_online_state
    at e-backend.c line 197
  • #12 <emit signal ??? on instance 0x7f1cc80075f0 [GNetworkMonitorNetlink]>
    at gsignal.c line 3365
  • #13 emit_network_changed
    at gnetworkmonitorbase.c line 357
  • #14 g_main_context_dispatch
    at gmain.c line 3111
  • #15 g_main_context_dispatch
    at gmain.c line 3710
  • #16 g_main_context_iterate
    at gmain.c line 3781
  • #17 g_main_loop_run
    at gmain.c line 3975
  • #18 dbus_server_run_server
    at e-dbus-server.c line 230
  • #19 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #20 ffi_call
    at ../src/x86/ffi64.c line 525
  • #21 g_cclosure_marshal_generic_va
    at gclosure.c line 1541
  • #22 _g_closure_invoke_va
    at gclosure.c line 831
  • #23 g_signal_emit_valist
    at gsignal.c line 3218
  • #24 g_signal_emit
    at gsignal.c line 3365
  • #25 e_dbus_server_run
    at e-dbus-server.c line 419
  • #26 main
    at evolution-addressbook-factory.c line 127

Comment 20 Milan Crha 2015-01-12 12:35:59 UTC
Okay, this is related to a On The Web book on your machine (if the backtrace shows the type properly), while the initial crash comes from the calendar factory. That's a good detail and I think I know what was going on here.
Comment 21 Milan Crha 2015-01-12 13:31:34 UTC
If I understand the last two backtraces properly, then there happened a case when the GSource, which lasts for 5 seconds holds the last reference to the backend, when another network change notification is received, which means that the current GSource is removed first, then a new one is scheduled. The GSource removal also means a deference of the backend, and as it's the last reference, it is also freed. When it comes to clear the mutex the safety checks around it aborts the application due to an attempt to free the mutex when it is locked. Reffing the backend before removing the GSource may fix the crash.

This doesn't apply to the first backtrace (comment #0), there might be some other cause for that crash, maybe the one for bug #701138. I'll close this bug rpeort for now, but if there will be any reproducers with evolution-data-server 3.12.11 or later, then I'll reopen it again.

This fix missed the 3.12.10 release, unfortunately. I'll provide evolution-data-server 3.12.10-2 for Fedora 21.

Created commit 0b34708 in eds master (3.13.10+) [1]
Created commit a47f566 in eds evolution-data-server-3-12 (3.12.11+)

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=0b34708