KMail has vanished! Unable re-open after crash. Akonadi, Nepomuk not registered at D-Bus.

Hi, folks! Our KMail has crashed disastrously during requisite reconfiguration and tweaking of one of our existing webmail accounts. We use KMail 4.4.10-3.2-x86_64 as packaged within openSuSE 11.4. I have tried several times to reopen it via the application launcher, but receive only a KDE Crash Handler notification, which reports as follows:─

**
Details:** 
Executable: kmail PID: 11458 Signal: Segmentation fault (11)
**Developer information:**
The generated crash information is useful:─
Application: KMail (kmail), signal: Segmentation fault
[KCrash Handler]
#6 0x00007f3e4f678199 in KMailICalIfaceImpl::readConfig (this=0x6a77f0) at /usr/src/debug/kdepim-4.4.10/kmail/kmailicalifaceimpl.cpp:1785
#7 0x00007f3e4f575ade in KMKernel::setupDBus (this=0x7fff0fa563a0) at /usr/src/debug/kdepim-4.4.10/kmail/kmkernel.cpp:227
#8 0x00000000004033a8 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kdepim-4.4.10/kmail/main.cpp:141

[size=2]My attempting to restart from the Crash Handler merely triggers a KMail warning message: “[/size]KMail seems already to be running on another display on this machine. Running KMail more than once can cause the loss of mail. You should not start KMail unless you are sure that it is not running already.”

Absolutely certain it is not running already, I press Start KMail, but immediately I am back again to the selfsame KDE Crash Handler notification!

Thus, in a quick follow-up to this posting (on account of this site’s 15,000-character posting restriction), I shall be appending an Akonadi Server Self-Test Report, which I trust will provide sufficient information to enable some kind knowledgeable folks to please guide me step-by-step in my endeavour restore our crashed KMail programme. I have been using Linux for seven years, but realise full well I have yet [size=2]much to learn; and am most keen so to do! Many thanks, fellow penguins!

MagnifiKat[/size]

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

Siemens “Esprimo” P5616 desktop | Fujitsu D2461-A12 micro-BTX mobo |
KDE 4.6.00 (4.6.0) “release 6” | Linux 2.6.37.6-24-desktop x86_64 |
AMD Athlon 64 X2 4600+ 2·4GHz dual-core CPU | DVD SuperMulti |
8GB DDR2-800MHz dual-channel RAM | nVidia MCP51 Ethernet |
nVidia GeForce 7300LE 256MB TrueMemory | openSuSE 11.4 (X86-64) |

Apparently it crashes in KMailICalIfaceImpl::readConfig, so it seems your configuration has been corrupted.

I would first try to start it as a new user to rule out any installation problem. (should work I suppose)

Then we have to find out which file is corrupted and fix it if possible or remove it.
But try as a new user first.

My attempting to restart from the Crash Handler merely triggers a KMail warning message: “[/FONT]KMail seems already to be running on another display on this machine. Running KMail more than once can cause the loss of mail. You should not start KMail unless you are sure that it is not running already.”

Absolutely certain it is not running already, I press Start KMail, but immediately I am back again to the selfsame KDE Crash Handler notification!

Of course it is running already, as the crash reporter captures it running in gdb to present you the backtrace.

Thus, in a quick follow-up to this posting (on account of this site’s 15,000-character posting restriction), I shall be appending an Akonadi Server Self-Test Report, which I trust will provide sufficient information to enable some kind knowledgeable folks to please guide me step-by-step in my endeavour restore our crashed KMail programme.

No, that wouldn’t help at all.
KMail 4.4.10 as included in openSUSE 11.4 did not use Akonadi yet.

But hasn’t there been an update to 4.4.11.1 for 11.4?
(I seem to remember that, or was that for 12.1? It has been a while… )

Hi, wolfi323. Thank you for your prompt, kind and helpful response.

