Bug 174866 - Crash after reading index with serialnumber == 0
Summary: Crash after reading index with serialnumber == 0
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: index (show other bugs)
Version: SVN trunk (KDE 4)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
: 175207 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-11 14:19 UTC by Gualter Barbas Baptista
Modified: 2011-05-07 19:39 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: kdepim 4.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gualter Barbas Baptista 2008-11-11 14:19:00 UTC
Version:           4.1.3 (using Devel)
OS:                Linux
Installed from:    Compiled sources

Kmail/KDEPIM 4.1.3 crash on startup, with the following message:
ASSERT: "msn != 0" in file /tmp/buildd/kdepim-4.1.3/kmail/kmmsgdict.cpp, line 476
<unknown program name>(4497)/: Communication problem with  "kmail" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" " 

KCrash: Application 'kmail' crashing...

Application: KMail (kmail), signal SIGABRT
(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)
[Thread debugging using libthread_db enabled]
[New Thread 0x7fb36b24a6f0 (LWP 4498)]
(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)
(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)
(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)
[KCrash handler]
#5  0x00007fb36827ded5 in raise () from /lib/libc.so.6
#6  0x00007fb36827f3f3 in abort () from /lib/libc.so.6
#7  0x00007fb3696785a5 in qt_message_output () from /usr/lib/libQtCore.so.4
#8  0x00007fb3696786e7 in qFatal () from /usr/lib/libQtCore.so.4
#9  0x00007fb36aa11a88 in ?? () from /usr/lib/libkmailprivate.so.4
#10 0x00007fb36aa17120 in ?? () from /usr/lib/libkmailprivate.so.4
#11 0x00007fb36a9ee9d1 in ?? () from /usr/lib/libkmailprivate.so.4
#12 0x00007fb36aa39813 in ?? () from /usr/lib/libkmailprivate.so.4
#13 0x00007fb36aa39570 in ?? () from /usr/lib/libkmailprivate.so.4
#14 0x00007fb36aa3e0b8 in ?? () from /usr/lib/libkmailprivate.so.4
#15 0x00007fb36aa3e46f in ?? () from /usr/lib/libkmailprivate.so.4
#16 0x00007fb36ab1d8cd in KMKernel::init () from /usr/lib/libkmailprivate.so.4
#17 0x0000000000402f43 in _start ()
#0  0x00007fb3682e9fc0 in nanosleep () from /lib/libc.so.6
Comment 1 Pino Toscano 2008-11-11 21:48:17 UTC
Hi Gualter,

unfortunately, the backtrace you posted is not much useful.
You can get a more detailed one by following the instructions on the following page:
http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports

Thanks!
Comment 2 Gualter Barbas Baptista 2008-11-19 17:14:22 UTC
Ok, sorry for the useless backtrace. Here is a proper one:

Application: KMail (kmail), signal SIGABRT
[Thread debugging using libthread_db enabled]
[New Thread 0x7f367c1c46f0 (LWP 19444)]
[KCrash handler]
#5  0x00007f36791f7ed5 in raise () from /lib/libc.so.6
#6  0x00007f36791f93f3 in abort () from /lib/libc.so.6
#7  0x00007f367a5f25a5 in qt_message_output (msgType=QtFatalMsg, 
    buf=<value optimized out>) at global/qglobal.cpp:2102
#8  0x00007f367a5f26e7 in qFatal (msg=<value optimized out>)
    at global/qglobal.cpp:2303
#9  0x00007f367b98ba88 in KMMsgDict::readFolderIds (this=0x1169d20, 
    storage=@0x12eb5a0) at /tmp/buildd/kdepim-4.1.3/kmail/kmmsgdict.cpp:476
#10 0x00007f367b991120 in FolderStorage::readFolderIdsFile (this=0x12eb5a0)
    at /tmp/buildd/kdepim-4.1.3/kmail/folderstorage.cpp:1000
#11 0x00007f367b9689d1 in KMFolder (this=0x1309290, aParent=0x14b9390, 
    aFolderName=@0x7fff84312670, aFolderType=<value optimized out>, 
    withIndex=<value optimized out>, exportedSernums=<value optimized out>)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfolder.cpp:146
