Bug 262041

Summary: KDE Init crash when changing network
Product: [Unmaintained] solid Reporter: Frode Jemtland <frode>
Component: bluetooth-daemonAssignee: Alex Fiestas <afiestas>
Status: RESOLVED FIXED    
Severity: crash CC: brad0112358
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Frode Jemtland 2011-01-04 08:58:39 UTC
Application: kded4 ($Id: kded.cpp 1031637 2009-10-05 16:58:19Z lunakl $)
KDE Platform Version: 4.4.5 (KDE 4.4.5)
Qt Version: 4.6.3
Operating System: Linux 2.6.32-5-686 i686
Distribution: Debian GNU/Linux testing (squeeze)

-- Information about the crash:
This time the chrash appered when I suspended from hibernation. I don't think it is related to the hibernation process. I have seen this chrash when I change from wireless to wired network, or the other way. It has also happend when I turn on the wireless-kill-switch. To me it seems to have something to do with the network change.

After the KDE Init has crashed the icons in the system tray are acting strange. Some of the icons apperes duplicate times, and some of the icons are on top of eachothers. Even the clock seems to be pushed "out of the screen". (I have the clock in my low right corner, and the system tray is left of it.) 

I'm running a stock KDE 4 on a Debian squeeze system. 

The problem has been there for a couple of months.

 -- Backtrace:
Application: KDE Daemon (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0xb54fc710 (LWP 3773))]

Thread 2 (Thread 0xb072cb70 (LWP 630)):
#0  0xb5962e16 in *__GI_clock_gettime (clock_id=-1248432140, tp=0xb072bfc8) at ../sysdeps/unix/clock_gettime.c:100
#1  0xb6c241ab in qt_gettime () at kernel/qcore_unix.cpp:111
#2  0xb6c29405 in QTimerInfoList::updateCurrentTime (this=0x83dd9ec) at kernel/qeventdispatcher_unix.cpp:340
#3  0xb6c2944a in QTimerInfoList::timerWait (this=0x83dd9ec, tm=...) at kernel/qeventdispatcher_unix.cpp:443
#4  0xb6c272b8 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb072c0dc) at kernel/qeventdispatcher_glib.cpp:136
#5  0xb6c27345 in timerSourcePrepare (source=0x0, timeout=0xb5966ff4) at kernel/qeventdispatcher_glib.cpp:169
#6  0xb58d47da in g_main_context_prepare () from /lib/libglib-2.0.so.0
#7  0xb58d4bf9 in ?? () from /lib/libglib-2.0.so.0
#8  0xb58d51c8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#9  0xb6c270af in QEventDispatcherGlib::processEvents (this=0x886de70, flags=...) at kernel/qeventdispatcher_glib.cpp:414
#10 0xb6bf9ae9 in QEventLoop::processEvents (this=0xb072c2a0, flags=) at kernel/qeventloop.cpp:149
#11 0xb6bf9f3a in QEventLoop::exec (this=0xb072c2a0, flags=...) at kernel/qeventloop.cpp:201
#12 0xb6afc629 in QThread::exec (this=0x8856aa8) at thread/qthread.cpp:487
#13 0xb08adb76 in ?? () from /usr/lib/kde4/kded_bluedevil.so
#14 0xb6afefbe in QThreadPrivate::start (arg=0x8856aa8) at thread/qthread_unix.cpp:248
#15 0xb5972955 in start_thread (arg=0xb072cb70) at pthread_create.c:300
#16 0xb5e7be7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb54fc710 (LWP 3773)):
[KCrash Handler]
#6  QThread::d_func (this=0x0, returnCode=0) at thread/qthread.h:130
#7  QThread::exit (this=0x0, returnCode=0) at thread/qthread.cpp:512
#8  0xb6afc535 in QThread::quit (this=0x0) at thread/qthread.cpp:531
#9  0xb08acb62 in BlueDevilDaemon::offlineMode() () from /usr/lib/kde4/kded_bluedevil.so
#10 0xb08acdb2 in BlueDevilDaemon::defaultAdapterChanged(BlueDevil::Adapter*) () from /usr/lib/kde4/kded_bluedevil.so
#11 0xb08ab579 in BlueDevilDaemon::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/kde4/kded_bluedevil.so
#12 0xb6c007aa in QMetaObject::metacall (object=0x844dbe8, cl=143367032, idx=138730472, argv=0x0) at kernel/qmetaobject.cpp:237
#13 0xb6c0f1bb in QMetaObject::activate (sender=0x8440800, m=0xb075b420, local_signal_index=2, argv=0xbfe29db8) at kernel/qobject.cpp:3295
#14 0xb0733ed3 in BlueDevil::Manager::defaultAdapterChanged(BlueDevil::Adapter*) () from /usr/lib/libbluedevil.so.1
#15 0xb0734488 in BlueDevil::Manager::Private::_k_adapterRemoved(QDBusObjectPath const&) () from /usr/lib/libbluedevil.so.1
#16 0xb0735200 in BlueDevil::Manager::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libbluedevil.so.1
#17 0xb6c007aa in QMetaObject::metacall (object=0x8440800, cl=143367032, idx=9, argv=0xbfe29f28) at kernel/qmetaobject.cpp:237
#18 0xb6c0f1bb in QMetaObject::activate (sender=0x842be90, m=0xb075b544, local_signal_index=1, argv=0xbfe29f28) at kernel/qobject.cpp:3295
#19 0xb0748043 in ?? () from /usr/lib/libbluedevil.so.1
#20 0xb07486da in ?? () from /usr/lib/libbluedevil.so.1
#21 0xb5c2eac1 in QDBusConnectionPrivate::deliverCall (this=0x83a5ef0, object=0x842be90, msg=..., metaTypes=..., slotIdx=6) at qdbusintegrator.cpp:904
#22 0xb5c39877 in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /usr/lib/libQtDBus.so.4
#23 0xb6c0bdfe in QObject::event (this=0x842be90, e=0x8884d78) at kernel/qobject.cpp:1248
#24 0xb61445cc in QApplicationPrivate::notify_helper (this=0x82be190, receiver=0x842be90, e=0x8884d78) at kernel/qapplication.cpp:4302
#25 0xb614b15e in QApplication::notify (this=0xbfe2a9a0, receiver=0x842be90, e=0x8884d78) at kernel/qapplication.cpp:3706
#26 0xb6ef1bfa in KApplication::notify (this=0xbfe2a9a0, receiver=0x842be90, event=0x8884d78) at ../../kdeui/kernel/kapplication.cpp:302
#27 0xb6bfb4cb in QCoreApplication::notifyInternal (this=0xbfe2a9a0, receiver=0x842be90, event=0x8884d78) at kernel/qcoreapplication.cpp:726
#28 0xb6bfef2c in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x8264858) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#29 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8264858) at kernel/qcoreapplication.cpp:1367
#30 0xb6bff0ad in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1260
#31 0xb6c2757f in QCoreApplication::sendPostedEvents (s=0x82e6790) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#32 postEventSourceDispatch (s=0x82e6790) at kernel/qeventdispatcher_glib.cpp:276
#33 0xb58d1305 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#34 0xb58d4fe8 in ?? () from /lib/libglib-2.0.so.0
#35 0xb58d51c8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#36 0xb6c27075 in QEventDispatcherGlib::processEvents (this=0x8265330, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#37 0xb6202ed5 in QGuiEventDispatcherGlib::processEvents (this=0x8265330, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#38 0xb6bf9ae9 in QEventLoop::processEvents (this=0xbfe2a8f4, flags=) at kernel/qeventloop.cpp:149
#39 0xb6bf9f3a in QEventLoop::exec (this=0xbfe2a8f4, flags=...) at kernel/qeventloop.cpp:201
#40 0xb6bff16f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#41 0xb6144667 in QApplication::exec () at kernel/qapplication.cpp:3581
#42 0xb507cd4e in kdemain (argc=1, argv=0x82afca0) at ../../kded/kded.cpp:932
#43 0x0804e37b in launch (argc=<value optimized out>, _name=<value optimized out>, args=<value optimized out>, cwd=0x0, envc=0, envs=0x0, reset_env=false, tty=0x0, avoid_loops=false, 
    startup_id_str=0x80515bb "0") at ../../kinit/kinit.cpp:729