Yes, most likely cause of this crash was my having erroneously changed .mai****ldir to .mbox setting (as a test) when reconfiguring a particularly problematic webmail account within KMail. Unfortunately, I cannot remember in which of four possible system settings ── Appearance, Composer, Security, Miscellaneous ── my wrongly-set .maildir or .mbox options were located; and, of course, I have no way presently of opening KMail in order to check!

I would first try to start it as a new user to rule out any installation problem. (should work I suppose)

Yes, this I shall do if need be; but, given that KMail has been running well since I installed openSuSE 11.4 in November 2011, installation, clearly, is not a problem.

Thus, in a quick follow-up to this posting (on account of this site’s 15,000-character posting restriction), I shall be appending an Akonadi Server Self-Test Report, which I trust will provide sufficient information to enable some kind knowledgeable folks to please guide me step-by-step in my endeavour restore our crashed KMail programme.

[QUOTE]No, that wouldn’t help at all.
KMail 4.4.10 as included in openSUSE 11.4 did not use Akonadi yet.
[/QUOTE]
Er, what?!! Then how come I have before me an A4 printout of a post-crash Akonadi Server Self-Test Report? Test #9, in particular, reads as follows:─


  **Test 9:  SUCCESS**
  **-----------------**
  **akonadictl found and usable**
  Details: The program '/usr/bin/akonadictl' to control the Akonadi server was found
  and could be executed successfully.
  Result:
  Akonadi 1.5.0

Referring again to my post-crash Akonadi printout, errors show up on Tests #2, 10, 11, 12, 14, 15 and 16. I am puzzled especially by Test #2, which states that Akonadi was started as root! Whereas, BEFORE the KMail crash, earlier Akonadi printouts show clearly that Akonadi was NOT then running as root! Very strange indeed!

Again, KMail 4.4.10 DOES NOT use Akonadi yet! That doesn’t mean that Akonadi is not installed/running of course.
Akonadi was already part of 11.4, and KAddressbook already used it in 11.4.

But your problem is definitely not related to Akonadi.

Well, if you rename the KMail configuration (~/.kde4/share/config/kmailrc) it should start again.
But you would have to reconfigure everything from scratch then (your accounts, all filters, maybe the folder where your EMail is located).

According to your crash report, KMail apparently crashes when it tries to read in the accounts settings, so have a look at those.
Maybe post the file (you can omit the passwords of course, but they should be unreadable anyway), perhaps I can spot the problem.

Obviously, since this would be immensely time-consuming, and before so doing, I would prefer firstly to consider any and all other possible options!

According to your crash report, KMail apparently crashes when it tries to read in the accounts settings, so have a look at those. Maybe post the file (you can omit the passwords of course, but they should be unreadable anyway), perhaps I can spot the problem.

Carefully, on-screen, I have looked through the 104 pages of ~/.kde4/share/config/kmailrc, as per your kind suggestion, in search of a likely configuration error. I have copied just [size=2]TWO tiny sections which may or may not be of help to you in your diagnosis.[/size]

Thus, in the panel below, in red, I have highlighted a possible error ── default-mailbox-format=0 ── which surely instead should read: default-mailbox-format=1 ??? Could this be the problem area, I wonder? The consequence of my having erroneously changed the **.maildir **to .mbox (or vice versa??) setting, perhaps? Please advise.

~/.kde4/share/config/kmailrc
 kmailrc – Kwrite ]

