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 699491 - Don't crash when an identity could not be looked up
Don't crash when an identity could not be looked up
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: Kerberos
3.8.x
Other Linux
: Normal critical
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
3.8.2
Depends on:
Blocks:
 
 
Reported: 2013-05-02 16:21 UTC by Bastien Nocera
Modified: 2013-09-23 01:37 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
kerberos: Don't crash when an identity could not be looked up (2.73 KB, patch)
2013-08-28 17:36 UTC, Debarshi Ray
reviewed Details | Review
kerberos: Don't crash when an identity could not be looked up (3.27 KB, patch)
2013-08-29 14:33 UTC, Debarshi Ray
committed Details | Review

Description Bastien Nocera 2013-05-02 16:21:30 UTC
With 3.8.1

==12033== Invalid read of size 8
==12033==    at 0x413A5B: on_timer_source_ready (goaalarm.c:357)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846278 is 24 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid read of size 8
==12033==    at 0x413A5F: on_timer_source_ready (goaalarm.c:357)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846280 is 32 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
18:19:11.117:[12067]:[DEBUG]: GoaKerberosIdentityManager: Refreshing identities [goakerberosidentitymanager.c:528, refresh_identities()]
==12033== Invalid read of size 8
==12033==    at 0x413605: fire_or_rearm_alarm (goaalarm.c:287)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846278 is 24 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid read of size 8
==12033==    at 0x41360C: fire_or_rearm_alarm (goaalarm.c:287)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846290 is 48 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 

