LDAP lookup in Kontact causes crash

Bug #430810 reported by Simon Jagoe
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KDE PIM
Fix Released
High
kdepim (Fedora)
Fix Released
Medium
kdepim (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kdepim

Upstream bug https://bugs.kde.org/show_bug.cgi?id=206024 in KDE 4.3.1. I believe it is fixed in upstream SVN changeset http://websvn.kde.org/?view=rev&revision=1019115. I have yet to actually build and test this, but I intend to submit a build to my PPA tonight.

To reproduce:
   * Set up an LDAP lookup in Kontact (Setting -> Configure Kontact -> Contacts -> LDAP Lookup)
   * Start an email in KMail
   * Enter an address in the To: field that will be auto-completed with LDAP rather than with a 'recently contacted' (local) list

Expected:
   * The address is completed and filled in automatically

Actual:
   * All of Kontact crashes

This occurred in the Jaunty backport of KDE 4.3.1 from the kubuntu-ppa backports repository. ppa version of the package is 4:4.3.1-0ubuntu1~jaunty1~ppa2.

Changed in kdepim:
status: Unknown → Fix Released
Revision history for this message
Simon Jagoe (azriphale) wrote :

I have submitted a build to my PPA for Jaunty, and I will test the original Karmic packages tomorrow at work (where we have a central LDAP directory).

Revision history for this message
Simon Jagoe (azriphale) wrote :

After applying the upstream fix, I still get the crash. If I untick the LDAP server in the Kontact configuration, I do not get the crash but I still get address completion from the LDAP server.

Revision history for this message
In , David (david-redhat-bugs) wrote :
Download full text (5.3 KiB)

Description of problem:
According to KDEPIM upstream this bug is resolved and checking the changelog for kdepim-4.3.1-4.fc10.x86_64 we pulled in the fix from upstream; however, it is still segfaulting on LDAP address auto lookups. I can reproduce the problem pretty readily. This renders the application nearly useless since you can't look up e-mail addresses or the

Version-Release number of selected component (if applicable):
kdepim-4.3.1-4.fc10.x86_64

How reproducible:
Very

Steps to Reproduce:
1. Start kdepim with ldap lookup configured
2. Start a new e-mail or add new e-mail addresses to a reply
3. kdepim will segfault

Actual results:
Segfault

Expected results:
Auto lookup should complete without error

Additional info:
I have a backtrace from the latest kdepim (doesn't appear to be an updated debuginfo package so hopefully this backtrace is good). Please let me know if I can help with additional testing and/or debugging.

Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#5 0x00007fa3f8f26b85 in KPIM::AddresseeLineEdit::slotLDAPSearchData () from /usr/lib64/libkdepim.so.4
#6 0x00007fa3f8f27b7c in KPIM::AddresseeLineEdit::qt_metacall () from /usr/lib64/libkdepim.so.4
#7 0x00007fa3eb68d4bd in ?? () from /usr/lib64/libkmailprivate.so.4
#8 0x00007fa3eb6feccd in ?? () from /usr/lib64/libkmailprivate.so.4
#9 0x000000302bb58f52 in QMetaObject::activate () from /usr/lib64/libQtCore.so.4
#10 0x00007fa3f8f2a905 in KPIM::LdapSearch::searchData () from /usr/lib64/libkdepim.so.4
#11 0x00007fa3f8f2da21 in KPIM::LdapSearch::slotDataTimer () from /usr/lib64/libkdepim.so.4
#12 0x00007fa3f8f2daa5 in KPIM::LdapSearch::finish () from /usr/lib64/libkdepim.so.4
#13 0x00007fa3f8f30408 in KPIM::LdapSearch::qt_metacall () from /usr/lib64/libkdepim.so.4
#14 0x000000302bb58f52 in QMetaObject::activate () from /usr/lib64/libQtCore.so.4
#15 0x00007fa3f8f2aff9 in KPIM::LdapClient::slotDone () from /usr/lib64/libkdepim.so.4
#16 0x00007fa3f8f30b50 in KPIM::LdapClient::qt_metacall () from /usr/lib64/libkdepim.so.4
#17 0x000000302bb58f52 in QMetaObject::activate () from /usr/lib64/libQtCore.so.4
#18 0x0000003b934eee52 in KJob::result (this=0x13f6850, _t1=0x2745370) at /usr/src/debug/kdelibs-4.3.1/x86_64-redhat-linux-gnu/kdecore/kjob.moc:188
#19 0x0000003b934ef1cf in KJob::emitResult (this=0x2745370) at /usr/src/debug/kdelibs-4.3.1/kdecore/jobs/kjob.cpp:304
#20 0x0000003b942f2080 in KIO::SimpleJob::slotFinished (this=0x2745370) at /usr/src/debug/kdelibs-4.3.1/kio/kio/job.cpp:477
#21 0x0000003b942f2533 in KIO::TransferJob::slotFinished (this=0x2745370) at /usr/src/debug/kdelibs-4.3.1/kio/kio/job.cpp:948
#22 0x0000003b942ed325 in KIO::TransferJob::qt_metacall (this=0x2745370, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff317320e0)
    at /usr/src/debug/kdelibs-4.3.1/x86_64-redhat-linux-gnu/kio/jobclasses.moc:343
#23 0x000000302bb58f52 in QMetaObject::activate () from /usr/lib64/libQtCore.so.4
#24 0x0000003b943afe61 in KIO::SlaveInterface::dispatch (this=0x153fb60, _cmd=104, rawdata=<value optimized out>) at /usr/src/debug/kdelibs-4.3.1/kio/kio/slaveinterface.cpp:175
#25 0x0000003b943ac9b2 in KIO::SlaveInterface::d...

Read more...

Revision history for this message
Bodra (bodra-swift) wrote :

Unticking LDAP server should mean you don't get LDAP lookup anymore. Except that Kmail doesn't seem to pick up on LDAP changes until after restarting the application. Does LDAP continue to work after you restart?

This is a very frustrating bug. I've had to move to using thunderbird for now.

Revision history for this message
In , Lukáš (luk-redhat-bugs) wrote :

https://admin.fedoraproject.org/updates/F10/FEDORA-2009-9732 fixes that; please try that and reopen if the bug persists.

Revision history for this message
In , Lukáš (luk-redhat-bugs) wrote :

Hmm looking at the bug description you do seem to have the latest version, I'll look into that.

Revision history for this message
In , David (david-redhat-bugs) wrote :

I was about to say. :-) I've also found a work-around but it's very cumbersome. It's better than having Kontact segfault on you. Instead of typing the e-mail address/name in the the to/cc/bcc lines, press the "select" button to the far right. In the pop-up window click the "search directory service" button. Enter the name you want to search for. Select your name and then click "add selected". Like I said, it's cumbersome but better than having the app segfault on you.

Revision history for this message
In , George (george-redhat-bugs) wrote :

Just to add that with the latest kdepim in F11 the ldap lookup also segfaults (i386). I had reported it upstream and had been told it had been fixed,

kdepim-4.3.1-4.fc11.i586

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

ok, verified we have the patch upstream recommended, apparently we're seeing something new/different. Without a usable backtrace, it's hard to know for sure.

Maybe this?
http://websvn.kde.org/branches/KDE/4.3/kdepim/libkdepim/addresseelineedit.cpp?r1=1019119&r2=1019358

another post-4.3.1 crasher.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

It is thought that this commit might also take part in fixing the bug: http://websvn.kde.org/?view=revision&revision=1019358

Revision history for this message
In , David (david-redhat-bugs) wrote :

I can't comment on the diff, myself, however, I'm willing to try to test/debug however I can. The backtrace did look a little lighter than the previous backtraces I had before updating to the latest kdepim. Perhaps this is a stupid question but should there be an updated kdepim-debuginfo package to go along with the latest update? KCrashhandler seems to be indicating that it's not getting a full backtrace. I wonder if there are symbols missing...

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

new -debuginfo are available yes, but these don't get upgraded automatically. you'll likely need to do:

debuginfo-install kdepim

to get it.

Changed in kdepim (Fedora):
status: Unknown → In Progress
Revision history for this message
In , David (david-redhat-bugs) wrote :
Download full text (7.9 KiB)

Okay, here's a new backtrace with the updated kdepim-debuginfo installed. I should also note some reproducer nuances. I can reproduce the segfault at will when working in offline mode. I have Kmail setup with a DIMAP account so that I can work on and offline. When I'm in offline and attempt to add an e-mail address to an e-mail Kontact will segfault immediately. What I have noticed since updating to the latest kdepim is that I cannot reproduce this problem consistently when I'm working in online mode. Sometime it will segfault on the first attempt to resolve an e-mail address sometimes it will be on subsequent attempts.

Application: Kontact (kontact), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fb43ce68810 (LWP 4487))]