$Version]
update_info=mailtransports.upd:initial-kmail-migration,kmail.upd:1,kmail.upd:4,kmail.upd:5,kmail.upd:6,kmail.upd:7,kmail.upd:8,kmail.upd:9,kmail.upd:3.1-update-identities,kmail.upd:3.1-use-identity-uoids,kmail.upd:3.1-new-mail-notification,kmail.upd:3.2-update-loop-on-goto-unread-settings,kmail.upd:3.1.4-dont-use-UOID-0-for-any-identity,kmail.upd:3.2-misc,kmail.upd:3.2-moves,kmail.upd:3.3-use-ID-for-accounts,kmail.upd:3.3-update-filter-rules,kmail.upd:3.3-move-identities-to-own-file,kmail.upd:3.3-misc,kmail.upd:3.3b1-misc,kmail.upd:3.4,kmail.upd:3.4a,kmail.upd:3.4b,kmail.upd:3.4.1,kmail.upd:3.5.4,kmail.upd:3.5.7-imap-flag-migration,kmail.upd:4.0-misc,kmail.upd:4.2,kmail.upd:3.3-aegypten-kpgprc-to-kmailrc

 [General]
 Default domain=
 Recent Addresses= *(A very long and confidential list [size=1]which is irrelevant[size=1] for this posting[/size][/size])*
 SystemTrayEnabled=true
 SystemTrayPolicy=ShowAlways
 beep-on-mail=true
 checkmail-startup=true
 confirm-before-empty=true
 customDateFormat=ddd-dd-MMM-yyyy     hh:mm     Z
 dateFormat=5
 **default-mailbox-format=0**
 empty-trash-on-exit=false
 filters=13
 first-start=false
 folders$e]=**$HOME/.kde4/share/apps/kmail/mail**
 messagetags=3
 mime-header-count=0
 myMessageIdSuffix=
 popfilters=0
 popshowDLmsgs=false
 previous-version=1.13.6
 startupFolder=inbox
 useCustomMessageIdSuffix=false
 

 [Geometry]

Your kind help in this matter is very, very much appreciated.

Yes, “default-mailbox-format=1” sets the default format to maildir.
So try to change that back. But I’m not sure whether this could cause the crash. (obviously is shouldn’t, but maybe 4.4.10 had a bug regarding this, who knows? I don’t have KMail 4.4 here any more)

I will have to take a deeper look at the source code to get a better idea what could cause this crash, but that might take a while.

Thank you for confirming my belief that default-mailbox-format=1 sets the default format to maildir. I am most hopeful therefore that, if I change the “=0” to read “=1”, as per your kind suggestion, KMail may reappear magically … just as it was before it crashed.

Perhaps, wolfi323 ── to safeguard against any likelihood of my making an horrendous mistake in the Konsole terminal ── you will be so kind as to advise the exact command-line coding I should enter to enable me do this successfully. Many thanks indeed. — MagnifiKat.

make a backup of the file just in case you need to revert

Hi, gogalthorp! As per your wise suggestion, and lest I have need to undo upcoming action, I have copied successfully the ~/.kde4/share/config/kmailrc file to another temporary location (Documents), pending my being provided, please, needful command-line coding guidance as requested in my post #7. Many thanks.

MagnifiKat

Sorry can’t help with that just wanted to make sure you had you life vest on :wink:

You want “coding guidance” for what exactly?
For changing kmailrc?

Just open it in a text editor (kwrite f.e.) and change that line accordingly. No need for “coding guidance”… :wink:

But I have no idea whether this helps.

I haven’t looked at the source code yet, I somehow thought you tried that already and it works again now.
Has to wait until tomorrow though, it’s time to go to bed here.

Thanks for your helpful advice. Actually, I have never had any prior need to use the KWrite text editor; but, nevertheless, found it very straightforward to open the kmailrc file and to change the default-mailbox-format from “=0” to “=1”; to save the file; and thereupon to reboot the PC.

However, I regret KMail has NOT reappeared, as I had been hoping; nor did a further reboot make any difference. But one positive sign after both restarts has been the return of the opening KDE welcome-and-start tune, which had been missing ever since KMail crashed! So at least something positive seems to be happening under the bonnet!

I have tried opening KMail via the application launcher, but to no effect. All that happens is that I receive another almost identical KDE Crash Handler notification, as follows:─

**Developer information:** 
The generated crash information is useful:─ Application: KMail (kmail), signal: Segmentation fault
  [KCrash Handler]
  #6  0x00007f127ca92199 in KMailICalIfaceImpl::readConfig (this=0x6a7e60) at /usr/src/debug/kdepim-4.4.10/kmail/kmailicalifaceimpl.cpp:1785
  #7  0x00007f127c98fade in KMKernel::setupDBus (this=0x7fff86dc83d0) at /usr/src/debug/kdepim-4.4.10/kmail/kmkernel.cpp:227
  #8  0x00000000004033a8 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kdepim-4.4.10/kmail/main.cpp:141

