
beber at meleeweb
May 5, 2009, 11:59 AM
Post #1 of 1
(750 views)
Permalink
|
|
uclibc-0.9.30.1 and setrlimit
|
|
Hi, I'm searching how to resolv since some times and I think I shoud ask for help :). I'm cross-compilating with crossdev-wrappers from x86_64-pc-linux-gnu to i586-geode-linux-uclibc 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 USE flags, 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 FEATURES=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 eemple, but that's the same with other libpthread/setrlimit using software. You'll find attahed the uclibc .config. Thanks for your help -- Beber
|