#44 0x08050090 in main (argc=4, argv=0xbfe2b1d4, envp=0xbfe2b1e8) at ../../kinit/kinit.cpp:1800
The current source language is "auto; currently c".

Reported using DrKonqi
Comment 1 Alex Fiestas 2011-01-20 16:40:53 UTC
What BlueDevil version do you have?
Comment 2 brad0112358 2011-06-08 18:10:24 UTC
Created attachment 60788 [details]
New crash information added by DrKonqi

Resuming from hibernation with a different network environment caused this crash.  Debian Squeeze:

bluedevil:
  Installed: 1.0~rc3-2
  Candidate: 1.0~rc3-2
  Version table:
 *** 1.0~rc3-2 0
        990 http://ftp.us.debian.org/debian/ squeeze/main i386 Packages
        100 /var/lib/dpkg/status
Comment 3 Alex Fiestas 2011-09-18 02:16:18 UTC
Can you test with a modern BlueDevil, 1.1.1 or 1.2.1?

At the very least latest 1.0.4

Thanks.
Comment 4 Alex Fiestas 2011-10-07 17:00:17 UTC
Git commit fd6fa391f6ed7dbed7072e8c90247dda09d281d1 by Alex Fiestas.
Committed on 07/10/2011 at 18:50.
Pushed by afiestas into branch 'master'.

Replaced AgentListener (QThread) by delayed DBus messages

This thread has been causing many crashes for some people, and
as far as I remember all the backtraces show weird things not really
within BlueDevilcode, and of course none of the BlueDevil developers has
been able to reproduce the bug. So the best/easy/simpler way of fixing
this is by removing the Thread which shouldn't be there in the first
place.

BUG: 262587
BUG: 275783
BUG: 262041
BUG: 283365

M  +9    -19   src/daemon/kded/BlueDevilDaemon.cpp
M  +0    -5    src/daemon/kded/BlueDevilDaemon.h
M  +1    -2    src/daemon/kded/CMakeLists.txt
D  +0    -40   src/daemon/kded/agentlistener.cpp
D  +0    -55   src/daemon/kded/agentlistener.h
R  +95   -44   src/daemon/kded/bluezagent.cpp [from: src/daemon/kded/agentlistenerworker.cpp - 051% similarity]
R  +29   -5    src/daemon/kded/bluezagent.h [from: src/daemon/kded/agentlistenerworker.h - 081% similarity]

http://commits.kde.org/bluedevil/fd6fa391f6ed7dbed7072e8c90247dda09d281d1