(goa-daemon:12033): GLib-CRITICAL **: g_date_time_difference: assertion `end != NULL' failed
==12033== Invalid read of size 8
==12033==    at 0x413615: fire_or_rearm_alarm (goaalarm.c:289)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846278 is 24 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid read of size 8
==12033==    at 0x41361C: fire_or_rearm_alarm (goaalarm.c:289)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846298 is 56 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid write of size 8
==12033==    at 0x413693: fire_or_rearm_alarm (goaalarm.c:291)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846298 is 56 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid read of size 8
==12033==    at 0x3B35230FD0: g_type_check_instance_cast (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x4135E0: fire_alarm (goaalarm.c:270)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846260 is 0 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 

(goa-daemon:12033): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GObject'
==12033== Invalid read of size 8
==12033==    at 0x3B3523147D: g_type_check_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x3B3522796D: g_signal_emit_valist (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x3B35228A71: g_signal_emit (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x413AC1: on_timer_source_ready (goaalarm.c:374)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846260 is 0 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 

(goa-daemon:12033): GLib-GObject-WARNING **: instance with invalid (NULL) class pointer

(goa-daemon:12033): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
==12033== Invalid read of size 8
==12033==    at 0x413AC2: on_timer_source_ready (goaalarm.c:377)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846278 is 24 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid read of size 8
==12033==    at 0x3B34687490: g_rec_mutex_unlock (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x413ACE: on_timer_source_ready (goaalarm.c:377)
==12033==    by 0x3B34647F45: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x88462b0 is 80 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid read of size 8
==12033==    at 0x413250: clear_timer_source_pointer (goaalarm.c:384)
==12033==    by 0x3B34645037: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648051: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x8846278 is 24 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
==12033== 
==12033== Invalid write of size 8
==12033==    at 0x413254: clear_timer_source_pointer (goaalarm.c:384)
==12033==    by 0x3B34645037: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648051: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648297: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34648699: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x408631: main (main.c:135)
==12033==  Address 0x88462c8 is 104 bytes inside a block of size 120 free'd
==12033==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x3B3464DAEE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B34663BAA: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3522FE68: g_type_free_instance (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x40F7C6: goa_kerberos_identity_dispose (goakerberosidentity.c:123)
==12033==    by 0x3B35214337: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.1)
==12033==    by 0x411DEB: on_job_scheduled (goakerberosidentitymanager.c:558)
==12033==    by 0x3B35A59665: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B35A77F04: ??? (in /usr/lib64/libgio-2.0.so.0.3600.1)
==12033==    by 0x3B3466CC85: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B3466C2C4: ??? (in /usr/lib64/libglib-2.0.so.0.3600.1)
==12033==    by 0x3B32607C52: start_thread (in /usr/lib64/libpthread-2.17.so)
Comment 1 Debarshi Ray 2013-06-11 13:17:53 UTC
Is it possible to have a backtrace?
Comment 2 Bastien Nocera 2013-06-11 13:30:24 UTC
I don't have a backtrace of the crash, by the time it crashes it's already been doing too many invalid memory accesses to be useful anyway.
Comment 3 Bastien Nocera 2013-06-12 09:20:06 UTC
After leaving it running overnight:

Program terminated with signal 11, Segmentation fault.

Thread 1 (Thread 0x7f3b09c95700 (LWP 2090))

  • #0 goa_identity_service_identity_get_expiration_timestamp
    at ../../src/goaidentity/org.gnome.Identity.c line 1650
  • #1 ensure_credentials_sync
    at goakerberosprovider.c line 1893
  • #2 ensure_credentials_in_thread_func
    at goaprovider.c line 440
  • #3 run_in_thread
    at gsimpleasyncresult.c line 871
  • #4 io_job_thread
    at gioscheduler.c line 89
  • #5 g_task_thread_pool_thread
    at gtask.c line 1242
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #7 g_thread_proxy
    at gthread.c line 798
  • #8 start_thread
    at pthread_create.c line 308

Comment 5 Roman Kagan 2013-08-27 15:26:37 UTC
AFAICT the crash happens due to on_object_manager_ensured_for_look_up() not finding the expected identity (because it has been destroyed), and returning NULL result without error, while ensure_credentials_sync() only checks for error, and hits the NULL when retrieving identity from the operation_result.
Comment 6 Debarshi Ray 2013-08-28 17:32:33 UTC
For what it is worth, the reproducer for me was https://bugzilla.redhat.com/show_bug.cgi?id=878735#c12
Comment 7 Debarshi Ray 2013-08-28 17:36:10 UTC
Created attachment 253425 [details] [review]
kerberos: Don't crash when an identity could not be looked up
Comment 8 Ray Strode [halfline] 2013-08-28 17:49:14 UTC
Review of attachment 253425 [details] [review]:

::: src/goabackend/goakerberosprovider.c
@@ +642,3 @@
+  if (!found)
+    g_simple_async_result_set_error (operation_result, GOA_ERROR, GOA_ERROR_FAILED, "Failed to find an identity");
+

makes sense.

::: src/goaidentity/goakerberosidentity.c
@@ +536,2 @@
   request = g_slice_new0 (NotifyRequest);
+  request->self = g_object_ref (self);

less sure about this part.  there's already a weak reference in place in dispose:

  if (self->priv->expiration_time_idle_id != 0)
    g_source_remove (self->priv->expiration_time_idle_id);

Did you need this for things to work?
Comment 9 Debarshi Ray 2013-08-29 08:29:44 UTC
(In reply to comment #8)
> Review of attachment 253425 [details] [review]:
> ::: src/goaidentity/goakerberosidentity.c
> @@ +536,2 @@
>    request = g_slice_new0 (NotifyRequest);
> +  request->self = g_object_ref (self);
> 
> less sure about this part.  there's already a weak reference in place in
> dispose:
> 
>   if (self->priv->expiration_time_idle_id != 0)
>     g_source_remove (self->priv->expiration_time_idle_id);
> 
> Did you need this for things to work?

After I added the previous chunk that sets an error, I got a segmentation fault caused by trying to access a finalized object:

Program received signal SIGSEGV, Segmentation fault.
g_type_check_instance_cast (type_instance=0x7fffe0002870, iface_type=iface_type@entry=80) at gtype.c:4008
4008		  node = lookup_type_node_I (type_instance->g_class->g_type);

Thread 1 (Thread 0x7ffff7ac6a40 (LWP 13540))

  • #0 g_type_check_instance_cast
    at gtype.c line 4008
  • #1 on_notify_queued
    at goakerberosidentity.c line 519
  • #2 g_main_dispatch
    at gmain.c line 3065
  • #3 g_main_context_dispatch
    at gmain.c line 3641
  • #4 g_main_context_iterate
    at gmain.c line 3712
  • #5 g_main_loop_run
    at gmain.c line 3906
  • #6 main
    at main.c line 139

You can reproduce in the same way as this bug. Flip the "Network Services" switch on and off, and you should be able to get it to crash in a few attempts.
Comment 10 Ray Strode [halfline] 2013-08-29 14:19:22 UTC
Debarshi noticed on IRC that while we check the expiration_time_idle_id in dispose we don't check the others that also go through the queue notify path.
Comment 11 Ray Strode [halfline] 2013-08-29 14:25:35 UTC
so we talked it over and the concensus is we'll drop the check from dispose and move to a hard ref as proposed in attachment 253425 [details] [review].  This makes it more resiliant in the chance an identity gets disposed in a non main thread.
Comment 12 Debarshi Ray 2013-08-29 14:33:20 UTC
Created attachment 253513 [details] [review]
kerberos: Don't crash when an identity could not be looked up
Comment 13 Ray Strode [halfline] 2013-08-29 14:34:57 UTC
Review of attachment 253513 [details] [review]:

+
Comment 14 Debarshi Ray 2013-08-29 15:51:53 UTC
Comment on attachment 253513 [details] [review]
kerberos: Don't crash when an identity could not be looked up

Thanks for the review!
Comment 15 Roman Kagan 2013-09-03 07:25:44 UTC
Well, the patch fixes the segfault but it doesn't make the thing work.

That is, flipping the on/off switch back and forth in the "online accounts" tab of the control center works as expected.  However, goa-daemon doesn't

- create the tgt on start if it didn't exist
- re-create the tgt if was kdestroy-ed while it was running
- refresh the tgt on expiry

The relevant log messages are:

11:07:47.348:[24545]:[DEBUG]: GoaKerberosIdentityManager: Refreshing identities [goakerberosidentitymanager.c:528, refresh_identities()]
11:07:47.348:[24545]:[DEBUG]: GoaKerberosIdentityManager: Waiting for next operation [goakerberosidentitymanager.c:1047, on_job_scheduled()]
11:07:47.349:[24545]:[DEBUG]: GoaKerberosIdentityManager: Listing identities [goakerberosidentitymanager.c:604, list_identities()]
11:07:47.349:[24545]:[DEBUG]: GoaKerberosIdentityManager:         Blocking until identities list processed [goakerberosidentitymanager.c:1011, on_job_scheduled()]
11:07:47.349:[24545]:[DEBUG]: GoaKerberosIdentityManager:         Continuing [goakerberosidentitymanager.c:1015, on_job_scheduled()]
11:07:47.349:[24545]:[DEBUG]: GoaKerberosIdentityManager: Waiting for next operation [goakerberosidentitymanager.c:1047, on_job_scheduled()]
11:07:47.352:[24540]:[DEBUG]: GoaIdentityService: could not ensure credentials for account ***@***.COM: GDBus.Error:org.freedesktop.Goa.Error.Failed: Failed to find an identity [goaidentityservice.c:254, on_credentials_ensured()]
11:07:47.368:[24544]:[DEBUG]: Retreived keyring credentials for id: account_1372668879 [goautils.c:218, goa_utils_lookup_credentials_sync()]

So the fix is incomplete.
I'd like to reopen the bug but I don't have the rights to do so.
Comment 16 Ray Strode [halfline] 2013-09-05 12:19:03 UTC
Roman, it's not supposed to recreate the tgt if it's kdestroyed (unless you manually resign back in)

re the other issues, can you attach your ~/.config/goa-1.0/accounts.conf file?
Comment 17 Roman Kagan 2013-09-06 07:06:02 UTC
(In reply to comment #16)
> Roman, it's not supposed to recreate the tgt if it's kdestroyed

Unless I'm misreading the code in goaidentity/goakerberosidentitymanager.c, it establishes an inotify watch on the kerberos credentials cache (provided it's of FILE: or DIR: type), and schedules a refresh on any change, including deletion.

The logs from the goa-daemon also indicate that it notices the deletion and attempts to update the tgt, but fails, with the same diagnostics as if started anew with no tgt.

> re the other issues, can you attach your ~/.config/goa-1.0/accounts.conf file?

Sure, here you go:

[Account account_1360330615]
Provider=kerberos
Identity=myuid@MY.CORP.COM
PresentationIdentity=myuid@MY.CORP.COM
Realm=MY.CORP.COM
IsTemporary=false
TicketingEnabled=true

[Account account_1372668648]
Provider=google
... irrelevant ...

[Account account_1372668879]
Provider=exchange
... irrelevant ...


FWIW direct dbus call succeeds both to refresh the tgt and to create a new one if it was destroyed:

# gdbus call --session --dest org.gnome.OnlineAccounts \
  --object-path /org/gnome/OnlineAccounts/Accounts/account_1360330615 \
  --method org.gnome.OnlineAccounts.Ticketing.GetTicket
Comment 18 Matthias Clasen 2013-09-16 12:22:37 UTC
Ray, does the information provided by Roman help ?
Comment 19 Ray Strode [halfline] 2013-09-23 01:37:03 UTC
Hi Roman,

it's confusing but there are two different "refresh" concepts in the code.  The first (which happens whenever the credential cache is changed) is to resync gnome-online-accounts idea of identies with the credential cache.  The other is to refresh the TGT of a particular identity.

If a user runs kdestroy then they're explicitly trying to "sign out" basically, so we wouldn't "sign back in" automatically without additional user intervention.

It should definitely be refreshing on expiry.  There is a recent bug (bug 705395) that prevents that from working all of the time.

I'm going to close this out, because the initial report is resolved.  If you continue to have issues after bug 705395 is resolved, please file a new report, and we'll try to track it down!