I am wondering whether there is now a conflict between my two kmailrc files: namely, the ORIGINAL, since edited back to the requisite “=1” format … and … my COPY file (temporarily in Documents) still showing the erroneous “=0”. Is openSuSE 11.4 trying now to read BOTH files?

I doubt that this is related.
KDE does not even look at the kmailrc file, only kmail does.

I am wondering whether there is now a conflict between my two kmailrc files: namely, the ORIGINAL, since edited back to the requisite “=1” format … and … my COPY file (temporarily in Documents) still showing the erroneous “=0”. Is openSuSE 11.4 trying now to read BOTH files?

No. Your copy in Documents is just being ignored.

Well, I found those bug reports which are about the same crash:
https://bugs.kde.org/show_bug.cgi?id=223120
https://bugs.kde.org/show_bug.cgi?id=170191
https://bugs.kde.org/show_bug.cgi?id=263039

Two of them refer to enabling the IMAP groupware functionality, so please search for “[Groupware]” in your kmailrc and post the following lines until the next blank line.

Do you actually use IMAP or only POP3 accounts?

In another bug report somebody mentioned that removing ~/.kde4/share/apps/kmail/ fixed it for him. So you could try that (better only rename the directory). But depending on your setup KMail could store your EMails there if you’re using POP3.
If you configured KMail to leave the EMails on the servers, this should not matter though, as it would just download them again (they might be all marked unread then of course).
So better answer the other questions first and wait for my reply before trying this.
And please post the output of:

ls ~/.kde4/share/apps/kmail/

As requested by your good self, here is the output for “[Groupware]” in our kmailrc:─

 [Groupware]
 AutomaticSending=**false**

 [HTML Settings]
 AutomaticDetectionLanguage=1
 
 [IMAP Resource]
 TheIMAPResourceAccount=62566375
 TheIMAPResourceEnabled=true
 **TheIMAPResourceFolderParent=****.62566375.directory/INBOX**
 
 [Internal]

I have included also with the above the [IMAP Resource] output, since the red-highlighted INBOX directory may be the culprit here; for a search reveals it to be timecoded around the exact same time KMail crashed! Its exact location is:─

/home/chris/.kde4/share/apps/kmail/imap/.62566375.directory/INBOX

Do you actually use IMAP or only POP3 accounts?

Heretofore, having had no choice in the matter, our six (6) existing accounts have all been POP3;  and everything had been just grand and dandy with them.  Then, with a great fanfare of trumpets, one of our two email providers announced it had completed a major upgrade of its service.  Customers were emailed new IMAP and POP settings, which we were instructed to change immediately.  Simple enough ── or so we thought!  Except that customers had been notified the WRONG port numbers:  **Incoming:**  993 for IMAP with SSL enabled; 995 for POP3. **Outgoing** (SMTP): 25 for both IMAP and POP3.  Result:  Nothing worked!  Unable to send or receive!

To add to the confusion, KMail’s automatic server test facility came up with a completely DIFFERENT set of figures: Incoming: 143 for IMAP with TLS Plain connection security; 110 for POP3. Outgoing (SMTP): 587 for both IMAP and POP3. And it was during these time-consuming techno-gymnastics, as I was trying to reconfigure one of our accounts for IMAP, that KMail registered its very obvious displeasure … and crashed!

In response to your query, it is my standard practice ALWAYS to configure KMail to leave emails on the servers.

Kindly note I have found, also, TWO very similar folders:─

/home/chris/.kde/share/apps/kmail/mail/
/home/chris/.kde4/share/apps/kmail/mail/

The former (.kde) was in use prior to my upgrading on 15-Nov-2011 to openSuSE 11.4. So should the older of the two folders now be deleted, I wonder?

