Bug 165263 - mail/thunderbird: core dumping most time when users are LDAP backed up.
Summary: mail/thunderbird: core dumping most time when users are LDAP backed up.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
: 170310 188019 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-18 13:20 UTC by O. Hartmann
Modified: 2014-11-05 16:08 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2012-02-18 13:20:12 UTC
mail/thunderbirs crashes since thunderbird 8 in most cases when trying to start and the user is kept in OpenLDAP DIT, it doesn't matter whether the LDAP server is local or remote.
The error messega ebefore core dumping is

(thunderbird-bin:10741): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (1089)

1089 is the ID of the user, but it doesn't matter what user and what host and what OpenLDAP backend is used (we have several), it is always the same - coredump.

I can get rid of that situation starting firefox prior to the start of thunderbird. In most cases this works. This lead me to belief that eventually nscd(8) and the nsswitch cache could cause the problem, but even with no cache enabled/allowed I receive this error.

Sometimes I need to stop firefox, close it and then restart to start also thunderbird. This is a boring procedure.

Fix: 

Prior to the start of thunderbird, start firefox. It seems then that the user missing and triggering coredump in thunderbird is then found on LDAP and thunderbirds starts as expected.
How-To-Repeat: Try starting mail/thunderbird on FreeBSD amd64 platforms when users are kept in OpenLDAP.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-02-18 13:20:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gecko

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Florian Smeets freebsd_committer freebsd_triage 2012-02-18 18:14:47 UTC
State Changed
From-To: open->feedback

Can you build thunderbird with debugging and get a backtrace from the 
coredump?
Comment 3 O. Hartmann 2012-02-22 08:34:38 UTC
On 02/20/12 16:28, Florian Smeets wrote:
> On 20.02.2012 16:09, O. Hartmann wrote:
>> On 02/18/12 19:14, flo@FreeBSD.org wrote:
>>> Synopsis: mail/thunderbird: core dumping most time when users are
>>> LDAP backed up.
>>>
>>> State-Changed-From-To: open->feedback
>>> State-Changed-By: flo
>>> State-Changed-When: Sat Feb 18 18:14:47 UTC 2012
>>> State-Changed-Why:
>>> Can you build thunderbird with debugging and get a backtrace from the
>>> coredump?
>>>
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=165263
>>
>> Sorry for the late response.
>>
>> Of course I will try to compile thunderbird with debug flags on. I guess
>> I need to put the options in a suitable etc/make.conf pattern match?
>> Would you help me, please?
>>
> 
> make config in mail/thunderbird and select the DEBUG option, that should
> be enough.



Below, you'll find the output and backtrace of gdb of thunderbird
10.0.2, DEBUG enabled.


Regards,