#12 0x00007f367b9b3813 in KMFolderDir::reload (this=0x14b9390)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfolderdir.cpp:288
#13 0x00007f367b9b3570 in KMFolderDir::reload (this=0x13c4a18)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfolderdir.cpp:299
#14 0x00007f367b9b80b8 in KMFolderMgr::setBasePath (this=0x13c4a00, 
    aBasePath=@0x7fff84313050)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfoldermgr.cpp:163
#15 0x00007f367b9b846f in KMFolderMgr (this=0x13c4a00, 
    aBasePath=@0x7fff84313050, dirType=KMDImapDir)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmfoldermgr.cpp:44
#16 0x00007f367ba978cd in KMKernel::init (this=0x7fff843131d0)
    at /tmp/buildd/kdepim-4.1.3/kmail/kmkernel.cpp:1419
#17 0x0000000000402f43 in main (argc=<value optimized out>, 
    argv=<value optimized out>) at /tmp/buildd/kdepim-4.1.3/kmail/main.cpp:128
#0  0x00007f3679263fc0 in __nanosleep_nocancel () from /lib/libc.so.6
Comment 3 Jaime Torres 2008-11-19 17:37:34 UTC
I think the Q_ASSERT (msn != 0) should be Q_ASSERT(msn==0) in kmail/kmmsgdict.cpp:476.

Comment 4 Thomas McGuire 2008-11-19 18:43:11 UTC
> I think the Q_ASSERT (msn != 0) should be Q_ASSERT(msn==0) in kmail/kmmsgdict.cpp:476.

No, that assert is correct, serial number == zero is not allowed, as the comment explains.
Comment 5 Thomas McGuire 2008-11-19 18:47:07 UTC
SVN commit 886618 by tmcguire:

Serial numbers are unsigned long, not quint32.
This is the only possible reason I could imagine why it goes wrong like in bug 174866.

It would also explain why I never could reproduce this with my 32 bit CPU.
Maybe this even is the real root cause for the serial number == 0 bug??
In any case, I hope other places get the type right.

BUG: 174866


 M  +1 -1      kmmsgdict.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=886618
Comment 6 Thomas McGuire 2008-11-20 17:49:31 UTC
Reopening, I've just revert this as it was causing additional crashes on 64 bit systems.
Comment 7 Jaime Torres 2008-11-26 12:37:49 UTC
*** Bug 175207 has been marked as a duplicate of this bug. ***
Comment 8 Gualter 2009-02-04 14:07:41 UTC
I had this issue happening on another computer (also 64 bit), which has a similar configuration. I suspect it has to do with IMAP accounts. Kmail suddenly stopped starting after a crash.

I was searching into the kmail share folder and found out some suspect files. I deleted them and after this, it was again working normally. The files were:
~/.kde4/share/apps/kmail/:
unfiltered.13219272  unfiltered.1395695691  unfiltered.378008110

~/.kde4/share/apps/kmail/imap/:
13219272  1395695691  378008110

The ones inside imap have 0 bytes. The unfiltered ones only contain:
unfiltered=

And nothing else.

Hope this helps to fix the issue.

And, i
Comment 9 Gualter Barbas Baptista 2009-02-06 19:48:42 UTC
The error is recurrent, also on KDE 4.2.0/Kmail 1.11.0.

I cannot start Kmail or Kontact after a crash.

The crashes are quite frequently happen when I delete messages from the IMAP server, so this is quite an annoying bug. Also, sometimes deleting the files I mentioned above does not work, as Kmail starts, but crashes immediately after. The only way to solve is to delete the whole IMAP tree (one of them, which is the main account with quite a lot of e-mails and folders) at .kde4/share/apps/kmail/imap/.xxxxxxxx.directory
Comment 10 roland 2009-07-05 22:03:00 UTC
Both times this happened to me, I was moving a folder after having read some email in the inbox.  The one time my inbox was still there after this error, the message I read prior to moving the folder was marked as unread.  

Threads are what you get when you don't get a real operating system to work with.
Comment 11 Jonathan Kolberg 2011-05-05 15:41:27 UTC
Hasn’t happend to me with KDEPIM 4.6 beta 5
Comment 12 Christophe Marin 2011-05-07 18:43:32 UTC
Shouldn't happen anymore with the akonadi-pop3 resource.

Fixed in kdepim 4.6
Comment 13 Christophe Marin 2011-05-07 19:39:44 UTC
(In reply to comment #12)
> Shouldn't happen anymore with the akonadi-pop3 resource.

corr: Shouldn't happen anymore with the akonadi* resources.