The Samba-Bugzilla – Bug 902
applications core dump with a segmentation fault when LANG=en_US
Last modified: 2005-11-14 09:29:04 UTC
Applications such as smbpasswd and smbclient core dump immediately if the LANG
environment variable is set to en_US. It does not core dump if LANG is set to
other values such as C, POSIX, En_US or en_GB.
STEPS TO REPRODUCE:
Run one of the applications with LANG=en_US
# cd /usr/local/source/samba-3.0.1/source/bin
# export LANG=en_US
The application core dumps with a segmentation fault.
A prompt for a password...
# export LANG=C
New SMB password:
BUILD DATE & PLATFORM:
Samba 3.0.1 2003-12-15 on AIX 4.3.3 ML 11
ADDITIONAL BUILDS & PLATFORMS:
I know this also occurs with Samba 3.0.0.
Here's a stack trace from dbx.
# dbx (omitted several -I directives) ./smbpasswd
Type 'help' for help.
reading symbolic information ...warning: iconv.c is newer
[using memory image in core]
Segmentation fault in ptrgl.$PTRGL [/usr/lib/libc.a] at 0xd0170f90
0xd0170f90 ($PTRGL) 800b0000 lwz r0,0x0(r11)
ptrgl.$PTRGL() at 0xd0170f90
setlocale.setlocale(??, ??) at 0xd018fc5c
unnamed block $b223, line 63 in "charcnv.c"
charset_name(0x2), line 63 in "charcnv.c"
unnamed block $b234, line 120 in "charcnv.c"
init_iconv(), line 120 in "charcnv.c"
lazy_initialize_conv(), line 93 in "charcnv.c"
convert_string_allocate(0x0, 0x1, 0x0, 0x2004c0f8, 0x9, 0x2ff21c14), line 391
push_ucs2_allocate(0x2ff21c14, 0x2004c0f8), line 833 in "charcnv.c"
unix_strupper(0x2004c0f8, 0x9, 0x2004c0f8, 0x9), line 519 in "charcnv.c"
strupper_m(0x2004c0f8), line 1335 in "util_str.c"
set_global_myname(0x2003c860), line 102 in "util.c"
init_globals(), line 1334 in "loadparm.c"
lp_load(0x2ff225c4, 0x1, 0x0, 0x0), line 3923 in "loadparm.c"
process_options(argc = 0, argv = 0x2ff22a94, local_flags = 576), line 204
main(argc = 1, argv = 0x2ff22a90), line 581 in "smbpasswd.c"
Note that this appears to occur in function charset_name() in charcnv.c when it
tries to set the locale. There's a fragment of code as follows:
If I comment out this code and recompile then the problem does not occur.
Jeremy, can you look at this?
This looks like a AIX libc bug.
The call :
is a POSIX standard call telling libc to set the locale from
the environment variables.
An IBMer needs to have a look at this.
Reassigning to Jim. He has access to AIX (I don't).
could someone make a call on whether this is a
Samba issue or not? Seems like an another AIX issue to me.
This is probably fixed if it was our bug.
If not, then it points to an AIX issue.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.