Bug 90211

Summary: Unresolved LDAP server causes freeze when detailed email window is opened
Product: [Applications] kmail Reporter: jeff pitman <symbiont>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash    
Priority: NOR    
Version: 1.7   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description jeff pitman 2004-09-25 05:38:38 UTC
Version:           1.7 (using KDE KDE 3.3.0)
Installed from:    Unlisted Binary Package
Compiler:          GCC 3.2.2 
OS:                Linux

Reproduce:

1. Create an LDAP service that works.
2. Try autocompletion, if it works, continue. 
3. Close Kmail.
4. Now, turn off DNS.  Disconnect from the network, etc.
5. Open kmail.
6. View detailed email view.
7. Locked.
8. Kill Kmail

If you use mbox format, be sure to go to your Mail/ directory and remove the index files: 

$ rm .index*

Or you'll get massive mailbox corruption because kmail can't commit the transaction.

9. Restart DNS or reconnect the network. (you can also pkill kio_ldap)
10. Start Kmail.
11. Works

LDAP settings:

Add an address book, LDAP version == 3, time limit == Default, Size limit == Default, No security, Anonymous Authentication, no Sub-tree query, Offline Cache Policy == Use local copy if no connection, Refresh offline cache automatically is checked.  Attributes uses Netscape template.  Read-only is not checked.  (Though, since it's an Outlook server, I doubt I can write to it).
Comment 1 Szombathelyi György 2004-10-07 11:04:35 UTC
Since I cannot reproduce this (in CVS HEAD), I have some questions:
- KMail freezes only when the name resolution does not work, or when the LDAP server competely unreachable? (Try the described procedure with the IP address of the LDAP server.)
- In Konqueror, when you type an ldap url (ldap://your.ldap.host/dc=exampe,dc=com), any error message appear, or the query never finishes?
- If you try the command line LDAP tools, is it waiting forever, or gives some error message after some time (when the LDAP or DNS server unreachable)?
Comment 2 Till Adam 2004-12-14 08:57:44 UTC
No further input and not reproducible.
Comment 3 Robin Rosenberg 2004-12-18 11:59:08 UTC
The kio_ldap slave hangs if the pointed-to-server is not accessible. That could be a clue.

I had this problem with a local ldap server. KMail hung if my ldap server wasn't responding. Now the ldap server is on another machine, the address book reference to localhost is removed and only the remot host remains and kmail does not hang on startup anymore...
Comment 4 Robin Rosenberg 2004-12-18 12:06:33 UTC
..and now it hangs again. I checked the locale address book, restarted kmail and it hangs on attempting to display the message text. After killing the ldap slave kmail responds again and does not hang during the same session.
Comment 5 Heiko Nardmann 2005-05-18 09:13:22 UTC
For me, a similar behaviour exists. Yesterday I switched to SuSE 9.3 (from 8.2; new installation). This one comes with kmail 1.8 (3.4.0 "b" SuSE 9.3).

When I start kmail an ldap slave is started which tried to contact the ldap server configured for the addressbook. But we also had a migration of the ldap server during the weekend. So the old ldap server was not reachable anymore. The ldap slave freezed kmail, i.e. getting mails from local /var/spool/mail did not progress but hang at message 0.

So ...
1) progress bar or progress dialog for ldap contacting is missing; there should be a visual feedback to the user here

2) why does getting new mails not woek if the ldap io slave is working? I don't see any dependencies here