1 |
Hi, |
2 |
|
3 |
I'm searching how to resolv since some times and I think I shoud ask |
4 |
for help :). |
5 |
|
6 |
I'm cross-compilating with crossdev-wrappers from x86_64-pc-linux-gnu |
7 |
to i586-geode-linux-uclibc with gcc 3.4.6-r2, kernel 2.6.28-r1 and |
8 |
libc/libthread_old 0.9.30.1-r1. All almost compile fine and work good, but not software |
9 |
linked with libpthread and doing setrlimit like e2fsprogs with chattr : |
10 |
|
11 |
# chattr |
12 |
Segmentation fault |
13 |
|
14 |
And I get the following line in dmesg : |
15 |
[470178.800998] chattr[6143]: segfault at 1ffe61 ip 00000000f7f59bd0 sp 00000000ffdca3c4 error 4 in libpthread-0.9.30.1.so[f7f55000+b000] |
16 |
|
17 |
strace give the following : |
18 |
|
19 |
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 |
20 |
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 |
21 |
getpid() = 7492 |
22 |
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 |
23 |
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=RLIM_INFINITY}) = 0 |
24 |
rt_sigaction(SIGRTMIN, {0xf7f31109, [], SA_RESTORER, 0xf7f4766b}, NULL, 8) = 0 |
25 |
rt_sigaction(SIGRT_1, {0xf7f31185, [RTMIN], SA_RESTORER, 0xf7f4766b}, NULL, 8) = 0 |
26 |
rt_sigaction(SIGRT_2, {0xf7f3126f, [], SA_RESTORER, 0xf7f4766b}, NULL, 8) = 0 |
27 |
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0 |
28 |
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0 |
29 |
--- SIGSEGV (Segmentation fault) @ 0 (0) --- |
30 |
|
31 |
and gdb : |
32 |
This GDB was configured as "i586-geode-linux-uclibc"... |
33 |
(gdb) run |
34 |
Starting program: /bin/chattr |
35 |
[Thread debugging using libthread_db enabled] |
36 |
[New Thread 0x400 (LWP 7575)] |
37 |
|
38 |
Program received signal SIGSEGV, Segmentation fault. |
39 |
[Switching to Thread 0x400 (LWP 7575)] |
40 |
0xf7f07bd0 in _pthread_cleanup_push_defer () from /lib/libpthread.so.0 |
41 |
(gdb) bt |
42 |
#0 0xf7f07bd0 in _pthread_cleanup_push_defer () from /lib/libpthread.so.0 |
43 |
(gdb) br |
44 |
Breakpoint 1 at 0xf7f07bd0 |
45 |
|
46 |
When I compile uclibc with debug USE flags, all works fine. That's a |
47 |
bit perturbing. |
48 |
|
49 |
First, I don't understand why gdb can't give me more debug information, |
50 |
even if I build with CFLAGS=-g and FEATURES=nostrip |
51 |
|
52 |
Second, I don't understand why this is working when debug is activated. |
53 |
I can't run device with a 51MB libc which is slowing down almost |
54 |
everything. |
55 |
|
56 |
chattr is just an eemple, but that's the same with other |
57 |
libpthread/setrlimit using software. |
58 |
|
59 |
You'll find attahed the uclibc .config. |
60 |
|
61 |
Thanks for your help |
62 |
|
63 |
-- |
64 |
Beber |