[Bug 327] New: segfault with setrlimit/pthread.old on 0.9.30.1
bugzilla at busybox.net
bugzilla at busybox.net
Sat May 9 10:37:36 UTC 2009
https://bugs.busybox.net/show_bug.cgi?id=327
Host: x86_64-pc-linux-gnu
Target: i586-geode-linux-uclibc
Build: i586-geode-linux-uclibc
Summary: segfault with setrlimit/pthread.old on 0.9.30.1
Product: uClibc
Version: 0.9.30.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Threads
AssignedTo: unassigned at uclibc.org
ReportedBy: beber at meleeweb.net
CC: uclibc-cvs at uclibc.org
Estimated Hours: 0.0
Hi,
I'm using gentoo crossdev-wrappers build environnement to build my own system
with gcc 3.4.6-r2, kernel 2.6.28-r1 and libc/libthread_old 0.9.30.1-r1. All
almost compile fine and work good, but not software linked with libpthread and
doing setrlimit like e2fsprogs with chattr :
# chattr
Segmentation fault
And I get the following line in dmesg :
[470178.800998] chattr[6143]: segfault at 1ffe61 ip 00000000f7f59bd0 sp
00000000ffdca3c4 error 4 in libpthread-0.9.30.1.so[f7f55000+b000]
strace give the following :
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) =
0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) =
0
getpid() = 7492
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=RLIM_INFINITY}) = 0
rt_sigaction(SIGRTMIN, {0xf7f31109, [], SA_RESTORER, 0xf7f4766b}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xf7f31185, [RTMIN], SA_RESTORER, 0xf7f4766b}, NULL, 8)
= 0
rt_sigaction(SIGRT_2, {0xf7f3126f, [], SA_RESTORER, 0xf7f4766b}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
and gdb :
This GDB was configured as "i586-geode-linux-uclibc"...
(gdb) run
Starting program: /bin/chattr
[Thread debugging using libthread_db enabled]
[New Thread 0x400 (LWP 7575)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x400 (LWP 7575)]
0xf7f07bd0 in _pthread_cleanup_push_defer () from /lib/libpthread.so.0
(gdb) bt
#0 0xf7f07bd0 in _pthread_cleanup_push_defer () from /lib/libpthread.so.0
(gdb) br
Breakpoint 1 at 0xf7f07bd0
When I compile uclibc with debug, all works fine. That's a bit perturbing.
First, I don't understand why gdb can't give me more debug information, even if
I build with CFLAGS=-g and nostrip
Second, I don't understand why this is working when debug is activated. I can't
run device with a 51MB libc which is slowing down almost everything.
chattr is just an exemple, but that's the same with other libpthread/setrlimit
using software (lsattr, squid).
Actually it fail with >= 0.9.29 and >=0.9.30 and work good with 0.9.28*
You'll find attached the config
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the uClibc-cvs
mailing list