Bug#258740: sigwait and -lpthread.
GOTO Masanori wrote:
I am running this on a 2.4 kernel. With 2.6 it seems to work fine. ( I
found that 2.6 strace reports rt_sigtimedwait where as strace with 2.4
reports rt_sigsuspend )
Note that rt_sigtimedwait was already implemented in 2.2.
BTW, you need to write the exact kernel version, you architecture and
the existence of libc6-i686.
kvaneesh@node1:/tmp$ ldd ./a.out
libpthread.so.0 => /lib/libpthread.so.0 (0x40027000)
libc.so.6 => /lib/libc.so.6 (0x40078000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
kvaneesh@node1:/tmp$ dpkg --search /lib/libpthread.so.0
libc6: /lib/libpthread.so.0
kvaneesh@node1:/tmp$
kvaneesh@node1:/tmp$ dpkg --status libc6
Package: libc6
Status: install ok installed
Priority: required
Section: base
Installed-Size: 15516
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Source: glibc
Version: 2.3.2.ds1-13
Replaces: ldso (<= 1.9.11-9), timezone, timezones, gconv-modules,
libtricks, libc6-bin, netkit-rpc, netbase (<< 4.0)
Provides: glibc-2.3.2.ds1-13
Depends: libdb1-compat
Suggests: locales, glibc-doc
Conflicts: strace (<< 4.0-0), libnss-db (<= 2.2-6.1.1), timezone,
timezones, gconv-modules, libtricks, libc6-doc, libc5 (<< 5.4.33-7),
libpthread0 (<< 0.7-10), libc6-bin, libwcsmbs, apt (<< 0.3.0),
libglib1.2 (<< 1.2.1-2), netkit-rpc, wine (<< 0.0.20031118-1),
cyrus-imapd (<< 1.5.19-15)
Description: GNU C Library: Shared libraries and Timezone data
Contains the standard libraries that are used by nearly all programs on
the system. This package includes shared versions of the standard C library
and the standard math library, as well as many others.
Timezone data is also included.
kvaneesh@node1:/tmp$
kvaneesh@node1:/tmp$ uname -a
Linux node1 2.4.25-1-386 #2 Wed Apr 14 19:38:08 EST 2004 i686 GNU/Linux
kvaneesh@node1:/tmp$ more /etc/debian_version
testing/unstable
kvaneesh@node1:/tmp$
kvaneesh@node1:/tmp$ ps -eaf | grep a.out
kvaneesh 24940 24893 0 09:52 pts/1 00:00:00 ./a.out
kvaneesh 24942 24924 0 09:52 pts/2 00:00:00 grep a.out
kvaneesh@node1:/tmp$ kill -TERM 24940
kvaneesh@node1:/tmp$
kvaneesh@node1:/tmp$ more /proc/24940/status
Name: a.out
State: S (sleeping)
Tgid: 24940
Pid: 24940
PPid: 24893
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 256
Groups: 1000 20 24 25 29 44
VmSize: 1664 kB
VmLck: 0 kB
VmRSS: 332 kB
VmData: 284 kB
VmStk: 4 kB
VmExe: 4 kB
VmLib: 1324 kB
SigPnd: 0000000000004000
SigBlk: fffffffefffafeff
SigIgn: 0000000000000000
SigCgt: 0000000380010000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
kvaneesh@node1:/tmp$
kvaneesh@node1:/tmp$ strace ./a.out
execve("./a.out", ["./a.out"], [/* 15 vars */]) = 0
uname({sys="Linux", node="node1", ...}) = 0
brk(0) = 0x80497fc
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40017000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=60715, ...}) = 0
old_mmap(NULL, 60715, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340A\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=81511, ...}) = 0
old_mmap(NULL, 328004, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40027000
old_mmap(0x40034000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xd000) = 0x40034000
old_mmap(0x40036000, 266564, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40036000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200^\1"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1243856, ...}) = 0
old_mmap(NULL, 1254020, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40078000
old_mmap(0x401a0000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x127000) = 0x401a0000
old_mmap(0x401a8000, 8836, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401a8000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x401ab000
munmap(0x40018000, 60715) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2044*1024, rlim_max=RLIM_INFINITY}) = 0
getpid() = 24951
rt_sigaction(SIGRTMIN, {0x4002f030, [], SA_RESTORER, 0x400a1658}, NULL,
8) = 0
rt_sigaction(SIGRT_1, {0x4002f080, [], SA_RESTORER, 0x400a1658}, NULL,
8) = 0
rt_sigaction(SIGRT_2, {0x4002f150, [], SA_RESTORER, 0x400a1658}, NULL,
8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbffffa24, 31, (nil), 0}) = 0
rt_sigaction(SIGCHLD, {0x400327a0, ~[], SA_RESTORER, 0x400a1658}, NULL,
8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigsuspend(~[CHLD RT_1]
Reply to: