[Bug 2173] New: Executable dies with segfault when it linked with -lpthread
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jul 6 21:57:37 UTC 2010
https://bugs.busybox.net/show_bug.cgi?id=2173
Summary: Executable dies with segfault when it linked with
-lpthread
Product: uClibc
Version: 0.9.30.3
Platform: PC
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P5
Component: Threads
AssignedTo: unassigned at uclibc.org
ReportedBy: nitr0 at seti.kr.ua
CC: uclibc-cvs at uclibc.org
Estimated Hours: 0.0
Created attachment 2179
--> https://bugs.busybox.net/attachment.cgi?id=2179
buggy uClibc config
I'm developing embedded Linux distro, and I saw that anything that requires
pthread library dies with segfault in libpthread. Even simpliest 'Hello world'
if it linked with pthread library. Any things like specifying -ldl at 1st
place, using -pthread instead of -lpthread does nothing.
I use gcc-3.3.3 in toolchain, and uClibc-0.9.30.3. Sources are compiled for
i686 CPU, target kernel - 2.6.32.10. In config I selected legacy pthread
library.
uClibc config in attach.
Here is strace of segfault:
(..............)
open("/var/testpoint/LEAF/buildtool/staging/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFIFO, st_size=1741429448180443563, ...}) = 0
close(3) = 0
open("/var/testpoint/LEAF/buildtool/staging/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFIFO, st_size=1741429448180443563, ...}) = 0
close(3) = 0
open("/var/testpoint/LEAF/buildtool/staging/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFIFO, st_size=1741429448180443563, ...}) = 0
close(3) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFIFO, st_size=1818811431570844075,
...}) = 0
mprotect(0xf77c4000, 4096, PROT_READ) = 0
mprotect(0xf77c1000, 4096, PROT_READ) = 0
mprotect(0xf77b8000, 4096, PROT_READ) = 0
mprotect(0xf77a7000, 4096, PROT_READ) = 0
mprotect(0xf77cc000, 4096, PROT_READ) = 0
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() = 20905
getrlimit(RLIMIT_STACK, {rlim_cur=-4286578688, rlim_max=-30920152606563096}) =
0
setrlimit(RLIMIT_STACK, {rlim_cur=-4292878336, rlim_max=-30920152606563096}) =
0
rt_sigaction(SIGRTMIN, {0xf77b73d4, [], SA_RESTORER, 0xf7774b2f}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xf77b7406, [RTMIN], SA_RESTORER, 0xf7774b2f}, NULL, 8)
= 0
rt_sigaction(SIGRT_2, {0xf77b74a6, [], SA_RESTORER, 0xf7774b2f}, 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) ---
+++ killed by SIGSEGV +++
Segmentation fault
--
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