[Bug 293199] New: kded blocks when child program fails to execute

Jan Kundrát jkt at gentoo.org
Fri Feb 3 11:12:54 GMT 2012


https://bugs.kde.org/show_bug.cgi?id=293199

           Summary: kded blocks when child program fails to execute
           Product: kde
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: unassigned-bugs at kde.org
        ReportedBy: jkt at gentoo.org


Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

My Thinkpad T420s generates a Display key when I press Fn+F7. kded is set to
catch this signal and switch display outputs. For some reason, this action
failed to work today. Since that time, many KDE applications, from plasma to
rekonq, started to behave strangely. When stracing the troubling application,
I'd often see it hang when trying to communicate over DBUS with the
org.kde.kded. Therefore I've deciced to kill the kded process. This is the
backtrace at the time of the kill:

#6  0x00007f07df8328a3 in select () at ../sysdeps/unix/syscall-template.S:82
#7  0x00007f07e0fdacf3 in qt_safe_select (nfds=0, fdread=0x7fffc151a420,
fdwrite=0x0, fdexcept=0x0, orig_timeout=<value optimized out>) at
kernel/qcore_unix.cpp:83
#8  0x00007f07e0f7a3ca in select_msecs (nfds=<value optimized out>,
fdread=<value optimized out>, fdwrite=<value optimized out>, timeout=<value
optimized out>) at io/qprocess_unix.cpp:991
#9  0x00007f07e0f7b4a6 in QProcessPrivate::waitForStarted (this=<value
optimized out>, msecs=<value optimized out>) at io/qprocess_unix.cpp:1025
#10 0x00007f07e0f2cffb in QProcess::waitForFinished (this=0x7fffc151a550,
msecs=-1) at io/qprocess.cpp:1754
#11 0x00007f07e145bbea in KProcess::execute (this=0x7fffc151a550, msecs=-1) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdecore/io/kprocess.cpp:350
#12 0x00007f07e145c6c7 in KProcess::execute (argv=..., msecs=-1) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdecore/io/kprocess.cpp:371
#13 0x00007f07c1db06cb in RandrMonitorModule::enableOutput (this=<value
optimized out>, output=<value optimized out>, enable=<value optimized out>) at
/var/tmp/portage/kde-base/systemsettings-4.8.0/work/systemsettings-4.8.0/kcontrol/randr/module/randrmonitor.cpp:345
#14 0x00007f07c1db2e5e in RandrMonitorModule::switchDisplay
(this=0x7f07e42ecf60) at
/var/tmp/portage/kde-base/systemsettings-4.8.0/work/systemsettings-4.8.0/kcontrol/randr/module/randrmonitor.cpp:302
#15 0x00007f07c1db332c in RandrMonitorModule::qt_metacall (this=0x7f07e42ecf60,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=<value
optimized out>) at
/var/tmp/portage/kde-base/systemsettings-4.8.0/work/systemsettings-4.8.0_build/kcontrol/randr/module/randrmonitor.moc:79
#16 0x00007f07e0fc0f6c in QMetaObject::activate (sender=0x7f07e42e99e0,
m=<value optimized out>, local_signal_index=<value optimized out>,
argv=0x7fffc151a9f0) at kernel/qobject.cpp:3566
#17 0x00007f07dffe6122 in QAction::triggered (this=<value optimized out>,
_t1=false) at .moc/release-shared/moc_qaction.cpp:277
#18 0x00007f07dffe6403 in QAction::activate (this=0x7f07e42e99e0, event=<value
optimized out>) at kernel/qaction.cpp:1257
#19 0x00007f07e1e6f198 in trigger (this=<value optimized out>,
componentUnique=<value optimized out>, actionUnique=<value optimized out>,
timestamp=103488153) at /usr/include/qt4/QtGui/qaction.h:218
#20 KGlobalAccelPrivate::_k_invokeAction (this=<value optimized out>,
componentUnique=<value optimized out>, actionUnique=<value optimized out>,
timestamp=103488153) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdeui/shortcuts/kglobalaccel.cpp:449
#21 0x00007f07e1e71c53 in KGlobalAccel::qt_metacall (this=0x7f07e41a6fd0,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc151acd0)
at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0_build/kdeui/kglobalaccel.moc:77
#22 0x00007f07e0fc0f6c in QMetaObject::activate (sender=0x7f07e411e290,
m=<value optimized out>, local_signal_index=<value optimized out>,
argv=0x7fffc151acd0) at kernel/qobject.cpp:3566
#23 0x00007f07e1facbb9 in
OrgKdeKglobalaccelComponentInterface::globalShortcutPressed (this=<value
optimized out>, _t1=<value optimized out>, _t2=<value optimized out>,
_t3=103488153) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0_build/kdeui/kglobalaccel_component_interface.moc:150
#24 0x00007f07e1facfea in OrgKdeKglobalaccelComponentInterface::qt_metacall
(this=0x7f07e411e290, _c=QMetaObject::InvokeMetaMethod, _id=0,
_a=0x7fffc151b120) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0_build/kdeui/kglobalaccel_component_interface.moc:98
#25 0x00007f07ddbc17f7 in QDBusConnectionPrivate::deliverCall
(this=0x7f07e3e48040, object=0x7f07e411e290, msg=..., metaTypes=<value
optimized out>, slotIdx=5) at qdbusintegrator.cpp:947
#26 0x00007f07e0fbff46 in QObject::event (this=0x7f07e411e290, e=<value
optimized out>) at kernel/qobject.cpp:1195
#27 0x00007f07dffee674 in QApplicationPrivate::notify_helper
(this=0x7f07e3e58db0, receiver=0x7f07e411e290, e=0x7f07e49cebf0) at
kernel/qapplication.cpp:4550
#28 0x00007f07dfff389d in QApplication::notify (this=0x7fffc151bd20,
receiver=0x7f07e411e290, e=0x7f07e49cebf0) at kernel/qapplication.cpp:3932
#29 0x00007f07e1e1ab76 in KApplication::notify (this=0x7fffc151bd20,
receiver=0x7f07e411e290, event=0x7f07e49cebf0) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kdeui/kernel/kapplication.cpp:311
#30 0x00007f07e0fa716c in QCoreApplication::notifyInternal
(this=0x7fffc151bd20, receiver=0x7f07e411e290, event=0x7f07e49cebf0) at
kernel/qcoreapplication.cpp:876
#31 0x00007f07e0fab040 in sendEvent (receiver=0x0, event_type=<value optimized
out>, data=0x7f07e3dc63a0) at kernel/qcoreapplication.h:231
#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value
optimized out>, data=0x7f07e3dc63a0) at kernel/qcoreapplication.cpp:1500
#33 0x00007f07e0fddda7 in sendPostedEvents (s=<value optimized out>) at
kernel/qcoreapplication.h:236
#34 postEventSourceDispatch (s=<value optimized out>) at
kernel/qeventdispatcher_glib.cpp:279
#35 0x00007f07dc7a7ada in g_main_dispatch (context=0x7f07e3e5ad40) at
gmain.c:2441
#36 g_main_context_dispatch (context=0x7f07e3e5ad40) at gmain.c:3011
#37 0x00007f07dc7a8308 in g_main_context_iterate (context=0x7f07e3e5ad40,
block=1, dispatch=1, self=<value optimized out>) at gmain.c:3089
#38 0x00007f07dc7a8531 in g_main_context_iteration (context=0x7f07e3e5ad40,
may_block=1) at gmain.c:3152
#39 0x00007f07e0fddf9f in QEventDispatcherGlib::processEvents
(this=0x7f07e3e58d40, flags=<value optimized out>) at
kernel/qeventdispatcher_glib.cpp:424
#40 0x00007f07e00ae116 in QGuiEventDispatcherGlib::processEvents (this=<value
optimized out>, flags=<value optimized out>) at
kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007f07e0fa5c42 in QEventLoop::processEvents (this=<value optimized
out>, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007f07e0fa602d in QEventLoop::exec (this=0x7fffc151bc70, flags=...) at
kernel/qeventloop.cpp:204
#43 0x00007f07e0fab51b in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:1148
#44 0x00007f07cf9194d8 in kdemain (argc=1, argv=0x7f07e3e36e00) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kded/kded.cpp:924
#45 0x00007f07e24c59f8 in launch (argc=1, _name=0x7f07e24ca1c2 "kded4",
args=<value optimized out>, cwd=0x0, envc=<value optimized out>, envs=<value
optimized out>, reset_env=false, tty=0x0, avoid_loops=false,
startup_id_str=0x7f07e24ca0b4 "0") at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kinit/kinit.cpp:734
#46 0x00007f07e24c8357 in main (argc=2, argv=0x7fffc151c860,
envp=0x7fffc151c7a0) at
/var/tmp/portage/kde-base/kdelibs-4.8.0/work/kdelibs-4.8.0/kinit/kinit.cpp:1849

It appears that there's no reasonable timeout, and that other applications try
to wait for kded which is not able to fulfil their requests.

I'm proposing adding some limited timeout (30 seconds?) to the places where
kded executes its helper applications. I believe that having such a timeout
(along with a proper failure handlers logging the error) would prevent the
desktop from slowing down in case one particular action fails, hereby making
the whole stack much more robust.

Reproducible: Didn't try

Steps to Reproduce:
.


Expected Results:  
.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list