Summary: | Screen locker fails and crashes | ||
---|---|---|---|
Product: | [Unmaintained] kscreensaver | Reporter: | Jeremy Whiting <jpwhiting> |
Component: | locker | Assignee: | kscreensaver bugs tracking <kscreensaver-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | notmart, ossi |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
URL: | http://paste.kde.org/560822/ | ||
Latest Commit: | http://commits.kde.org/kde-workspace/ca73d0208a7b6dc8e25760889a5c86e1d01c1b7d | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Patch to fix kscreenlocker_greet crash |
Description
Jeremy Whiting
2012-10-01 19:41:12 UTC
Paste the backtrace inline in case the content on pastebin is lost/expired . Please always put important information onto b.k.o itself. Starting program: /usr/local/lib/kde4/libexec/kscreenlocker_greet warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Traceback (most recent call last): File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3200.4-gdb.py", line 9, in <module> from gobject import register File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module> import gdb.backtrace ImportError: No module named backtrace [New Thread 0x7fffdcd83700 (LWP 15039)] Program received signal SIGSEGV, Segmentation fault. 0x00007fffdaf55ea4 in KClassicGreeter::revive (this=0xd658b0) at /home/jeremy/devel/kde/src/kde/kde-workspace/libs/kdm/kgreet_classic.cpp:373 373 passwd1Edit->clear(); #0 0x00007fffdaf55ea4 in KClassicGreeter::revive (this=0xd658b0) at /home/jeremy/devel/kde/src/kde/kde-workspace/libs/kdm/kgreet_classic.cpp:373 #1 0x000000000040d766 in ScreenLocker::Greeter::failedTimer (this=0xd64f90) at /home/jeremy/devel/kde/src/kde/kde-workspace/ksmserver/screenlocker/greeter/greeter.cpp:256 #2 0x00007ffff381eacf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #3 0x00007ffff382678f in ?? () from /usr/lib/libQtCore.so.4 #4 0x00007ffff381dddc in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4 #5 0x00007ffff41fd08c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #6 0x00007ffff420150a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #7 0x00007ffff7591cc6 in KApplication::notify (this=0x7fffffffe760, receiver=0x7e7c30, event=0x7fffffffe3b0) at /home/jeremy/devel/kde/src/kde/kdelibs/kdeui/kernel/kapplication.cpp:311 #8 0x00007ffff38095ee in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #9 0x00007ffff3839fb2 in ?? () from /usr/lib/libQtCore.so.4 #10 0x00007ffff38370e4 in ?? () from /usr/lib/libQtCore.so.4 #11 0x00007ffff3837101 in ?? () from /usr/lib/libQtCore.so.4 #12 0x00007fffea426475 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #13 0x00007fffea4267a8 in ?? () from /usr/lib/libglib-2.0.so.0 #14 0x00007fffea426864 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #15 0x00007ffff3837746 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #16 0x00007ffff429d50e in ?? () from /usr/lib/libQtGui.so.4 #17 0x00007ffff380833f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #18 0x00007ffff38085c8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #19 0x00007ffff380d268 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4 #20 0x000000000040bd99 in main (argc=1, argv=0x7fffffffe8c8) at /home/jeremy/devel/kde/src/kde/kde-workspace/ksmserver/screenlocker/greeter/main.cpp:66 A debugging session is active. Inferior 1 [process 15023] will be killed. Quit anyway? (y or n) Created attachment 74310 [details]
Patch to fix kscreenlocker_greet crash
I looked at the code today, and it seems revive is going down the wrong path when it has if (authTok), since those KLineEdit objects are not initialized when func is Authentication. I realized authTok is not initialized to false, and not set anywhere except in the start() function which ksmserver greeter only calls after it calls revive in failedTimer. Anyway, if we initialize authTok to false, the crash doesn't happen and the greeter works again here.
Let me know if this is the correct solution and I'll commit to master. Alternatively maybe ksmserver greeter should call start() at some point before it ends up calling revive().
Git commit 21c1ee79d4bc5672d1a6fb8bcd5f120624aeccca by Jeremy Whiting. Committed on 03/10/2012 at 18:54. Pushed by whiting into branch 'master'. Initialize authTok at construction time rather than requiring start to be called. Fixes crash in qml based screen locker since it doesn't call start until after revive. M +2 -1 libs/kdm/kgreet_classic.cpp http://commits.kde.org/kde-workspace/21c1ee79d4bc5672d1a6fb8bcd5f120624aeccca it's the wrong solution. kgreeeterplugin.h is pretty explicit about when revive() may be called. please revert and go fix ksmserver. and, btw, don't you think that 16 hours is a tiny bit on short notice for a review? Really? Initializing a variable at ctor time is a problem somehow? I don't mind fixing the problem in ksmserver, but revert this small patch? yes, it is. you'd have never found the problem with this "fix", and it would defeat valgrind as a way to find the problem (theoretically, because nobody does that anyway). also, i bet that the winbind plugin is also affected. and, well, it's my code. and i say: *don't* initialize by default. if you want to go extra-pedantic, you can enable the "fake" asserts in the plugins. though i'm not sure the code would actually run then (it did once ...). Git commit ca73d0208a7b6dc8e25760889a5c86e1d01c1b7d by Jeremy Whiting. Committed on 09/10/2012 at 23:56. Pushed by whiting into branch 'master'. Undo previous wrong fix for ksmserver crash. Fix ksmserver crash by calling m_greet->start in the constructor. M +1 -0 ksmserver/screenlocker/greeter/greeter.cpp M +1 -2 libs/kdm/kgreet_classic.cpp http://commits.kde.org/kde-workspace/ca73d0208a7b6dc8e25760889a5c86e1d01c1b7d i can confirm is fixed in the repository |