Bug 341775

Summary: Powerdevil kded triggers kded5 loop
Product: [Plasma] Powerdevil Reporter: Hrvoje Senjan <hrvoje.senjan>
Component: generalAssignee: Plasma Development Mailing List <plasma-devel>
Status: RESOLVED DUPLICATE    
Severity: grave CC: dvratil, kde, mklapetek, rdieter, rolf.offermanns, simonandric5
Priority: NOR    
Version: 5.1.95   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Hrvoje Senjan 2014-12-11 16:02:42 UTC
Since 697e505f37b9128d68ef2b0ce5c9d7f80ca422ff - Emit signal when maximum brightness changes, i am getting kded5 killing the CPU... obtained backtrace:

Thread 1 (Thread 0x7f79784fb780 (LWP 23601)):
#0  0x00007f7973df7a80 in  () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f7973df7cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f7975c26f9c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#3  0x00007f7975bcdbbb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007f7976fdaa6e in KJob::exec() () at /usr/lib64/libKF5CoreAddons.so.5
#5  0x00007f795d87cb94 in PowerDevilUPowerBackend::brightnessValueMax(PowerDevil::BackendInterface::BrightnessControlType) const (this=<optimized out>, type=<optimized out>) at /usr/src/debug/powerdevil-5.1.90git/daemon/backends/upower/powerdevilupowerbackend.cpp:384
#6  0x00007f795d442a92 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (this=0x15417e0)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.cpp:63
#7  0x00007f795d442a92 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x15417e0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=8, _a=_a@entry=0x7fff181aa440)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:153
#8  0x00007f795d442ce3 in BrightnessControlAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x15417e0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fff181aa440) at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:216
#9  0x00007f797749d67f in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) (this=this@entry=
    0x1117010, object=object@entry=0x15417e0, msg=..., metaTypes=..., slotIdx=13) at qdbusintegrator.cpp:990
#10 0x00007f79774a1dac in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x1117010, object=0x15417e0, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:902
#11 0x00007f79774a2823 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x1117010, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1463
#12 0x00007f79774a426e in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x17f58c0) at qdbusintegrator.cpp:1577
#13 0x00007f7975c002b6 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#14 0x00007f797688da9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#15 0x00007f7976892b00 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#16 0x00007f7975bcfc55 in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#17 0x00007f7975bd1aef in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
#18 0x00007f7975c27b23 in  () at /usr/lib64/libQt5Core.so.5
#19 0x00007f7973df7a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#20 0x00007f7973df7c48 in  () at /usr/lib64/libglib-2.0.so.0
#21 0x00007f7973df7cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#22 0x00007f7975c26f9c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#23 0x00007f7975bcdbbb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#24 0x00007f7976fdaa6e in KJob::exec() () at /usr/lib64/libKF5CoreAddons.so.5
#25 0x00007f795d87d196 in PowerDevilUPowerBackend::brightnessValue(PowerDevil::BackendInterface::BrightnessControlType) const (this=
    0x153a620, type=<optimized out>) at /usr/src/debug/powerdevil-5.1.90git/daemon/backends/upower/powerdevilupowerbackend.cpp:354
