following-up on 3rd item:
[..]
3. What does the traceback look like when bash is run under gdb and
allowed to fail?
I suspect that the libraries are pre-bound to use the system's malloc,
and the calls to different malloc libraries are causing the core dumps.
Another possibility is that libc functions are using private pseudo-
global libc malloc interfaces, causing the libc malloc to be linked in.
Either way, the trace and library load address maps indicate that the
process is dying in the libc malloc. One way to confirm my suspicion
is to start bash under gdb, set a breakpoint in malloc, and see where
it stops.
OK, I'll try that and come back to you.
So here's a cut & paste of my gdb session, showing that bash and libc
malloc routines are mixed (see below for possible explanation / fix):
$ gdb /usr/bin/bash
GNU gdb 6.3.50_2004-11-23-cvs
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 "sparc-sun-solaris2.11"...
(no debugging symbols found)
(gdb) start
Breakpoint 1 at 0x2ece4
Starting program: /usr/bin/bash
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 0118
(no debugging symbols found)
(no debugging symbols found)
0x0002ece4 in main ()
(gdb) break soft_build_secret_key_object
Function "soft_build_secret_key_object" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (soft_build_secret_key_object) pending.
(gdb) continue
Continuing.
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 03bc
warning: Lowest section in /lib/libthread.so.1 is .dynamic at 0478
warning: Lowest section in /lib/librt.so.1 is .dynamic at 01b0
Breakpoint 3 at 0xfea9fac0
Pending breakpoint "soft_build_secret_key_object" resolved
Breakpoint 3, 0xfea9fac0 in soft_build_secret_key_object ()
from /usr/lib/security/pkcs11_softtoken.so
(gdb) break malloc
Breakpoint 4 at 0xba4a4
(gdb) continue
Continuing.
Breakpoint 4, 0x000ba4a4 in malloc ()
(gdb) where
#0 0x000ba4a4 in malloc ()
#1 0xff0d0bf0 in calloc () from /lib/libc.so.1
#2 0xfea9faec in soft_build_secret_key_object ()
from /usr/lib/security/pkcs11_softtoken.so
#3 0xfeaa0ea4 in soft_build_object ()
from /usr/lib/security/pkcs11_softtoken.so
#4 0xfeaa5474 in soft_add_object () from
/usr/lib/security/pkcs11_softtoken.so
#5 0xfea97c64 in C_CreateObject () from
/usr/lib/security/pkcs11_softtoken.so
#6 0xfe9b5de4 in init_key_uef () from /usr/lib/gss/mech_krb5.so
#7 0xfe9b4d34 in krb5_c_make_random_key () from /usr/lib/gss/mech_krb5.so
#8 0xfe9f19d8 in krb5_generate_subkey () from /usr/lib/gss/mech_krb5.so
#9 0xfe9f472c in krb5int_generate_and_save_subkey ()
from /usr/lib/gss/mech_krb5.so
#10 0xfe9f4960 in krb5_mk_req_extended () from /usr/lib/gss/mech_krb5.so
#11 0xfe9a5098 in make_ap_req_v1 () from /usr/lib/gss/mech_krb5.so
#12 0xfe9a55c8 in new_connection () from /usr/lib/gss/mech_krb5.so
#13 0xfe9a5f8c in krb5_gss_init_sec_context () from
/usr/lib/gss/mech_krb5.so
#14 0xfe9a2bbc in k5glue_init_sec_context () from /usr/lib/gss/mech_krb5.so
#15 0xfec84a4c in gss_init_sec_context () from /usr/lib/libgss.so.1
#16 0xfecc32f4 in gssapi_client_mech_step () from /usr/lib/sasl/gssapi.so.1
#17 0xfed173e4 in sasl_client_step () from /usr/lib/libsasl.so.1
#18 0xfed172b0 in sasl_client_start () from /usr/lib/libsasl.so.1
#19 0xfef1737c in nsldapi_sasl_do_bind () from /usr/lib/libldap.so.5
#20 0xfef17afc in ldap_sasl_interactive_bind_s () from /usr/lib/libldap.so.5
#21 0xfef6e478 in doSASLBind () from /usr/lib/libsldap.so.1
#22 0xfef6c880 in openConnection () from /usr/lib/libsldap.so.1
#23 0xfef6bcdc in makeConnection () from /usr/lib/libsldap.so.1
#24 0xfef6d234 in getConnection () from /usr/lib/libsldap.so.1
#25 0xfef6d38c in __s_api_getConnection () from /usr/lib/libsldap.so.1
#26 0xfef60048 in get_current_session () from /usr/lib/libsldap.so.1
#27 0xfef60f24 in search_state_machine () from /usr/lib/libsldap.so.1
#28 0xfef62158 in ldap_list () from /usr/lib/libsldap.so.1
#29 0xfef62264 in __ns_ldap_list () from /usr/lib/libsldap.so.1
#30 0xfefbbe88 in _nss_ldap_lookup () from /usr/lib/nss_ldap.so.1
#31 0xfefba124 in getbyuid () from /usr/lib/nss_ldap.so.1
#32 0xff0edb08 in nss_search () from /lib/libc.so.1
#33 0xff0da488 in getpwuid_r () from /lib/libc.so.1
#34 0x00030e88 in get_current_user_info ()
#35 0x000310c8 in get_current_user_info ()
#36 0x0002f178 in main ()
(gdb) continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xff0e59c8 in realfree () from /lib/libc.so.1
(gdb) where
#0 0xff0e59c8 in realfree () from /lib/libc.so.1
#1 0xff0e62ac in cleanfree () from /lib/lib