Closed Bug 708222 Opened 13 years ago Closed 12 years ago

Thunderbird crashes on startup in Ubuntu x86_64 [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ]

Categories

(MailNews Core :: LDAP Integration, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 292127

People

(Reporter: qwiglydee, Unassigned)

References

Details

(Keywords: crash)

Crash Data

User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.59 Safari/535.7

Steps to reproduce:

1. Installed thunderbird 7.x, 8.x from ubuntu oneiric repository, or 9.x from http://ppa.launchpad.net/mozillateam/thunderbird-next/ubuntu 
2. started thunderbird from command line


Actual results:

nothing at console
crash report dialog at gui
Severity: normal → critical
Keywords: crash
Whiteboard: [closeme 2012-01-11]
disappeared at 8.0+build1-0ubuntu0
Still exists in 9.0~b5+build1-0ubuntu0.11.10.1~mtn1
Submitted crash Ids: 
bp-ac2c6d7a-6073-431a-b749-bad682111207
bp-68fa26b3-32a6-4f03-993a-ba7092111223
both crashes are [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ]

0	thunderbird-bin	arena_dalloc	jemalloc.c:4306
1	libldap60.so	ldap_x_free	open.c:892
2	libldap60.so	ldap_set_lderrno	error.c:262
3	libldap60.so	ldap_set_option	setoption.c:403
4	libnss_ldap-2.12.1.so	libnss_ldap-2.12.1.so@0x3bc4	
5	libnss_ldap-2.12.1.so	libnss_ldap-2.12.1.so@0x5700	
6	libnss_ldap-2.12.1.so	libnss_ldap-2.12.1.so@0x6eed	
7	libnss_ldap-2.12.1.so	libnss_ldap-2.12.1.so@0x751f	
8	libc-2.13.so	libc-2.13.so@0x9a5b6	
9	libc-2.13.so	libc-2.13.so@0x13a068	
10	libnss_ldap-2.12.1.so	libnss_ldap-2.12.1.so@0x74af	
11	libglib-2.0.so.0.3000.0	libglib-2.0.so.0.3000.0@0xf7ff3	
12	libgtk-x11-2.0.so.0.2400.6	libgtk-x11-2.0.so.0.2400.6@0x39236c
Status: UNCONFIRMED → NEW
Crash Signature: [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ] [@ free | ldap_x_free | ldap_set_lderrno ] [@ ldap_x_free | ldap_set_lderrno]
Ever confirmed: true
Summary: thunderbird 7-9 crashes on startup in ubuntu/kubuntu 11.10 → thunderbird 7-9 crashes on startup in ubuntu/kubuntu 11.10 [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ]
Whiteboard: [closeme 2012-01-11]
Is there any workaround possible?
Crash Signature: [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ] [@ free | ldap_x_free | ldap_set_lderrno ] [@ ldap_x_free | ldap_set_lderrno] → [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ] [@ free | ldap_x_free | ldap_set_lderrno ] [@ ldap_x_free | ldap_set_lderrno] [@ ldap_set_lderrno ]
Component: General → LDAP Integration
Product: Thunderbird → MailNews Core
QA Contact: general → ldap-integration
Summary: thunderbird 7-9 crashes on startup in ubuntu/kubuntu 11.10 [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ] → Thunderbird crashes on startup in Ubuntu x86_64 [@ arena_dalloc | ldap_x_free | ldap_set_lderrno ]
Full backtrace from a debug build of todays mozilla-central/comm-central on Kubuntu 12.04 x86_64. Judging from the crash stats, it only happens on Ubuntu x86_64. It happens with the official Ubuntu packages as well as with the semi-official 64bit release builds from Mozilla. It does not, however, crash with the 32 bit release builds from Mozilla (I don't know about the i586 packages from Ubuntu).

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5720ece in ldap_ld_free (ld=0x7ffff6cff730, serverctrls=0x0, clientctrls=0x0, close=1) at /home/username/src/comm-central/ldap/sdks/c-sdk/ldap/libraries/libldap/unbind.c:101
101                             nextlr = lr->lr_next;
(gdb) bt
#0  0x00007ffff5720ece in ldap_ld_free (ld=0x7ffff6cff730, serverctrls=0x0, clientctrls=0x0, close=1) at /home/username/src/comm-central/ldap/sdks/c-sdk/ldap/libraries/libldap/unbind.c:101
#1  0x00007ffff5720d27 in ldap_unbind (ld=0x7ffff6cff730) at /home/username/src/comm-central/ldap/sdks/c-sdk/ldap/libraries/libldap/unbind.c:60
#2  0x00007fffe393a955 in do_close () at ldap-nss.c:722
#3  0x00007fffe393bb5b in do_open () at ldap-nss.c:1701
#4  do_with_reconnect (base=0x7fffe3b4bce6 "ou=Users,OU=TU,OU=IAM,DC=ads,DC=mwn,DC=de", scope=1, filter=0x7fffffffbec0 "(&(objectClass=user)(uid=username))", attrs=0x7fffe3b4cb60, sizelimit=1, private=0x7fffffffc340, search_func=0x7fffe393acc0 <do_search_s>)
    at ldap-nss.c:2624
#5  0x00007fffe393d192 in _nss_ldap_search_s (args=0x7fffffffc3b0, filterprot=0x7fffe3b4f1c0 "(&(objectClass=user)(uid=%s))", sel=<optimized out>, user_attrs=0x0, sizelimit=1, res=0x7fffffffc340) at ldap-nss.c:3142
#6  0x00007fffe393e819 in _nss_ldap_getbyname (args=0x7fffffffc3b0, result=0x7fffffffc460, buffer=0x7ffff6ce8800 "nx", buflen=1024, errnop=0x7ffff7fd66b0, filterprot=<optimized out>, sel=LM_PASSWD, parser=0x7fffe393ea40 <_nss_ldap_parse_pw>) at ldap-nss.c:3509
#7  0x00007fffe393edb7 in _nss_ldap_getpwnam_r (name=<optimized out>, result=<optimized out>, buffer=<optimized out>, buflen=<optimized out>, errnop=<optimized out>) at ldap-pwd.c:247
#8  0x00007ffff70bc9ad in __getpwnam_r (name=0x7fffffffee06 "username", resbuf=0x7fffffffc460, buffer=0x7ffff6ce8800 "nx", buflen=1024, result=0x7fffffffc498) at ../nss/getXXbyYY_r.c:256
#9  0x00007fffee700e33 in g_get_any_init_do () at /build/buildd/glib2.0-2.32.3/./glib/gutils.c:765
#10 0x00007fffee70191d in g_get_any_init () at /build/buildd/glib2.0-2.32.3/./glib/gutils.c:916
#11 g_get_any_init_locked () at /build/buildd/glib2.0-2.32.3/./glib/gutils.c:923
#12 g_get_user_name () at /build/buildd/glib2.0-2.32.3/./glib/gutils.c:941
#13 0x00007fffe83a1c4d in gnome_client_instance_init (client=0x7ffff6c2bc00) at gnome-client.c:1385
#14 0x00007fffee9b3957 in g_type_create_instance (type=<optimized out>) at /build/buildd/glib2.0-2.32.3/./gobject/gtype.c:1892
#15 0x00007fffee9980b9 in g_object_constructor (type=<optimized out>, n_construct_properties=0, construct_params=0x0) at /build/buildd/glib2.0-2.32.3/./gobject/gobject.c:1849
#16 0x00007fffee999c02 in g_object_newv (object_type=140737333264896, n_parameters=0, parameters=0x0) at /build/buildd/glib2.0-2.32.3/./gobject/gobject.c:1632
#17 0x00007fffee99a1ec in g_object_new (object_type=140737333264896, first_property_name=0x0) at /build/buildd/glib2.0-2.32.3/./gobject/gobject.c:1542
#18 0x00007fffe83a3772 in gnome_client_new_without_connection () at gnome-client.c:1512
#19 0x00007fffe83a4540 in gnome_client_pre_args_parse (app=<optimized out>, mod_info=<optimized out>) at gnome-client.c:1143
#20 0x00007fffe7cca84e in gnome_program_preinit () from /usr/lib/x86_64-linux-gnu/libgnome-2.so.0
#21 0x00007fffe7ccb52e in ?? () from /usr/lib/x86_64-linux-gnu/libgnome-2.so.0
#22 0x00007fffe7ccb7ad in gnome_program_initv () from /usr/lib/x86_64-linux-gnu/libgnome-2.so.0
#23 0x00007fffe7ccb89f in gnome_program_init () from /usr/lib/x86_64-linux-gnu/libgnome-2.so.0
#24 0x00007ffff008b260 in nsNativeAppSupportUnix::Start (this=0x7ffff6cb1e80, aRetVal=0x7fffffffcdfa) at /home/username/src/comm-central/mozilla/toolkit/xre/nsNativeAppSupportUnix.cpp:500
#25 0x00007ffff007147a in XREMain::XRE_mainStartup (this=0x7fffffffcfa0, aExitFlag=0x7fffffffcf4e) at /home/username/src/comm-central/mozilla/toolkit/xre/nsAppRunner.cpp:3396
#26 0x00007ffff00736a3 in XREMain::XRE_main (this=0x7fffffffcfa0, argc=1, argv=0x7fffffffe418, aAppData=0x7ffff6c25700) at /home/username/src/comm-central/mozilla/toolkit/xre/nsAppRunner.cpp:3876
#27 0x00007ffff00739f1 in XRE_main (argc=1, argv=0x7fffffffe418, aAppData=0x7ffff6c25700, aFlags=0) at /home/username/src/comm-central/mozilla/toolkit/xre/nsAppRunner.cpp:4089
#28 0x0000000000402976 in do_main (exePath=0x7fffffffd310 "/home/username/src/comm-central/obj-x86_64-unknown-linux-gnu/mozilla/dist/bin/", argc=1, argv=0x7fffffffe418) at /home/username/src/comm-central/mail/app/nsMailApp.cpp:111
#29 0x0000000000402bf9 in main (argc=1, argv=0x7fffffffe418) at /home/username/src/comm-central/mail/app/nsMailApp.cpp:200


In a non-debug build I also got the warning
GLib-WARNING **: getpwuid_r(): failed due to: Verbindungsaufbau abgelehnt. ("Verbindungsaufbau abgelehnt" = connection refused)
The problem seems to be that libnss-ldap calls the ldap functions of libldap60.so from Thunderbird instead of the system's libldap as it probably should. But why is this happening?
Comparing a working system with a non-working one I found a workaround for everybody with this bug: install nscd (apt-get install nscd).

With nscd, the ldap libraries are not hit and the problem does not occur. So to reproduce this problem, make sure that nscd is not running.

What's a good solution to this? Things I could think of:

a) Rename the symbols exported by libldap60.so
b) Statically link Thunderbird's LDAP implementation so that libldap60.so is gone
c) Remove the libldap60.so from the loader's search path when calling gnome_program_init() in nsNativeAppSupportUnix.cpp:500 (I don't know if there is a sane way to do do that ...)
Version: 9 → Trunk
Given comment 7 that makes this a duplicate of bug 292127 which has history and discussion about the issue.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.