Summary: | Solid::Backends::Hal::Processor::instructionSets() causes crashes in ksmserver and kinfocenter->processor information | ||
---|---|---|---|
Product: | [Unmaintained] solid | Reporter: | Tadeas Moravec <tadeas.moravec> |
Component: | general | Assignee: | Kevin Ottens <ervin> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | emondi, kde, kdebugs, mail, xtom.vavra |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch to fix the crash |
Description
Tadeas Moravec
2009-07-26 11:39:28 UTC
I can confirm this crash with trunk here. This seems to be a regression introduced in 1001979 (in trunk) and 1001980 (in 4.3 branch). What I did: I rebuild latest kdelibs from trunk, opened kinfocenter and selected the "processor information" module. It crashed. Then I reverted solid/backends/hal/halprocessor.cpp to its last revision before 1001979 (svn up -r773323 halprocessor.cpp) and rebuilt solid. Then I tested again with kinfocenter and it doesn't crash. My cpu is "AMD Phenom(tm) 8450 Triple-Core Processor" and I am using the amd64 architecture. This is the backtrace (although it doesn't seem to be very helpful...): Application: KDE Info Center (kinfocenter), signal: Segmentation fault [Current thread is 1 (Thread 0x7f27e4c59760 (LWP 7056))] Thread 2 (Thread 0x7f27d33f9950 (LWP 7060)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:217 #1 0x00007f27e0e453c7 in QWaitConditionPrivate::wait (this=0x1b27f48, mutex=0x1b27f40, time=30000) at thread/qwaitcondition_unix.cpp:85 #2 QWaitCondition::wait (this=0x1b27f48, mutex=0x1b27f40, time=30000) at thread/qwaitcondition_unix.cpp:159 #3 0x00007f27e0e3b221 in QThreadPoolThread::run (this=0x1ade440) at concurrent/qthreadpool.cpp:140 #4 0x00007f27e0e443f5 in QThreadPrivate::start (arg=0x1ade440) at thread/qthread_unix.cpp:188 #5 0x00007f27e0bc3faa in start_thread (arg=<value optimized out>) at pthread_create.c:300 #6 0x00007f27e018b29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #7 0x0000000000000000 in ?? () Thread 1 (Thread 0x7f27e4c59760 (LWP 7056)): [KCrash Handler] #4 0x00007fff347e1c30 in ?? () #5 0x00007f27dd3103e9 in Solid::Backends::Hal::Processor::instructionSets (this=0x4) at /home/gkiagia/kde/src/KDE/kdelibs/solid/solid/backends/hal/halprocessor.cpp:63 #6 0x00007f27dd2e4fa0 in Solid::Processor::instructionSets (this=<value optimized out>) at /home/gkiagia/kde/src/KDE/kdelibs/solid/solid/processor.cpp:58 #7 0x00007f27d1d2807e in KCMSolidProc::rowSelected (this=0x1efd4f0, newRow=<value optimized out>) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/solidproc/solidproc.cpp:95 #8 0x00007f27d1d2933d in KCMSolidProc::qt_metacall (this=0x1efd4f0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff347e1d90) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/solidproc/solidproc.moc:68 #9 0x00007f27e0f3f602 in QMetaObject::activate (sender=0x1efde30, from_signal_index=<value optimized out>, to_signal_index=78, argv=0x7fff347e1920) at kernel/qobject.cpp:3112 #10 0x00007f27e193c231 in QListWidget::currentRowChanged (this=0x7fff347e1c30, _t1=0) at .moc/release-shared/moc_qlistwidget.cpp:241 #11 0x00007f27e193faf3 in QListWidgetPrivate::_q_emitCurrentItemChanged (this=0x7fff347e1dc0, current=<value optimized out>, previous=...) at itemviews/qlistwidget.cpp:1079 #12 0x00007f27e194240f in QListWidget::qt_metacall (this=0x1efde30, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff347e1f30) at .moc/release-shared/moc_qlistwidget.cpp:141 #13 0x00007f27e0f3f602 in QMetaObject::activate (sender=0x1efff90, from_signal_index=<value optimized out>, to_signal_index=5, argv=0x7fff347e1920) at kernel/qobject.cpp:3112 #14 0x00007f27e192a06a in QItemSelectionModel::currentChanged (this=0x7fff347e1c30, _t1=<value optimized out>, _t2=<value optimized out>) at .moc/release-shared/moc_qitemselectionmodel.cpp:153 #15 0x00007f27e192a1b4 in QItemSelectionModel::setCurrentIndex (this=0x1efff90, index=<value optimized out>, command=...) at itemviews/qitemselectionmodel.cpp:1123 #16 0x00007f27e193f560 in QListWidget::setCurrentRow (this=0x1efde30, row=0) at itemviews/qlistwidget.cpp:1437 #17 0x00007f27d1d28878 in KCMSolidProc (this=0x1efd4f0, parent=<value optimized out>) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/solidproc/solidproc.cpp:67 #18 0x00007f27d1d2ace3 in KPluginFactory::createInstance<KCMSolidProc, QWidget> (parentWidget=<value optimized out>, parent=<value optimized out>, args=...) at /home/gkiagia/kde/include/KDE/../kpluginfactory.h:461 #19 0x00007f27e2255849 in KPluginFactory::create (this=0x1e845a0, iface=0x7f27e2ac3660 "KCModule", parentWidget=0x0, parent=0x0, args=..., keyword=<value optimized out>) at /home/gkiagia/kde/src/KDE/kdelibs/kdecore/util/kpluginfactory.cpp:191 #20 0x00007f27e3a10f61 in KPluginFactory::create<KCModule> (this=0x1e845a0, parentWidget=0x0, parent=0x0, keyword=..., args=...) at /home/gkiagia/kde/src/KDE/kdelibs/kdecore/util/kpluginfactory.h:515 #21 0x00007f27e3a11041 in KService::createInstance<KCModule> (this=0x1937690, parentWidget=0x0, parent=0x0, args=..., error=0x7fff347e27b0) at /home/gkiagia/kde/src/KDE/kdelibs/kdecore/services/kservice.h:517 #22 0x00007f27e3a10552 in KCModuleLoader::loadModule (mod=..., report=KCModuleLoader::None, parent=0x0, args=...) at /home/gkiagia/kde/src/KDE/kdelibs/kutils/kcmoduleloader.cpp:89 #23 0x00007f27e497c8dd in ConfigModule::module (this=0x1947480) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/modules.cpp:64 #24 0x00007f27e4978263 in DockContainer::initializeModule (this=0x1a5a590, module=0x1947480) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/dockcontainer.cpp:113 #25 0x00007f27e49787e0 in DockContainer::dockModule (this=0x7fff347e1c30, module=0x4) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/dockcontainer.cpp:130 #26 0x00007f27e49751d2 in TopLevel::activateModule (this=0x18db200, configModule=0x1947480) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/toplevel.cpp:137 #27 0x00007f27e497558f in TopLevel::qt_metacall (this=0x18db200, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff347e2e00) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/toplevel.moc:72 #28 0x00007f27e0f3f602 in QMetaObject::activate (sender=0x1946be0, from_signal_index=<value optimized out>, to_signal_index=28, argv=0x7fff347e1920) at kernel/qobject.cpp:3112 #29 0x00007f27e4977de2 in IndexWidget::moduleActivated (this=0x7fff347e1c30, _t1=0x1947480) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/indexwidget.moc:96 #30 0x00007f27e4977eab in IndexWidget::selectModule (this=0x1946be0, module=0x1947480) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/indexwidget.cpp:79 #31 0x00007f27e4977ffa in IndexWidget::qt_metacall (this=0x1946be0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff347e2f90) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/indexwidget.moc:78 #32 0x00007f27e0f3f602 in QMetaObject::activate (sender=0x1946990, from_signal_index=<value optimized out>, to_signal_index=92, argv=0x7fff347e1920) at kernel/qobject.cpp:3112 #33 0x00007f27e497b3ff in ModuleTreeView::moduleSelected (this=0x7fff347e1c30, _t1=0x1947480) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/moduletreeview.moc:86 #34 0x00007f27e497b538 in ModuleTreeView::selectItem (this=0x1946990) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/moduletreeview.cpp:64 #35 0x00007f27e497b638 in ModuleTreeView::qt_metacall (this=0x1946990, _c=QMetaObject::InvokeMetaMethod, _id=880679984, _a=0x7fff347e3120) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/moduletreeview.moc:74 #36 0x00007f27e0f3f602 in QMetaObject::activate (sender=0x1946990, from_signal_index=<value optimized out>, to_signal_index=79, argv=0x7fff347e1920) at kernel/qobject.cpp:3112 #37 0x00007f27e194248b in QListWidget::qt_metacall (this=0x1946990, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff347e32a0) at .moc/release-shared/moc_qlistwidget.cpp:131 #38 0x00007f27e497b5e5 in ModuleTreeView::qt_metacall (this=0x7fff347e1c30, _c=QMetaObject::QueryPropertyDesignable, _id=-583990256, _a=0x7fff347e1920) at /home/gkiagia/kde/build/KDE/kdebase/apps/kinfocenter/moduletreeview.moc:67 #39 0x00007f27e0f3f602 in QMetaObject::activate (sender=0x18fc960, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x7fff347e1920) at kernel/qobject.cpp:3112 #40 0x00007f27e192a097 in QItemSelectionModel::selectionChanged (this=0x7fff347e1c30, _t1=<value optimized out>, _t2=<value optimized out>) at .moc/release-shared/moc_qitemselectionmodel.cpp:146 #41 0x00007f27e192ea62 in QItemSelectionModel::emitSelectionChanged (this=0x18fc960, newSelection=..., oldSelection=...) at itemviews/qitemselectionmodel.cpp:1548 #42 0x00007f27e1931b3a in QItemSelectionModel::select (this=0x18fc960, selection=<value optimized out>, command=<value optimized out>) at itemviews/qitemselectionmodel.cpp:1055 #43 0x00007f27e18fe1f2 in QListView::setSelection (this=0x0, rect=..., command=...) at itemviews/qlistview.cpp:1595 #44 0x00007f27e18de828 in QAbstractItemView::mousePressEvent (this=0x1946990, event=0x7fff347e4440) at itemviews/qabstractitemview.cpp:1517 #45 0x00007f27e1447cc6 in QWidget::event (this=0x1946990, event=0x7fff347e4440) at kernel/qwidget.cpp:7545 #46 0x00007f27e17b0c7b in QFrame::event (this=0x1946990, e=0x7fff347e4440) at widgets/qframe.cpp:559 #47 0x00007f27e18e371b in QAbstractItemView::viewportEvent (this=0x1946990, event=0x7fff347e4440) at itemviews/qabstractitemview.cpp:1476 #48 0x00007f27e0f297b8 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x1947410, event=0x7fff347e4440) at kernel/qcoreapplication.cpp:726 #49 0x00007f27e13f777c in QApplicationPrivate::notify_helper (this=0x1842710, receiver=0x1947410, e=0x7fff347e4440) at kernel/qapplication.cpp:4052 #50 0x00007f27e13fff5a in QApplication::notify (this=<value optimized out>, receiver=0x1947410, e=0x7fff347e4440) at kernel/qapplication.cpp:3758 #51 0x00007f27e29703fe in KApplication::notify (this=0x7fff347e61f0, receiver=0x1947410, event=0x7fff347e4440) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302 #52 0x00007f27e0f2a49c in QCoreApplication::notifyInternal (this=0x7fff347e61f0, receiver=0x1947410, event=0x7fff347e4440) at kernel/qcoreapplication.cpp:610 #53 0x00007f27e13ff208 in QCoreApplication::sendSpontaneousEvent (receiver=0x1947410, event=0x7fff347e4440, alienWidget=0x1947410, nativeWidget=0x18db200, buttonDown=<value optimized out>, lastMouseReceiver=...) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216 #54 QApplicationPrivate::sendMouseEvent (receiver=0x1947410, event=0x7fff347e4440, alienWidget=0x1947410, nativeWidget=0x18db200, buttonDown=<value optimized out>, lastMouseReceiver=...) at kernel/qapplication.cpp:2924 #55 0x00007f27e1467d99 in QETWidget::translateMouseEvent (this=0x18db200, event=<value optimized out>) at kernel/qapplication_x11.cpp:4409 #56 0x00007f27e1466b4f in QApplication::x11ProcessEvent (this=0x7fff347e61f0, event=0x7fff347e5e10) at kernel/qapplication_x11.cpp:3550 #57 0x00007f27e148ee3c in x11EventSourceDispatch (s=0x1845f00, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146 #58 0x00007f27dbafb7aa in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #59 0x00007f27dbafedf8 in ?? () from /usr/lib/libglib-2.0.so.0 #60 0x00007f27dbafefac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #61 0x00007f27e0f52b7f in QEventDispatcherGlib::processEvents (this=0x1817790, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327 #62 0x00007f27e148e5ef in QGuiEventDispatcherGlib::processEvents (this=0x7fff347e1c30, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202 #63 0x00007f27e0f28d62 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149 #64 0x00007f27e0f29134 in QEventLoop::exec (this=0x7fff347e6140, flags=...) at kernel/qeventloop.cpp:201 #65 0x00007f27e0f2b3a4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888 #66 0x00007f27e4973f9a in kdemain (argc=1, argv=0x7fff347e65a8) at /home/gkiagia/kde/src/KDE/kdebase/apps/kinfocenter/main.cpp:117 #67 0x00007f27e00db5a6 in __libc_start_main (main=0x400830 <main>, argc=1, ubp_av=0x7fff347e65a8, init=0x400860 <__libc_csu_init>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff347e6598) at libc-start.c:222 #68 0x0000000000400769 in _start () at ../sysdeps/x86_64/elf/start.S:113 ------ Since this crash affects ksmserver on logout, I think the issue is pretty serious and this commit should be reverted from the 4.3 branch before the 4.3.0 release. I am adding the kde-4.3.0-blocker keyword just to be safe. If you think it's not a blocker, then remove the keyword, but I really think it is. Thanks SVN commit 1002644 by ervin: Reverting 1001980 in the 4.3 branch as it apparently crashes for some CPU (great...). No need to block the 4.3 release for that, it's likely not worth it. CCBUG: 201537 M +22 -47 halprocessor.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1002644 Reverted in the 4.3 branch to avoid blocking 4.3.0 release. Now to see this one really fixed, we'll need someone with an AMD64 processor who is willing to investigate it. I don't have such hardware and on my Intel 64 bits processors it works just flawlessly. Any taker? I (the original poster) also have AMD, Athlon64 x2. I'll rebuild and check it tomorrow. So I did it now and I confirm that it works as expected. Viewing Kinfocenter->Processor information as well as logging out. The session saves as expected. My processor is AMD Athlon(tm) 64 X2 Dual-Core Processor TK-57 Thank you very much! Created attachment 35651 [details]
Patch to fix the crash
After spending ~2 hours on gdb, I found the issue. It seems to be a simple copy/paste mistake. Two instructions were repeated twice and one of them was a "push" instruction, which decreased the stack frame pointer (%rsp) by 8 bytes, without being followed by any "pop" instruction to restore it. So, when the function was about to return, $rsp was smaller by 8 bytes and "retq" would pick garbage as a return address from the stack and crash. I really wonder how it works on your CPU...
So, the attached patch solves the issue for me.
*** Bug 201755 has been marked as a duplicate of this bug. *** I logged bug 201755 which is duplicate of this one and I have Intel COre 2 duo. *** Bug 201954 has been marked as a duplicate of this bug. *** Still crashes for me on trunk. What is the state here. This is a really worse bug. Please revert asap if there is no immediate solution. Architecture: x86_64 CPU(s): 8 Thread(s) per core: 2 Core(s) per socket: 4 CPU socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 26 Stepping: 4 CPU MHz: 1600.000 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 8192K SVN commit 1006390 by ervin: Commit patch by George Kiagiadakis. BUG: 201537 M +0 -2 halprocessor.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1006390 I'm running trunk and tried the patch before it was commited, it solved the crash but now I can't logout until i do kquitapp ksmserver. It is on debian 32 bits on a AMD64 processor. I did not try the kinfocenter part before, sorry. So it could be a different cause. (In reply to comment #13) > I'm running trunk and tried the patch before it was commited, it solved the > crash but now I can't logout until i do kquitapp ksmserver. It is on debian 32 > bits on a AMD64 processor. I did not try the kinfocenter part before, sorry. So > it could be a different cause. Sorry for replying again but I tried reverting and had the kinfocenter crash too. |