Bug 157733 - klauncher segfault
Summary: klauncher segfault
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: klauncher (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 157824 158721 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-12 17:42 UTC by Florian Kriener
Modified: 2008-04-02 15:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Kriener 2008-02-12 17:42:00 UTC
Version:            (using KDE 4.0.1)
Installed from:    Debian testing/unstable Packages

I get this dmesg entry after kde startup:

klauncher[6842]: segfault at c9 rip 2b69292e08dd rsp 7fff833d4240 error 4
Comment 1 David Faure 2008-02-12 21:08:02 UTC
This is only useful if you can provide a klauncher backtrace. To do this:
in ~/.kde/env/kde.sh  (replace ~/.kde with $KDEHOME if you set it), write

ulimit -c unlimited
export KDE_DEBUG=1
cd ~

Then restart kde, and check your home dir for a core file from klauncher.
If you find one, open it with

gdb --core=klauncher
bt

and copy/paste the backtrace.

If all this is too much for you, close this bug report :)
Comment 2 Florian Kriener 2008-02-13 21:44:30 UTC
Is this of any help?

% gdb /usr/lib/debug/usr/lib/kde4/libexec/klauncher core
GNU gdb 6.7.1-debian
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".

warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Core was generated by `klauncher'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002b41071b18dd in ?? ()
(gdb) bt
#0  0x00002b41071b18dd in ?? ()
#1  0x00000000000000ff in ?? ()
#2  0x0000000000000001 in ?? ()
#3  0x0000000000000000 in ?? ()
Comment 3 Florian Kriener 2008-02-13 23:24:41 UTC
I do have something better now:

Loaded symbols for /usr/lib/gconv/UTF-16.so
Core was generated by `klauncher'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002b81b4cda8dd in XCloseDisplay () from /usr/lib/libX11.so.6
(gdb) bt
#0  0x00002b81b4cda8dd in XCloseDisplay () from /usr/lib/libX11.so.6
#1  0x00002b81b3309527 in KLauncher::destruct (exit_code=255)
    at /tmp/buildd/kde4libs-4.0.1/kinit/klauncher.cpp:241
#2  <signal handler called>
#3  0x00002b81b35d4fbf in poll () from /lib/libc.so.6
#4  0x00002b81b5caf00a in ?? () from /usr/lib/libglib-2.0.so.0
#5  0x00002b81b5caf66e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#6  0x00002b81b3979451 in QEventDispatcherGlib::processEvents (this=0x60f680,
    flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:338
#7  0x00002b81b3957908 in QEventLoop::processEvents (this=<value optimized out>,
    flags=<value optimized out>) at kernel/qeventloop.cpp:140
#8  0x00002b81b3957a26 in QEventLoop::exec (this=0x7ffff79c1dc0, flags=@0x7ffff79c1dd0)
    at kernel/qeventloop.cpp:182
#9  0x00002b81b3959b81 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:759
#10 0x00002b81b3312624 in kdemain (argc=1, argv=<value optimized out>)
    at /tmp/buildd/kde4libs-4.0.1/kinit/klauncher_main.cpp:112
#11 0x00002b81b35361c4 in __libc_start_main () from /lib/libc.so.6
#12 0x0000000000400629 in _start ()
Comment 4 David Faure 2008-02-13 23:50:32 UTC
This happens when logging _out_, doesn't it?
It rings a bell, I saw that crash some time ago, it's some klauncher last-minute-closing code from kde3....
Comment 5 David Faure 2008-02-14 17:31:06 UTC
*** Bug 157824 has been marked as a duplicate of this bug. ***
Comment 6 Florian Kriener 2008-02-15 15:23:10 UTC
Ah, you are right. I just confirmed it. It really happens when logging out.
Comment 7 Rich Johnson 2008-02-26 18:39:41 UTC
Hey David, another thing I am noticing with logging out and something very similar to this report, is those who also have Gnome installed on their desktop, are getting KLauncher crashes. If you can, take a look at https://bugs.edge.launchpad.net/ubuntu/+source/kde4libs/+bug/141418 and see if there are any similarities.
Comment 8 George Kiagiadakis 2008-03-07 18:34:36 UTC
Well, for me it doesn't happen only on logout. It seems to happen at some random time while I am working on my kde4 session. In /var/log/messages I get:

"klauncher[4754]: segfault at b7f4b2e4 eip b738725e esp bfffcc00 error 7"

