Bug 63218 - Index corruption should not prevent kmail from running
Summary: Index corruption should not prevent kmail from running
Status: RESOLVED DUPLICATE of bug 71549
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 46170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-25 06:57 UTC by James Jude
Modified: 2007-09-14 12:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
corrupted index file for test (58 bytes, application/octet-stream)
2004-11-30 22:51 UTC, luci
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Jude 2003-08-25 06:57:07 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Mandrake RPMs
OS:          Linux

Occasionally, kmail's index files get corrupted.  Apparently, this happens when kmail is not
exited properly.

When the index files are corrupted, kmail will either not start, or will list "Unknown Subject"
on messages.  The fix is to remove all of the index files, and let kmail recreate them.

This is not acceptable behaviour for a modern application.  X servers crash.  Laptops run out
of power.  Hardly anybody uses the Ext2 filesystems anymore, because of the risk of filesystem
corruption.

kmail should either be tolerant of corrupted index files, or should frequently write the
indices out to disk.
Comment 1 Jochen Pietz 2004-09-10 01:09:34 UTC
Similar behavior on my system.

On the terminal I got the following messages:

[...]
QGArray::at: Absolute index 893339920 out of range
QGArray::at: Absolute index 893339924 out of range
QGArray::at: Absolute index 893339928 out of range
QGArray::at: Absolute index 893339932 out of range
[...]

After deleting index files kmail can be restarted without any problems.

KDE Version
1.6.2 (KDE 3.2.1, SuSE)

Application
E-Mail Client

Operating System
Linux (i686) release 2.6.4-52-default

Compiler
gcc version 3.3.3 (SuSE Linux)

Comment 2 illogic-al 2004-11-30 22:37:32 UTC
*** Bug 46170 has been marked as a duplicate of this bug. ***
Comment 3 luci 2004-11-30 22:51:49 UTC
Created attachment 8497 [details]
corrupted index file for test

You can test this corrupted file (which appeared here on my box) if it crashes
your KMail when starting.
To do so, backup your ~/.Mail folder and rename this file to some existing
*.index.ids there.
If you edit this corrupted file and replace one of the duplicated '#
KMail-Index-IDs V1002
*xV4^R' string, it should start KMail and recreate this *.index.ids file
correctly.
Comment 4 luci 2004-11-30 23:00:53 UTC
i confirm and second the idea that corrupted index file shouldn't prevent KMail from starting without trying to repair the corrupted file. there could be some check for corrupted index files at the time of starting KMail and when the possibly corrupted file is found, report about it and recreate the index file automagically or at least give the option in a dialog with explanation.

the crash experienced on Mandrake Linux 9.2 with KMail from KDE 3.2.1
Comment 5 illogic-al 2004-12-01 11:08:30 UTC
I can confirm using the provided file and kde 3.3.1.
I can also provide a backtrace (but not right now since reproducing causes X to freeze during or shortly after the backtrace creation) Stupid xorg. 
Once I "fix" it I'll attach a backtrace. luci if you can provide one too it may be useful. 
I also got similar messages to those in comment no.1. Also there was a dialog box which popped up in front of kmail shortly before it crashed. It said something about the index files being out of date. but the dialog never got to fully appear since KMail will crash.
Comment 6 illogic-al 2004-12-01 11:18:04 UTC
http://bugs.kde.org/show_bug.cgi?id=82455 may be related to my X freezing problems. 
bug 82455 points to bug 82456 which points to bug 70406.
The bactraces also look similar to the ones I was getting before X freeze. 

*** This bug has been marked as a duplicate of 70406 ***
Comment 7 Vedran Ljubovic 2004-12-01 16:53:08 UTC
I would kindly ask to reopen this bug.

Bug 70406 is about one particular crash that can be resolved with one particular conditional statement.

This is a wish asking for automatic regeneration of index files e.g. if kmail.pid is detected and no other instance of kmail is running then regenerate index files for the top-level folders (more discussion in bug 46170). Historically there were several bug reports and wishes asking for this very thing that were closed as duplicates of something unrelated. If you disagree then please allow a new wish to be registered.
Comment 8 Charlie Pearce 2004-12-28 20:41:09 UTC
As an additional note, I too am getting this error and am currently hoping it will run itself through. I am using the default install of kde 3.2.3 and KMail 1.7.1 which comes with Mandrake 10.1 official.

My system defiantly went down for an unclean reboot a couple days ago, due to a sudden power cut. I also done a complete fschk at start up which had to recover the file system and reboot. I then found this problem with KMail, so I guess it's due to corrupted index files.


What I'm getting is very similar Bug 71549: QGArray::at: Absolute index out of range.

Sorry if I have not placed enough details, but I have never posted here before. I would just like to let it known that this bug/oversight is a REAL issue for normal end-users like myself.
Comment 9 Gregor B. Rosenauer 2007-04-01 12:29:58 UTC
After KMail crashed, I got the same problem with KDE 3.5.6/KMail 1.9.6, which is still unresolved - KMail says "Initializing" and then crashes with:
QGArray::at: Absolute index 0 out of range

Also, deleting the index files did not help, I had to create a fresh mail-dir and migrate my old mail by importing it to the new location.

This bug is now almost 4 years old... I'd be happy to give feedback and test patches/bugfixes to solve this issue.
Comment 10 Gregor B. Rosenauer 2007-04-01 12:44:29 UTC
addendum: platform not limited to Mandrake/RPM, running Ubuntu 6.10 Edgy x86 with official Ubuntu(Debian)-packages.
Comment 11 Martin Koller 2007-04-08 22:38:48 UTC

*** This bug has been marked as a duplicate of 71549 ***