Thread 2 (Thread 0x7fb427c99950 (LWP 4528)):
#0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:217
#1 0x000000302ba5b597 in QWaitConditionPrivate::wait () at thread/qwaitcondition_unix.cpp:85
#2 QWaitCondition::wait (this=0x2802e38, mutex=0x2802e30, time=30000) at thread/qwaitcondition_unix.cpp:159
#3 0x000000302ba51239 in QThreadPoolThread::run (this=0x2802530) at concurrent/qthreadpool.cpp:140
#4 0x000000302ba5a5d5 in QThreadPrivate::start (arg=0x2802530) at thread/qthread_unix.cpp:188
#5 0x00000035e3c073da in start_thread (arg=<value optimized out>) at pthread_create.c:297
#6 0x00000035e30e62bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Thread 1 (Thread 0x7fb43ce68810 (LWP 4487)):
[KCrash Handler]
#5 QListWidgetItem::text () at /usr/include/QtGui/qlistwidget.h:90
#6 KPIM::AddresseeLineEdit::slotLDAPSearchData (this=<value optimized out>, adrs=<value optimized out>) at /usr/src/debug/kdepim-4.3.1/libkdepim/addresseelineedit.cpp:820
#7 0x00007fb43cf35b7c in KPIM::AddresseeLineEdit::qt_metacall (this=0x1a405a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff87510340)
    at /usr/src/debug/kdepim-4.3.1/x86_64-redhat-linux-gnu/libkdepim/addresseelineedit.moc:95
