Bug 308927 - System Settings crashed randomly in the background.
Summary: System Settings crashed randomly in the background.
Status: RESOLVED UPSTREAM
Alias: None
Product: lightdm
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
: 311963 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-24 13:02 UTC by Ashlar
Modified: 2012-12-20 05:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashlar 2012-10-24 13:02:03 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.9.2 (Compiled from sources)
Qt Version: 4.8.3
Operating System: Linux 3.5.0-17-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:

Nothing. It was in the background and simply locked up, I was working in the Users control panel at the moment.

The crash can be reproduced some of the time.

-- Backtrace:
Application: System Settings (systemsettings), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fc383cbf7c0 (LWP 3034))]

Thread 3 (Thread 0x7fc36602d700 (LWP 3068)):
#0  0x00007fc380ccb303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fc37a4afd84 in g_main_context_poll (n_fds=1, fds=0x7fc360002be0, timeout=-1, context=0x7fc3600009d0, priority=<optimized out>) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3584
#2  g_main_context_iterate (context=context@entry=0x7fc3600009d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3285
#3  0x00007fc37a4afea4 in g_main_context_iteration (context=0x7fc3600009d0, may_block=1) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3351
#4  0x00007fc38144bc16 in QEventDispatcherGlib::processEvents (this=0x7fc3600008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007fc38141c2bf in QEventLoop::processEvents (this=this@entry=0x7fc36602ccd0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fc38141c548 in QEventLoop::exec (this=0x7fc36602ccd0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fc38131db10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00007fc3813fc9af in QInotifyFileSystemWatcherEngine::run (this=0x16c15f0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fc381320aec in QThreadPrivate::start (arg=0x16c15f0) at thread/qthread_unix.cpp:338
#10 0x00007fc375d7a764 in ?? () from /usr/lib/nvidia-current-updates/libGL.so.1
#11 0x00007fc37a97ee9a in start_thread (arg=0x7fc36602d700) at pthread_create.c:308
#12 0x00007fc380cd6cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fc35ffff700 (LWP 3085)):
#0  0x00007fc380ce48f7 in pthread_mutex_unlock (mutex=0x19c8b40) at forward.c:184
#1  0x00007fc37a4ecc61 in g_mutex_unlock (mutex=mutex@entry=0x19cad80) at /build/buildd/glib2.0-2.34.0/./glib/gthread-posix.c:227
#2  0x00007fc37a4af066 in g_main_context_acquire (context=0x19cad80) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:2790
#3  0x00007fc37a4afc64 in g_main_context_iterate (context=0x19cad80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3240
#4  0x00007fc37a4b01e2 in g_main_loop_run (loop=0x19cad10) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3484
#5  0x00007fc364eb63b6 in gdbus_shared_thread_func (user_data=0x19cad50) at /build/buildd/glib2.0-2.34.0/./gio/gdbusprivate.c:277
#6  0x00007fc37a4d3645 in g_thread_proxy (data=0x19c7720) at /build/buildd/glib2.0-2.34.0/./glib/gthread.c:797
#7  0x00007fc375d7a764 in ?? () from /usr/lib/nvidia-current-updates/libGL.so.1
#8  0x00007fc37a97ee9a in start_thread (arg=0x7fc35ffff700) at pthread_create.c:308
#9  0x00007fc380cd6cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fc383cbf7c0 (LWP 3034)):
[KCrash Handler]
#5  data (this=0x68) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
#6  qGetPtrHelper<QScopedPointer<QObjectData> > (p=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:2457
#7  d_func (this=0x60) at kernel/qabstractitemmodel.h:310
#8  QAbstractItemModel::beginInsertRows (this=0x60, parent=..., first=-23990048, last=-23990048) at kernel/qabstractitemmodel.cpp:2414
#9  0x00007fc36535ee4e in QLightDM::UsersModelPrivate::cb_userAdded(LightDMUserList*, LightDMUser*, void*) () from /usr/lib/liblightdm-qt-2.so.0
#10 0x00007fc379b535c4 in g_cclosure_marshal_VOID__OBJECTv (closure=0x1a91eb0, return_value=<optimized out>, instance=0x19b5000, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1a22fb0) at /build/buildd/glib2.0-2.34.0/./gobject/gmarshal.c:1312
#11 0x00007fc379b50407 in _g_closure_invoke_va (closure=0x1a91eb0, return_value=0x0, instance=0x19b5000, args=0x7fffbb09c0c8, n_params=1, param_types=0x1a22fb0) at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c:840
#12 0x00007fc379b68df6 in g_signal_emit_valist (instance=0x19b5000, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffbb09c0c8) at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c:3211
#13 0x00007fc379b69642 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c:3356
#14 0x00007fc365149c24 in ?? () from /usr/lib/liblightdm-gobject-1.so.0
#15 0x00007fc374ff8bb8 in ffi_call_unix64 () at ../src/x86/unix64.S:75
#16 0x00007fc374ff85c0 in ffi_call (cif=cif@entry=0x7fffbb09c400, fn=fn@entry=0x7fc365149a00, rvalue=0x7fffbb09c360, avalue=avalue@entry=0x7fffbb09c2e0) at ../src/x86/ffi64.c:492
#17 0x00007fc379b50a9b in g_cclosure_marshal_generic (closure=0x1a820e0, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x7fc365149a00) at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c:1454
#18 0x00007fc379b50140 in g_closure_invoke (closure=0x1a820e0, return_value=0x0, n_param_values=4, param_values=0x7fffbb09c640, invocation_hint=0x7fffbb09c5e0) at /build/buildd/glib2.0-2.34.0/./gobject/gclosure.c:777
#19 0x00007fc379b61550 in signal_emit_unlocked_R (node=node@entry=0x19fd9e0, detail=detail@entry=0, instance=instance@entry=0x19cd090, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffbb09c640) at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c:3551
#20 0x00007fc379b694af in g_signal_emit_valist (instance=0x19cd090, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffbb09c8c8) at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c:3300
#21 0x00007fc379b69642 in g_signal_emit (instance=instance@entry=0x19cd090, signal_id=<optimized out>, detail=detail@entry=0) at /build/buildd/glib2.0-2.34.0/./gobject/gsignal.c:3356
#22 0x00007fc364eb2a84 in on_signal_received (connection=<optimized out>, sender_name=0x7fc358080400 ":1.13", object_path=<optimized out>, interface_name=<optimized out>, signal_name=0x7fc3580806b0 "UserAdded", parameters=0x7fc358086520, user_data=0x1a92290) at /build/buildd/glib2.0-2.34.0/./gio/gdbusproxy.c:927
#23 0x00007fc364ea2705 in emit_signal_instance_in_idle_cb (data=0x7fc3580805a0) at /build/buildd/glib2.0-2.34.0/./gio/gdbusconnection.c:3715
#24 0x00007fc37a4afab5 in g_main_dispatch (context=0x12df320) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:2715
#25 g_main_context_dispatch (context=context@entry=0x12df320) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3219
#26 0x00007fc37a4afde8 in g_main_context_iterate (context=context@entry=0x12df320, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3290
#27 0x00007fc37a4afea4 in g_main_context_iteration (context=0x12df320, may_block=1) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3351
#28 0x00007fc38144bbf6 in QEventDispatcherGlib::processEvents (this=0x1218ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#29 0x00007fc38211ec1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#30 0x00007fc38141c2bf in QEventLoop::processEvents (this=this@entry=0x7fffbb09cc10, flags=...) at kernel/qeventloop.cpp:149
#31 0x00007fc38141c548 in QEventLoop::exec (this=0x7fffbb09cc10, flags=...) at kernel/qeventloop.cpp:204
#32 0x00007fc381421708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#33 0x000000000040a98e in ?? ()
#34 0x00007fc380c0476d in __libc_start_main (main=0x40a630, argc=5, ubp_av=0x7fffbb09ce78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffbb09ce68) at libc-start.c:226
#35 0x000000000040a9e5 in _start ()

Reported using DrKonqi
Comment 1 David Edmundson 2012-12-20 04:47:16 UTC
*** Bug 311963 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2012-12-20 04:52:03 UTC
To reproduce:
 - open LightDM KCM
 - close it
 - manipulate users


The bug itself is in QLightDM, but we may as well track it here.
The user's list is a singleton in the wrapped GObject library, so it can't get deleted when we close the KCM.

Our model wrapping this, however, does get deleted.  When the callback occurs to say the user's have changed, it's trying to run code on an object that no longer exists.. and therefore crashes.

g-signals don't disconnect when an object is deleted like in Qt.

We do try and disconnect manually:
UsersModelPrivate::~UsersModelPrivate()
{
    g_signal_handlers_disconnect_by_func(lightdm_user_list_get_instance(), NULL, this);
}

however, clearly this isn't working.
Comment 3 David Edmundson 2012-12-20 05:03:09 UTC
Now tracked at:
https://bugs.launchpad.net/lightdm/+bug/1092409

Fix will be in the next version of LightDM (not the KDE code).