#26 0x00007f795d442a62 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (this=0x15417e0)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.cpp:57
#27 0x00007f795d442a62 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x15417e0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=7, _a=_a@entry=0x7fff181aaec0)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:151
#28 0x00007f795d442ce3 in BrightnessControlAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x15417e0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff181aaec0) at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:216
#29 0x00007f797749d67f in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) (this=this@entry=0x1117010, object=object@entry=0x15417e0, msg=..., metaTypes=..., slotIdx=12) at qdbusintegrator.cpp:990
#30 0x00007f79774a1dac in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x1117010, object=0x15417e0, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:902
#31 0x00007f79774a2823 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x1117010, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1463
#32 0x00007f79774a426e in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x165ccf0) at qdbusintegrator.cpp:1577
#33 0x00007f7975c002b6 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#34 0x00007f797688da9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#35 0x00007f7976892b00 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#36 0x00007f7975bcfc55 in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#37 0x00007f7975bd1aef in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#38 0x00007f7975c27b23 in  () at /usr/lib64/libQt5Core.so.5
#39 0x00007f7973df7a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#40 0x00007f7973df7c48 in  () at /usr/lib64/libglib-2.0.so.0
#41 0x00007f7973df7cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#42 0x00007f7975c26f9c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#43 0x00007f7975bcdbbb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#44 0x00007f7976fdaa6e in KJob::exec() () at /usr/lib64/libKF5CoreAddons.so.5
#45 0x00007f795d87cb94 in PowerDevilUPowerBackend::brightnessValueMax(PowerDevil::BackendInterface::BrightnessControlType) const (this=<optimized out>, type=<optimized out>) at /usr/src/debug/powerdevil-5.1.90git/daemon/backends/upower/powerdevilupowerbackend.cpp:384
#46 0x00007f795d442a92 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (this=0x15417e0)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.cpp:63
#47 0x00007f795d442a92 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x15417e0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=8, _a=_a@entry=0x7fff181ab920)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:153
#48 0x00007f795d442ce3 in BrightnessControlAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x15417e0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fff181ab920) at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:216
#49 0x00007f797749d67f in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) (this=this@entry=0x1117010, object=object@entry=0x15417e0, msg=..., metaTypes=..., slotIdx=13) at qdbusintegrator.cpp:990
#50 0x00007f79774a1d36 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x1117010, object=0x15417e0, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:895
#51 0x00007f79774a2823 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x1117010, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1463
#52 0x00007f79774a426e in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x11387a0) at qdbusintegrator.cpp:1577
---Type <return> to continue, or q <return> to quit---
#53 0x00007f7975c002b6 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#54 0x00007f797688da9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#55 0x00007f7976892b00 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#56 0x00007f7975bcfc55 in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#57 0x00007f7975bd1aef in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
#58 0x00007f7975c27b23 in  () at /usr/lib64/libQt5Core.so.5
#59 0x00007f7973df7a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#60 0x00007f7973df7c48 in  () at /usr/lib64/libglib-2.0.so.0
#61 0x00007f7973df7cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#62 0x00007f7975c26f9c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#63 0x00007f7975bcdbbb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#64 0x00007f7976fdaa6e in KJob::exec() () at /usr/lib64/libKF5CoreAddons.so.5
#65 0x00007f795d87d196 in PowerDevilUPowerBackend::brightnessValue(PowerDevil::BackendInterface::BrightnessControlType) const (this=0x153a620, type=<optimized out>) at /usr/src/debug/powerdevil-5.1.90git/daemon/backends/upower/powerdevilupowerbackend.cpp:354
#66 0x00007f795d442a62 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (this=0x15417e0)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.cpp:57
#67 0x00007f795d442a62 in BrightnessControlAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x15417e0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=7, _a=_a@entry=0x7fff181ac3a0)
    at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:151
#68 0x00007f795d442ce3 in BrightnessControlAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x15417e0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff181ac3a0) at /usr/src/debug/powerdevil-5.1.90git/build/daemon/brightnesscontroladaptor.moc:216
#69 0x00007f797749d67f in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) (this=this@entry=0x1117010, object=object@entry=0x15417e0, msg=..., metaTypes=..., slotIdx=12) at qdbusintegrator.cpp:990
---Type <return> to continue, or q <return> to quit---
#70 0x00007f79774a1d36 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x1117010, object=0x15417e0, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:895
#71 0x00007f79774a2823 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x1117010, node=..., msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1463
#72 0x00007f79774a426e in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x1658470) at qdbusintegrator.cpp:1577
#73 0x00007f7975c002b6 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#74 0x00007f797688da9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#75 0x00007f7976892b00 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#76 0x00007f7975bcfc55 in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#77 0x00007f7975bd1aef in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5
#78 0x00007f7975c27b23 in  () at /usr/lib64/libQt5Core.so.5
#79 0x00007f7973df7a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#80 0x00007f7973df7c48 in  () at /usr/lib64/libglib-2.0.so.0
#81 0x00007f7973df7cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#82 0x00007f7975c26f9c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#83 0x00007f7975bcdbbb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#84 0x00007f7975bd5226 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#85 0x00007f7978127a9a in kdemain () at /usr/lib64/libkdeinit5_kded5.so
#86 0x00007f7977da0b45 in __libc_start_main () at /lib64/libc.so.6
#87 0x00000000004007ee in _start ()

Reproducible: Always
Comment 1 Kai Uwe Broulik 2014-12-13 20:11:20 UTC
Git commit 34c13c3acb558753110a44668d1ff9239ce128eb by Kai Uwe Broulik.
Committed on 13/12/2014 at 20:06.
Pushed by broulik into branch 'master'.

Revert "Emit signal when maximum brightness changes"

Better revert this until I can dig deeper into potential race conditions
since this patch is probably the wrong approach in the first place.

This reverts commit 697e505f37b9128d68ef2b0ce5c9d7f80ca422ff.

M  +0    -1    daemon/actions/bundled/brightnesscontrol.cpp
M  +0    -1    daemon/actions/bundled/brightnesscontrol.h
M  +0    -1    daemon/actions/bundled/keyboardbrightnesscontrol.cpp
M  +0    -1    daemon/actions/bundled/keyboardbrightnesscontrol.h
M  +0    -3    daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.BrightnessControl.xml
M  +0    -3    daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl.xml

http://commits.kde.org/powerdevil/34c13c3acb558753110a44668d1ff9239ce128eb
Comment 2 Rolf Offermanns 2015-01-15 12:44:14 UTC
This bug is still reproducible in 5.1.95 (5.2 beta)
Comment 3 Martin Klapetek 2015-01-15 12:51:16 UTC

*** This bug has been marked as a duplicate of bug 337674 ***