#8 0x00007fb42f69b4bd in KMLineEdit::qt_metacall (this=0x1a859c0, _c=QMetaObject::InvokeMetaMethod, _id=27810240, _a=0x1)
    at /usr/src/debug/kdepim-4.3.1/x86_64-redhat-linux-gnu/kmail/kmlineeditspell.moc:68
#9 0x00007fb42f70cccd in RecipientLineEdit::qt_metacall (this=0x1a859c0, _c=QMetaObject::InvokeMetaMethod, _id=27810240, _a=0x1)
    at /usr/src/debug/kdepim-4.3.1/x86_64-redhat-linux-gnu/kmail/recipientseditor.moc:123
#10 0x000000302bb58f52 in QMetaObject::activate (sender=0x1b08c10, from_signal_index=<value optimized out>, to_signal_index=5, argv=0x1) at kernel/qobject.cpp:3113
#11 0x00007fb43cf38905 in KPIM::LdapSearch::searchData (this=0x1a859c0, _t1=<value optimized out>) at /usr/src/debug/kdepim-4.3.1/x86_64-redhat-linux-gnu/libkdepim/ldapclient.moc:205
#12 0x00007fb43cf3ba21 in KPIM::LdapSearch::slotDataTimer (this=0x1b08c10) at /usr/src/debug/kdepim-4.3.1/libkdepim/ldapclient.cpp:465
#13 0x00007fb43cf3baa5 in KPIM::LdapSearch::finish (this=0x1b08c10) at /usr/src/debug/kdepim-4.3.1/libkdepim/ldapclient.cpp:472
#14 0x00007fb43cf3e408 in KPIM::LdapSearch::qt_metacall (this=0x1b08c10, _c=QMetaObject::InvokeMetaMethod, _id=<value ...

Read more...

Revision history for this message
In , David (david-redhat-bugs) wrote :

Let me know if you want me to run kdepim through gdb if that would help or if there's anything else I can do.

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

dang, looking over it quickly, it seems to match the backtrace in
http://bugs.kde.org/show_bug.cgi?id=206024

I'd recommend commenting on the upstream bug, mentioning your use of an already patched kdepim, and include your own backtrace for posterity.

Revision history for this message
In , David (david-redhat-bugs) wrote :

Please note the most recent comments in the upstream bug. It appears we're missing part of the fix. :-/

Revision history for this message
In , David (david-redhat-bugs) wrote :

Probably should have been more specific -- comments 30-32 in the upstream bug linked to this one.

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

got it (we're subscribed there too). :)

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

kdepim-4.3.1-5.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

kdepim-4.3.1-5.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.

Changed in kdepim (Fedora):
status: In Progress → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Is this still an issue in KDE 4.3.2? If so could you attach the backtrace of the crash?

Changed in kdepim (Ubuntu):
status: New → Incomplete
Revision history for this message
Simon Jagoe (azriphale) wrote :

I have not had an opportunity to test it in 4.3.2 yet. In the next few days I will try to get it all set up to do this again.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Should be fixed in the latest 4.3.2 packages.

Changed in kdepim (Ubuntu):
status: Incomplete → Fix Released
Changed in kdepim:
importance: Unknown → High
Changed in kdepim (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.