Oliver

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `thunderbird-bin'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libdbus-glib-1.so.2...done.
Loaded symbols for /usr/local/lib/libdbus-glib-1.so.2
Reading symbols from /usr/local/lib/libdbus-1.so.3...done.
Loaded symbols for /usr/local/lib/libdbus-1.so.3
Reading symbols from /usr/local/lib/libgobject-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgobject-2.0.so.0
Reading symbols from /usr/local/lib/libgthread-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgthread-2.0.so.0
Reading symbols from /usr/local/lib/libglib-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.0
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libthr.so.3...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libgio-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgio-2.0.so.0
Reading symbols from /lib/libz.so.6...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/local/lib/libgmodule-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgmodule-2.0.so.0
Reading symbols from /usr/local/lib/libicui18n.so.48...done.
Loaded symbols for /usr/local/lib/libicui18n.so.48
Reading symbols from /usr/local/lib/libintl.so.9...done.
Loaded symbols for /usr/local/lib/libintl.so.9
Reading symbols from /usr/local/lib/libpcre.so.1...done.
Loaded symbols for /usr/local/lib/libpcre.so.1
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/libicuuc.so.48...done.
Loaded symbols for /usr/local/lib/libicuuc.so.48
Reading symbols from /usr/local/lib/libicudata.so.48...done.
Loaded symbols for /usr/local/lib/libicudata.so.48
Reading symbols from /usr/local/lib/thunderbird/libxul.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libxul.so
Reading symbols from /usr/local/lib/thunderbird/libsmime3.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libsmime3.so
Reading symbols from /usr/local/lib/thunderbird/libssl3.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libssl3.so
Reading symbols from /usr/local/lib/thunderbird/libnss3.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libnss3.so
Reading symbols from /usr/local/lib/thunderbird/libnssutil3.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libnssutil3.so
Reading symbols from /usr/local/lib/libcairo.so.2...done.
Loaded symbols for /usr/local/lib/libcairo.so.2
Reading symbols from /usr/local/lib/libpixman-1.so.9...done.
Loaded symbols for /usr/local/lib/libpixman-1.so.9
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/local/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/local/lib/libfontconfig.so.1
Reading symbols from /usr/local/lib/libXrender.so.1...done.
Loaded symbols for /usr/local/lib/libXrender.so.1
Reading symbols from /usr/local/lib/libX11.so.6...done.
Loaded symbols for /usr/local/lib/libX11.so.6
Reading symbols from /usr/local/lib/thunderbird/libldap60.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libldap60.so
Reading symbols from /usr/local/lib/thunderbird/libprldap60.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libprldap60.so
Reading symbols from /usr/local/lib/thunderbird/libldif60.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libldif60.so
Reading symbols from /usr/local/lib/thunderbird/libmozsqlite3.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libmozsqlite3.so
Reading symbols from /usr/local/lib/libevent-1.4.so.4...done.
Loaded symbols for /usr/local/lib/libevent-1.4.so.4
Reading symbols from /usr/local/lib/libexecinfo.so.1...done.
Loaded symbols for /usr/local/lib/libexecinfo.so.1
Reading symbols from /usr/local/lib/libplds4.so.1...done.
Loaded symbols for /usr/local/lib/libplds4.so.1
Reading symbols from /usr/local/lib/libplc4.so.1...done.
Loaded symbols for /usr/local/lib/libplc4.so.1
Reading symbols from /usr/local/lib/libnspr4.so.1...done.
Reading symbols from /usr/local/lib/thunderbird/libmozalloc.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libmozalloc.so
Reading symbols from /usr/local/lib/libXext.so.6...done.
Loaded symbols for /usr/local/lib/libXext.so.6
Reading symbols from /usr/local/lib/libpangocairo-1.0.so.0...done.
Loaded symbols for /usr/local/lib/libpangocairo-1.0.so.0
Reading symbols from /usr/local/lib/libpangoft2-1.0.so.0...done.
Loaded symbols for /usr/local/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/local/lib/libpango-1.0.so.0...done.
Loaded symbols for /usr/local/lib/libpango-1.0.so.0
Reading symbols from /usr/local/lib/libgtk-x11-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/local/lib/libatk-1.0.so.0...done.
Loaded symbols for /usr/local/lib/libatk-1.0.so.0
Reading symbols from /usr/local/lib/libgdk-x11-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/local/lib/libXinerama.so.1...done.
Loaded symbols for /usr/local/lib/libXinerama.so.1
Reading symbols from /usr/local/lib/libXi.so.6...done.
Loaded symbols for /usr/local/lib/libXi.so.6
Reading symbols from /usr/local/lib/libXrandr.so.2...done.
Loaded symbols for /usr/local/lib/libXrandr.so.2
Reading symbols from /usr/local/lib/libXcursor.so.1...done.
Loaded symbols for /usr/local/lib/libXcursor.so.1
Reading symbols from /usr/local/lib/libXcomposite.so.1...done.
Loaded symbols for /usr/local/lib/libXcomposite.so.1
Reading symbols from /usr/local/lib/libXdamage.so.1...done.
Loaded symbols for /usr/local/lib/libXdamage.so.1
Reading symbols from /usr/local/lib/libgdk_pixbuf-2.0.so.0...done.
Loaded symbols for /usr/local/lib/libgdk_pixbuf-2.0.so.0
Reading symbols from /usr/local/lib/libXfixes.so.3...done.
Loaded symbols for /usr/local/lib/libXfixes.so.3
Reading symbols from /usr/local/lib/libXt.so.6...done.
Loaded symbols for /usr/local/lib/libXt.so.6
Reading symbols from /usr/lib/libbz2.so.4...done.
Loaded symbols for /usr/lib/libbz2.so.4
Reading symbols from /usr/local/lib/libexpat.so.6...done.
Loaded symbols for /usr/local/lib/libexpat.so.6
Reading symbols from /usr/local/lib/libpng.so.6...done.
Loaded symbols for /usr/local/lib/libpng.so.6
Reading symbols from /usr/local/lib/libxcb-shm.so.0...done.
Loaded symbols for /usr/local/lib/libxcb-shm.so.0
Reading symbols from /usr/local/lib/libxcb-render.so.0...done.
Loaded symbols for /usr/local/lib/libxcb-render.so.0
Reading symbols from /usr/local/lib/libxcb.so.2...done.
Loaded symbols for /usr/local/lib/libxcb.so.2
Reading symbols from /usr/local/lib/libXau.so.6...done.
Loaded symbols for /usr/local/lib/libXau.so.6
Reading symbols from /usr/local/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/local/lib/libXdmcp.so.6
Reading symbols from /usr/local/lib/libpthread-stubs.so.0...done.
Loaded symbols for /usr/local/lib/libpthread-stubs.so.0
Reading symbols from /usr/lib/librpcsvc.so.5...done.
Loaded symbols for /usr/lib/librpcsvc.so.5
Reading symbols from /usr/local/lib/libGL.so.1...done.
Loaded symbols for /usr/local/lib/libGL.so.1
Reading symbols from /usr/local/lib/libSM.so.6...done.
Loaded symbols for /usr/local/lib/libSM.so.6
Reading symbols from /usr/local/lib/libICE.so.6...done.
Loaded symbols for /usr/local/lib/libICE.so.6
Reading symbols from /usr/local/lib/libXxf86vm.so.1...done.
Loaded symbols for /usr/local/lib/libXxf86vm.so.1
Reading symbols from /usr/local/lib/libX11-xcb.so.1...done.
Loaded symbols for /usr/local/lib/libX11-xcb.so.1
Reading symbols from /usr/local/lib/libxcb-glx.so.0...done.
Loaded symbols for /usr/local/lib/libxcb-glx.so.0
Reading symbols from /usr/local/lib/libdrm.so.2...done.
Loaded symbols for /usr/local/lib/libdrm.so.2
Reading symbols from /usr/local/lib/thunderbird/libxpcom.so...done.
Loaded symbols for /usr/local/lib/thunderbird/libxpcom.so
Reading symbols from /usr/local/lib/nss_ldap.so.1...done.
Loaded symbols for /usr/local/lib/nss_ldap.so.1
Reading symbols from /usr/local/lib/libldap-2.4.so.8...done.
Loaded symbols for /usr/local/lib/libldap-2.4.so.8
Reading symbols from /usr/local/lib/liblber-2.4.so.8...done.
Loaded symbols for /usr/local/lib/liblber-2.4.so.8
Reading symbols from /usr/local/lib/libsasl2.so.2...done.
Loaded symbols for /usr/local/lib/libsasl2.so.2
Reading symbols from /usr/lib/libkrb5.so.10...done.
Loaded symbols for /usr/lib/libkrb5.so.10
Reading symbols from /usr/lib/libcom_err.so.5...done.
Loaded symbols for /usr/lib/libcom_err.so.5
Reading symbols from /usr/lib/libgssapi_krb5.so.10...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.10
Reading symbols from /usr/lib/libssl.so.6...done.
Loaded symbols for /usr/lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /usr/lib/libasn1.so.10...done.
Loaded symbols for /usr/lib/libasn1.so.10
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /usr/lib/libhx509.so.10...done.
Loaded symbols for /usr/lib/libhx509.so.10
Reading symbols from /usr/lib/libroken.so.10...done.
Loaded symbols for /usr/lib/libroken.so.10
Reading symbols from /usr/lib/libgssapi.so.10...done.
Loaded symbols for /usr/lib/libgssapi.so.10
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1

#0  0x0000000801eb0c0a in realloc () from /lib/libc.so.7
[New Thread 804c07400 (LWP 101891/thunderbird-bin)]
(gdb) bt
#0  0x0000000801eb0c0a in realloc () from /lib/libc.so.7
#1  0x0000000801eb0f05 in free () from /lib/libc.so.7
#2  0x000000080ae6757a in ldap_x_free (ptr=0x1) at open.c:892
#3  0x00007fffffffaa20 in ?? ()
Previous frame identical to this frame (corrupt stack?)
Comment 4 O. Hartmann 2012-02-24 19:07:54 UTC
On 18.02.12 19:14, flo@FreeBSD.org wrote:
> Synopsis: mail/thunderbird: core dumping most time when users are LDAP

backed up.
>
> State-Changed-From-To: open->feedback
> State-Changed-By: flo
> State-Changed-When: Sat Feb 18 18:14:47 UTC 2012
> State-Changed-Why:
> Can you build thunderbird with debugging and get a backtrace from the
> coredump?
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=165263

Also could you try the patch from
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164239

I tried on 9.0-STABLE and 10.0-STABLE (both amd64, both running LDAP
users, connecting via nss-ldap).

I see no change in my case. This patch does not help in Thunderbird 10

Oliver

Comment 5 O. Hartmann 2012-05-04 20:53:44 UTC
Still the same and unresolved issue in Thunderbird 12!
Comment 6 Toni Ballesta 2014-04-27 15:58:38 UTC
Hello. This is solved in Thunderbird ESR-24?
Comment 7 O. Hartmann 2014-04-27 16:40:41 UTC
On Sun, 27 Apr 2014 16:58:38 +0200
Toni Ballesta <mustelator@yahoo.es> wrote:

> Hello. This is solved in Thunderbird ESR-24?



As far as I know this bug still exists. I swapped Thunderbird with Claws-Mail, so I do
not rely anymore on a piece of software that is useless for years in a larger multiuser
environment with OpenLDAP backend.

oh
Comment 8 Jan Beich freebsd_committer freebsd_triage 2014-06-13 00:18:44 UTC
According to upstream bug the issue is with a symbol clash between openldap and ldapcsdk. Renaming ldap_str2charray() means breaking API in either library but doing so in a private copy shouldn't be a problem (see cairo example).

Can you test the following change?

https://trillian.chruetertee.ch/freebsd-gecko/changeset/1605
Comment 9 Jan Beich freebsd_committer freebsd_triage 2014-06-13 00:20:01 UTC
*** Bug 170310 has been marked as a duplicate of this bug. ***
Comment 10 Jan Beich freebsd_committer freebsd_triage 2014-08-04 19:25:14 UTC
Can you confirm it's FIXED after ports@363978 on thunderbird-31.0 ?

http://svnweb.freebsd.org/changeset/ports/363978
Comment 11 Jan Beich freebsd_committer freebsd_triage 2014-11-04 21:18:58 UTC
*** Bug 188019 has been marked as a duplicate of this bug. ***
Comment 12 Jan Beich freebsd_committer freebsd_triage 2014-11-05 16:08:47 UTC
Assuming fixed by files/patch-bug292127.