Bug 51690

Summary: KMail crashes at startup with SIGSEGV and DCOP error
Product: [Unmaintained] kmail Reporter: Malte J. Wetz <kdebugs>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: cwicke, magaljedi
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Malte J. Wetz 2002-12-09 20:21:45 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.4 
OS:          Linux

Starting KMail brings up the KDE Crash Manager reporting a SIGSEGV (report attached below). If started from a terminal, there is an additional »ERROR: KUniqueApplication: DCOP communication error!« message written before the Crash Manager shows up.
KDE 3.1rc5 compiled without problems from source. Recompiling KMail works fine, but does not solve the problem.
System is Debian Sarge, Kernel 2.4.19, XFree 4.2.1. Any leftovers from previous KDE installations were "hidden" by mv'ing them away, including $KDEHOME.

----- Crash Manager Backtrace -----
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...[New Thread 1024 (LWP 31915)]
(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...0x41323609 in wait4 () from /lib/libc.so.6
#0  0x41323609 in wait4 () from /lib/libc.so.6
#1  0x41398dd0 in __check_rhosts_file () from /lib/libc.so.6
#2  0x411efeeb in waitpid () from /lib/libpthread.so.0
#3  0x40a3c6ba in KCrash::defaultCrashHandler ()
   from /opt/kde3/lib/libkdecore.so.4
#4  0x411eda44 in pthread_sighandler () from /lib/libpthread.so.0
#5  0x412ac518 in sigaction () from /lib/libc.so.6
#6  0x40cbae6b in qt_x11_enforce_cursor () from /usr/local/qt/lib/libqt-mt.so.3
#7  0x40cbc145 in QWidget::create () from /usr/local/qt/lib/libqt-mt.so.3
#8  0x40d56e03 in QWidget::QWidget () from /usr/local/qt/lib/libqt-mt.so.3
#9  0x409c59f8 in KApplication::init () from /opt/kde3/lib/libkdecore.so.4
#10 0x409c4f29 in KApplication::KApplication ()
   from /opt/kde3/lib/libkdecore.so.4
#11 0x40a5458b in KUniqueApplication::KUniqueApplication ()
   from /opt/kde3/lib/libkdecore.so.4
#12 0x081b6a9f in main ()
#13 0x4129c0bf in __libc_start_main () from /lib/libc.so.6
Comment 1 Stephan Kulow 2002-12-09 20:32:33 UTC
Subject: Re:  New: KMail crashes at startup with SIGSEGV and DCOP error

On Montag, 9. Dezember 2002 20:21, Malte J.Wetz wrote:
> #6  0x40cbae6b in qt_x11_enforce_cursor () from
> /usr/local/qt/lib/libqt-mt.so.3

Did you play with your cursors? The DCOP error just means, that
a forked kmail crashes. It must be something about your installation
though.

Greetings, Stephan

Comment 2 Malte J. Wetz 2002-12-09 22:10:49 UTC
On 9 Dec 2002 19:32:34 -0000
Stephan Kulow <coolo@kde.org> wrote:

> On Montag, 9. Dezember 2002 20:21, Malte J.Wetz wrote:
> > #6  0x40cbae6b in qt_x11_enforce_cursor () from
> > /usr/local/qt/lib/libqt-mt.so.3
> 
> Did you play with your cursors?

No. Never ever did that.

> It must be something about your installation though.

Hmm... I can't think of anything beeing so special about my installation. I
tried using the original XF86Config-4 created by debconf and removed the
installed but not yet used liquid theme, but that did not help either.

OTOH, I did not change anything except KDE itself and never had a problem like
this with any other version KDE (2.2, 3.0.0-3.0.3, 3.1beta2 and 3.1rc3) on this
machine. Could it be some bug triggered by anything here?

Anything I could try to track down this one? I did a 'strace -f' on kmail but I
do not see anything obvious. 

##### begin trace.log #####
[...]
6804  munmap(0x4023e000, 4096)          = 0
6804  write(5, "\0\7\1\0\5\0\0\0\1\0\0\0(\0\0\0\4\0XSMP)\10\3\0MIT\0\0"..., 48) = 48
6804  read(5, "\0\10\0\1\2\0\0\0", 8)   = 8
6804  read(5, "\3\0KDE\0\0\0\3\0001.0\0\0\0", 16) = 16
6804  write(5, "\1\1\1\0\1\0\0\0\0\0\0\0(\0\0\0", 16) = 16
6804  read(5, "\1\2\0\1\6\0\0\0", 8)    = 8
6804  read(5, "%\0\0\00011c0a8010a000103946736300000"..., 48) = 48
6804  pipe([6, 7])                      = 0
6804  ioctl(6, 0x541b, [0])             = 0
6804  write(7, "\0", 1)                 = 1
6804  ioctl(6, 0x541b, [1])             = 0
6804  rt_sigaction(SIGSEGV, {0x411f2970, [SEGV], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
6804  rt_sigaction(SIGFPE, {0x411f2970, [FPE], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
6804  rt_sigaction(SIGILL, {0x411f2970, [ILL], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
6804  rt_sigaction(SIGABRT, {0x411f2970, [ABRT], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
6804  rt_sigprocmask(SIG_UNBLOCK, [ILL ABRT FPE SEGV], NULL, 8) = 0
[...]
##### end trace.log #####

Comment 3 Stephan Kulow 2002-12-09 22:15:05 UTC
Subject: Fwd: Re:  KMail crashes at startup with SIGSEGV and DCOP error

----------  Forwarded Message  ----------

Subject: Re: [Bug 51690] KMail crashes at startup with SIGSEGV and DCOP error
Date: Montag, 9. Dezember 2002 22:14
From: Stephan Kulow <coolo@kde.org>
To: kmail@mail.kde.org

On Montag, 9. Dezember 2002 22:10, Malte J.Wetz wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=51690
>
>
>
>
> ------- Additional Comments From kdebugs@malte-wetz.de  2002-12-09 22:10
> ------- On 9 Dec 2002 19:32:34 -0000
>
> Stephan Kulow <coolo@kde.org> wrote:
> > On Montag, 9. Dezember 2002 20:21, Malte J.Wetz wrote:
> > > #6  0x40cbae6b in qt_x11_enforce_cursor () from
> > > /usr/local/qt/lib/libqt-mt.so.3
> >
> > Did you play with your cursors?
>
> No. Never ever did that.
>
> > It must be something about your installation though.
>
> Hmm... I can't think of anything beeing so special about my installation. I
> tried using the original XF86Config-4 created by debconf and removed the
> installed but not yet used liquid theme, but that did not help either.
>
> OTOH, I did not change anything except KDE itself and never had a problem
> like this with any other version KDE (2.2, 3.0.0-3.0.3, 3.1beta2 and
> 3.1rc3) on this machine. Could it be some bug triggered by anything here?
>
> Anything I could try to track down this one? I did a 'strace -f' on kmail
> but I do not see anything obvious.

The strace won't help you much. You need to pass --nofork to kmail to get
_any_ useful output.

Greetings, Stephan

-------------------------------------------------------

Comment 4 Malte J. Wetz 2002-12-09 23:20:04 UTC
> The strace won't help you much. You need to pass --nofork to kmail to get
> _any_ useful output.

Hmm...ok. I thought strace's »-f« switch would do the same.

Since I am not sure that I'm appending the relevant part (only pasted the
section containing the first SIGSEGV) and do not want to send the entire trace
(~3000 lines) either, I put the entire output of »strace -o trace.log kmail
--nofork« here: http://www.mathematik.uni-marburg.de/~wetzmj/files/trace.log

As a wild guess, I recompiled QT, but it did not help.

Perhaps it is interesting that I just found out that kile[1] 1.31 has the same
"bug". All other KDE applications I tried so far are working fine. Is there
anything special about kmail and kile that other KDE-Applications do not have?

[1] http://perso.club-internet.fr/pascal.brachet/kile/
Comment 5 Stephan Kulow 2002-12-10 09:11:25 UTC
Subject: Re:  KMail crashes at startup with SIGSEGV and DCOP error

Am Montag, 9. Dezember 2002 23:20 schrieb Malte J.Wetz:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=51690
>
>
>
>
> ------- Additional Comments From kdebugs@malte-wetz.de  2002-12-09 23:20
> -------
>
> > The strace won't help you much. You need to pass --nofork to kmail to get
> > _any_ useful output.
>
> Hmm...ok. I thought strace's »-f« switch would do the same.
>
> Since I am not sure that I'm appending the relevant part (only pasted the
> section containing the first SIGSEGV) and do not want to send the entire
> trace (~3000 lines) either, I put the entire output of »strace -o
> trace.log kmail --nofork« here:
> http://www.mathematik.uni-marburg.de/~wetzmj/files/trace.log
>
> As a wild guess, I recompiled QT, but it did not help.
>
> Perhaps it is interesting that I just found out that kile[1] 1.31 has the
> same "bug". All other KDE applications I tried so far are working fine. Is
> there anything special about kmail and kile that other KDE-Applications do
> not have?
>
> [1] http://perso.club-internet.fr/pascal.brachet/kile/

No idea. Perhaps when you compile qt with debug you get some more infos
out of it, but it's definitly no kmail bug

Greetings, Stephan

Comment 6 Maksim Orlovich 2003-02-14 21:23:41 UTC
*** Bug 54652 has been marked as a duplicate of this bug. ***
Comment 7 Maksim Orlovich 2003-02-14 21:24:41 UTC
*** Bug 54649 has been marked as a duplicate of this bug. ***
Comment 8 Christian Wicke 2003-03-23 13:58:58 UTC
I have the same problem with KDE 3.1 (KMail 1.5) and Debian woody. My backtrace 
looks similar. 
 
I don't know if it has something to do with it: 
I have two IMAP-Accounts stored on a very weak server using uw-imapd. 
After couple tries Kmail manages to start. 
When cancel both password on startup KMail does not crash. 
If I only cancel one password KMail still crashes 
If I cancel the passwords first and open the mailboxes later KMail never crashed. 
Maybe Kmail has a problem with slow response from IMAP-Server on startup. 
 
Christian 
 
Backtrace: 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...[New Thread 1024 (LWP 3108)] 
(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...0x412eaa59 in wait4 () from /lib/libc.so.6 
#0  0x412eaa59 in wait4 () from /lib/libc.so.6 
#1  0x41361e48 in __check_rhosts_file () from /lib/libc.so.6 
#2  0x411ad453 in waitpid () from /lib/libpthread.so.0 
#3  0x409976ea in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4 
#4  0x411aaf54 in pthread_sighandler () from /lib/libpthread.so.0 
#5  0x412736b8 in sigaction () from /lib/libc.so.6 
#6  0x080cb819 in KDialog::marginHint () 
#7  0x080ca861 in KDialog::marginHint () 
#8  0x0808f4bb in KDialog::marginHint () 
#9  0x0808c5a7 in KDialog::marginHint () 
#10 0x08170cd1 in KDialog::marginHint () 
#11 0x08173b74 in KDialog::marginHint () 
#12 0x08175110 in KDialog::marginHint () 
#13 0x409ab96d in KUniqueApplication::processDelayed () 
   from /usr/lib/libkdecore.so.4 
#14 0x409abcbb in KUniqueApplication::qt_invoke () 
   from /usr/lib/libkdecore.so.4 
#15 0x40ccaef9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3 
#16 0x40f2ba93 in QSignal::signal () from /usr/lib/libqt-mt.so.3 
#17 0x40ce05b5 in QSignal::activate () from /usr/lib/libqt-mt.so.3 
#18 0x40ce5a63 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3 
#19 0x40c78b53 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3 
#20 0x40c78954 in QApplication::notify () from /usr/lib/libqt-mt.so.3 
#21 0x4093848a in KApplication::notify () from /usr/lib/libkdecore.so.4 
#22 0x40c5b383 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3 
#23 0x40c3d37c in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 
#24 0x40c8a31e in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 
#25 0x40c8a27b in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 
#26 0x40c78caa in QApplication::exec () from /usr/lib/libqt-mt.so.3 
#27 0x08175fe2 in KDialog::marginHint () 
#28 0x4126314f in __libc_start_main () from /lib/libc.so.6 
 
Comment 9 Zack Rusin 2003-03-23 19:29:21 UTC
Both of those backtraces are pretty much useless. If either of you guys can compile KMail with 
debugging output we might do something about this bug in other cases it will be impossible. 
Comment 10 Christian Wicke 2003-04-08 19:37:08 UTC
I tried to compile the kmail debian sources, but apt-get couldn't download automake1.6 
which is needed to build kmail: 
 
speedy:/home/christian# apt-get build-dep kdenetwork 
Reading Package Lists... Done 
Building Dependency Tree... Done 
Package automake1.6 has no available version, but exists in the database. 
This typically means that the package was mentioned in a dependency and 
never uploaded, has been obsoleted or is not available with the contents 
of sources.list 
Sorry, debhelper is already the newest version. 
The following NEW packages will be installed: 
  alsa-headers gettext gettext-el kdelibs4-dev libart-2.0-dev libarts1-dev libartsc0-dev 
libasound2-dev libaudiofile-dev libcupsys2-dev 
  libfam-dev libfreetype6-dev libglib2.0-dev libjpeg62-dev liblcms-dev libmad0-dev 
libmng-dev libogg-dev libpcre3-dev libpng-dev 
  libqt3-headers libqt3-mt-dev libslp-dev libvorbis-dev nas-dev pkg-config qt3-dev-tools 
xlibmesa-dev xlibs-dev zlib1g-dev 
0 packages upgraded, 30 newly installed, 0 to remove and 0  not upgraded. 
E: Package automake1.6 has no installation candidate 
E: Failed to process build dependencies 
 
Has anyone an idea how to solve this? 
Comment 11 Christian Wicke 2003-05-27 13:32:29 UTC
Hello, 
 
since I updated to KDE 3.1.2 and KMail 1.5.2 I could not reproduce this error again. I 
tried at least 20 times. 
 
Christian 
Comment 12 Stephan Kulow 2003-05-27 13:39:48 UTC
hoping it's the same for Malte meanwhile  
Comment 13 Malte J. Wetz 2003-05-27 14:24:09 UTC
I think I got it. After trying different versions of QT and KDE, I think the 
problem was somehow related with qt libraries and/or includes from debian. 
I got the idea from a HOWTO from Ralf Nolden that describes the 
installation of his KDE packages for Woody, where he says that you have 
to purge all conflicting libs before installing them. 
 
So, using apt-get remove --purge, I removed all libqt* packages (and by 
that, of course, anything that depends on them). I did the same for all 
libpng* packages and reinstalled only one version (libpng3) with its -dev 
pendant. If anyone with this problem doesn't use Debian: Just get 
_completely_ rid of _all_ versions of QT, KDE and libpng _anywhere_ on 
your system. Even if it means you have to deinstall a bunch of apps that 
depend on them. You probably can also only remove the libs and leave the 
apps installed, but that will break the integrity of your package 
dependencies - which I was afraid of. Then install latest version of libpng 
and libpng-dev available for that system. 
 
Then I recompiled QT and KDE completely from sources. Now it works, with 
any version of KDE. So I guess it was a weird header mismatch from some 
libfoo-dev package. Meanwhile I have done apt-get update && apt-get 
upgrade several times and switched from Sarge to Sid. Somewhere 
inbetween, I were even able to reinstall the libqt/libpng-packages and the 
qt/png-dependant applications again without having any problem. Either 
because none of them requires a -dev package or because whatever 
caused the trouble has been changed in the package repository. 
 
As a final test, I compiled KDE 3.1.2 last friday (_with_ parallel installations 
of libqt and libpng) and until now, everything seems fine. 
 
I hereby declare KMail free of any accusations! :)