Lastly, here is the kmail output which you requested:─

 chris@Esprimo-1:~> su 
 Password: 
 **Esprimo-1:/home/chris #** ls ~/.kde4/share/apps/kmail
 **dimap  ****imap**  lock  **mail****  search**
 **Esprimo-1:/home/chris #**
MagnifiKat

Ok, this could very well be the culprit then.
For IMAP the messages are kept on the server anyway, so you shouldn’t lose anything by just deleting it.
Mind you, that I never used IMAP with KMail1, so I don’t really know. (I’m using the Akonadified KMail2 for 3 years, and am only using IMAP since 2 years ago)
I therefore don’t know what KMail1 might store in this folder, but I suppose it’S only a cache of the mails.

So I would suggest to rename that complete /home/chris/.kde4/share/apps/kmail/imap folder as a test.
Can you start KMail then?

In response to your query, it is my standard practice ALWAYS to configure KMail to leave emails on the servers.

Ok, then you might even try to remove the whole /home/chris/.kde4/share/apps/kmail/ folder, as all your mails are on the server anyway.
But KMail would have to redownload all of them, and the ones from the POP3 accounts would all be marked as unread I suppose.
So only try this as last resort.

Kindly note I have found, also, TWO very similar folders:─

/home/chris/.kde/share/apps/kmail/mail/
/home/chris/.kde4/share/apps/kmail/mail/

The former (.kde) was in use prior to my upgrading on 15-Nov-2011 to openSuSE 11.4. So should the older of the two folders now be deleted, I wonder?

No. The first one is from the KDE3 version of KMail, the second one from the KDE4 version.
They don’t influence each other.

If you don’t intend to use the KDE3 version any more, you can of course delete the first one, but you don’t have to. If you are not using any KDE3 application any more, you could even delete the whole ~/.kde/ folder. But this is absolutely irrelevant for your problem.

Lastly, here is the kmail output which you requested:─

 chris@Esprimo-1:~> su 
 Password: 
 **Esprimo-1:/home/chris #** ls ~/.kde4/share/apps/kmail
 **dimap****imap**  lock  **mail****search**
 **Esprimo-1:/home/chris #**

This doesn’t help at all. You showed a listing of root’s ~/.kde4/share/apps/kmail folder, i.e. /root/.kde4/share/apps/kmail, instead of your user’s.
Don’t call “su”.

Eureka! Wunderbar! Problem quickly resolved! I am delighted to report that KMail has been resurrected! Everything is in place, as heretofore, and nothing whatsoever has been lost.

Editing in KWrite, literally all I needed do was to DELETE in [IMAP Resource] that which I have red-highlighted in the panel below:─

 [IMAP Resource]
 TheIMAPResourceAccount=62566375
 TheIMAPResourceEnabled=true
 **TheIMAPResourceFolderParent=****.62566375.directory/INBOX**
 

 [Internal]

This interesting episode most certainly has encouraged me to learn much more about KWrite, which, being printed black on a white background, I find is not the eye strain of the white-on-black Konsole command-line terminal. It is very much easier, also, both to analyse the data and to edit.

So thanks a million, wolfi323, for your most patient and helpful guidance in this matter. Thanks also to gogalthorp for his wise input. I have added to both your reputations and I trust that other forum users with a similar problem may find the information contained in these 16 postings to be equally helpful to them also in resolving their particular KMail crash problems. Cheers and thanks again!

MagnifiKat
(Ireland)

Great to hear! :slight_smile:

This interesting episode most certainly has encouraged me to learn much more about KWrite, which, being printed black on a white background, I find is not the eye strain of the white-on-black Konsole command-line terminal. It is very much easier, also, both to analyse the data and to edit.

Well, you can change the colors either in KWrite as well as in Konsole. In KWrite see Settings->Configure Editor…->Fonts and Colors, for Konsole check Settings->Edit Current Profile…->Appearance.
But yes, of course KWrite is better suited for editing text files than Konsole… It’s what it’s designed for. :wink:
Although there are quite good text editors for text-mode as well.