and in $HOME I get a core file from klauncher. After klauncher has crashed,  when I click on files in dolphin or konqueror, I get the message:

"KLauncher could not be reached via D-Bus, error when calling start_service_by_desktop_name: empty"

(this is actually bug #157853, which seems to be related to this one)
Comment 9 David Faure 2008-03-12 15:11:38 UTC
On Friday 07 March 2008, George Kiagiadakis wrote:
>  in $HOME I get a core file from klauncher


Can you try
   gdb $KDEDIR/lib/kde4/libexec/klauncher core
and
   bt

to get a backtrace of the crash?
If it's not a crash on exit in XCloseDisplay, I wonder what else can make it crash.
Comment 10 Daniel Hahler 2008-03-15 00:33:31 UTC
There are backtrace available in https://launchpad.net/bugs/141418 (and its duplicates), if that helps to fix it.
Comment 11 George Kiagiadakis 2008-03-18 19:14:10 UTC
David Faure wrote:
> If it's not a crash on exit in XCloseDisplay, I wonder what else can make it crash.

Well, it seems I made a mistake here. It crashes only on logout. The core file isn't useful because I can't make it work with the debugging version of klauncher in /usr/lib/debug/usr/lib/kde4/libexec/klauncher (debian here).

I was mistaken because when I noticed that, klauncher had strangely disappeared from dbus and only the kde3 klauncher was running but it seems that this was not related to the core file and to the message in /var/log/messages. I checked it again and indeed the time of the crash as reported in /var/log/messages is indeed the time I logged out.

I figured all that out bevause during this week although I did get the "KLauncher could not be reached via D-Bus, error when calling start_service_by_desktop_name: empty" bug, klauncher was always available on dbus and no core file was generated during any of my sessions.

Sorry about the false information.
Comment 12 Lubos Lunak 2008-03-27 19:37:06 UTC
*** Bug 158721 has been marked as a duplicate of this bug. ***
Comment 13 Matthew Woehlke 2008-03-27 19:38:46 UTC
I have what seems to be the same problem, except not on logout (logout doesn't seem to work for me, incidentally). This morning I cleaned up several dozen klauncher cores; in just a few hours I have almost two dozen new ones...

Here's the backtrace I get:
#0  XCloseDisplay (dpy=0xda1ff4) at ClDisplay.c:62
#1  0xb7ef6764 in KLauncher::close (this=0xbfe9a4bc) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kinit/klauncher.cpp:234
#2  0xb7ef8e99 in KLauncher::destruct (exit_code=255) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kinit/klauncher.cpp:241
#3  0xb7eff883 in sig_handler (sig_num=15) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kinit/klauncher_main.cpp:44
#4  <signal handler called>
#5  0xb7f06410 in __kernel_vsyscall ()
#6  0x00d3a3cd in poll () from /lib/tls/libc.so.6
#7  0xb649d71f in g_main_context_iterate (context=0x8053278, block=1, dispatch=1, self=0x80502a8) at gmain.c:2979
#8  0xb649dc42 in IA__g_main_context_iteration (context=0x8053278, may_block=1) at gmain.c:2736
#9  0xb7314eca in QEventDispatcherGlib::processEvents (this=0x8050360, flags=@0xbfe9a3cc) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:325
#10 0xb72ddbe0 in QEventLoop::processEvents (this=0xbfe9a44c, flags=@0xbfe9a404) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventloop.cpp:146
#11 0xb72ddd8b in QEventLoop::exec (this=0xbfe9a44c, flags=@0xbfe9a454) at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qeventloop.cpp:197
#12 0xb72e1efa in QCoreApplication::exec () at /usr/local/src/kde/kde-trunk-svn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:838
#13 0xb7eff7ec in kdemain (argc=1, argv=0xbfe9a614) at /usr/local/kde/home/src/kde-trunk-svn/kdelibs/kinit/klauncher_main.cpp:112
#14 0x08048796 in main (argc=Cannot access memory at address 0x4
) at /usr/local/kde/home/build/kde-trunk-svn/kdelibs/kinit/klauncher_dummy.cpp:3

(...looks like the same one in comment 3)
Comment 14 Lubos Lunak 2008-04-02 15:00:40 UTC
SVN commit 792865 by lunakl:

Do not call signal unsafe code in a signal handler.
BUG: 157733



 M  +6 -3      klauncher.cpp  
 M  +3 -1      klauncher.h  
 M  +7 -2      klauncher_main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=792865