The application I called IP_CommunicationTest works fine, except when run under Valgrind. In this case a crash is reported when one thread sends a signal via pthread_kill() to another thread that is blocked in recv(). This is probably a PPC-only problem: Valgrind works fine on x86_64 when the same binary is recompiled on an Intel Xeon CPU. The output below has been obtained on an Ocotea board with mainstream Linux kernel and MontaVista Linux RFS (glibc, bash, ...). Note: sending a signal to a thread blocked in sigwait() works fine under Valgrind on PPC32. root@ocotea:~# uname -a Linux ocotea 2.6.20.3 #2 PREEMPT Tue Mar 20 17:41:41 CET 2007 ppc GNU/Linux root@ocotea:~# /lib/libc.so.6 GNU C Library stable release version 2.3.3, by Roland McGrath et al. Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 3.4.3 (MontaVista 3.4.3-25.0.132.0702461 2007-01-22). Compiled on a Linux 2.6.10_dev system on 2007-01-22. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others linuxthreads-0.10 by Xavier Leroy GNU Libidn by Simon Josefsson BIND-8.2.3-T5B libthread_db work sponsored by Alpha Processor Inc NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk software FPU emulation by Richard Henderson, Jakub Jelinek and others Thread-local storage support included. For bug reporting instructions, please see: <http://www.gnu.org/software/libc/bugs.html>. root@ocotea:~# echo | valgrind -v --trace-signals=yes /home/vanassb/4.0/DCM_MB/ Application/SoftwareTest/IP_Communication/IP_CommunicationTest ==8963== Memcheck, a memory error detector. ==8963== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==8963== Using LibVEX rev 1732, a library for dynamic binary translation. ==8963== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==8963== Using valgrind-3.2.3, a dynamic binary instrumentation framework. ==8963== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==8963== --8963-- Command line --8963-- /home/vanassb/4.0/DCM_MB/Application/SoftwareTest/IP_Communication/I P_CommunicationTest --8963-- Startup, with flags: --8963-- -v --8963-- --trace-signals=yes --8963-- Contents of /proc/version: --8963-- Linux version 2.6.20.3 (vanassb@sabekorlnx05) (gcc version 3.4.3 (Mon taVista 3.4.3-25.0.126.0602167 2006-12-12)) #2 PREEMPT Tue Mar 20 17:41:41 CET 2 007 --8963-- Arch and hwcaps: PPC32, ppc32-int --8963-- Page sizes: currently 4096, max supported 65536 --8963-- Valgrind library directory: /usr/lib/valgrind --8963-- Reading syms from /lib/ld-2.3.3.so (0x4000000) --8963-- Reading debug info from /usr/lib/debug/lib/ld-2.3.3.so.debug... --8963-- Reading syms from /home/vanassb/4.0/DCM_MB/Application/SoftwareTest/IP_ Communication/IP_CommunicationTest (0x10000000) --8963-- Reading syms from /usr/lib/valgrind/ppc32-linux/memcheck (0x38000000) --8963-- object doesn't have a dynamic symbol table --8963-- Max kernel-supported signal is 64 --8963-- Reading suppressions file: /usr/lib/valgrind/default.supp --8963-- REDIR: 0x4012D20 (strlen) redirected to 0x3802FDB0 (vgPlain_ppc32_linux _REDIR_FOR_strlen) --8963-- REDIR: 0x4012B50 (strcmp) redirected to 0x3802FDD8 (vgPlain_ppc32_linux _REDIR_FOR_strcmp) --8963-- REDIR: 0x4012A6C (index) redirected to 0x3802FE4C (vgPlain_ppc32_linux_ REDIR_FOR_strchr) --8963-- Reading syms from /usr/lib/valgrind/ppc32-linux/vgpreload_core.so (0xFF DF000) --8963-- Reading syms from /usr/lib/valgrind/ppc32-linux/vgpreload_memcheck.so ( 0xFFB9000) --8963-- signal 11 arrived ... si_code=1, EIP=0x400C98C, eip=0x4274B72C --8963-- SIGSEGV: si_code=1 faultaddr=0x7EE7BF70 tid=1 ESP=0x7EE7BF70 seg=0x7E67 D000-0x7EE7BFFF --8963-- -> extended stack base to 0x7EE7B000 --8963-- REDIR: 0x4013154 (bcmp) redirected to 0xFFBDD98 (bcmp) --8963-- REDIR: 0x4013AA0 (memcpy) redirected to 0xFFBD910 (memcpy) --8963-- REDIR: 0x40138E0 (mempcpy) redirected to 0xFFBE54C (mempcpy) --8963-- Reading syms from /lib/tls/libpthread-2.3.3.so (0xFF84000) --8963-- Reading debug info from /usr/lib/debug/lib/tls/libpthread-2.3.3.so.debu g... --8963-- Reading syms from /lib/tls/librt-2.3.3.so (0xFF5C000) --8963-- Reading debug info from /usr/lib/debug/lib/tls/librt-2.3.3.so.debug... --8963-- Reading syms from /usr/lib/libstdc++.so.6.0.3 (0xFE58000) --8963-- Reading debug info from /usr/lib/debug/usr/lib/libstdc++.so.6.0.3.debug ... --8963-- Reading syms from /lib/tls/libm-2.3.3.so (0xFD8B000) --8963-- Reading debug info from /usr/lib/debug/lib/tls/libm-2.3.3.so.debug... --8963-- Reading syms from /lib/libgcc_s.so.1 (0xFD5E000) --8963-- Reading debug info from /usr/lib/debug/lib/libgcc_s.so.1.debug... --8963-- Reading syms from /lib/tls/libc-2.3.3.so (0xFC0C000) --8963-- Reading debug info from /usr/lib/debug/lib/tls/libc-2.3.3.so.debug... --8963-- REDIR: 0xFC839D4 (memcpy) redirected to 0xFFBD728 (memcpy) ++8963++ sys_sigaction: sigNo 32, new 0x7EE7C850, old 0x0, new flags 0x4 ++8963++ sys_sigaction: sigNo 33, new 0x7EE7C850, old 0x0, new flags 0x10000004 ++8963++ do_setmask: tid = 1 how = 1 (SIG_UNBLOCK), set = 0x7EE7C9A4 00000001800 00000 --8963-- REDIR: 0xFC822C8 (rindex) redirected to 0xFFBCC2C (rindex) --8963-- REDIR: 0xFC81E24 (strlen) redirected to 0xFFBD1A4 (strlen) --8963-- REDIR: 0xFC81800 (strcpy) redirected to 0xFFBD258 (strcpy) --8963-- REDIR: 0xFC83024 (memset) redirected to 0xFFBE1B4 (memset) --8963-- REDIR: 0xFC82B74 (bcmp) redirected to 0xFFBDD3C (bcmp) ++8963++ sys_sigaction: sigNo 14, new 0x7EE7C760, old 0x0, new flags 0x0 ++8963++ do_setmask: tid = 1 how = 0 (SIG_BLOCK), set = 0x7EE7C950 0000000000002 000 --8963-- REDIR: 0xFF0CF7C (operator new(unsigned)) redirected to 0xFFBAD90 (oper ator new(unsigned)) All network interface indexes: --8963-- REDIR: 0xFF0B64C (operator delete(void*)) redirected to 0xFFBBB78 (oper ator delete(void*)) --8963-- signal 11 arrived ... si_code=1, EIP=0x100114A0, eip=0x4284C68C --8963-- SIGSEGV: si_code=1 faultaddr=0x7EE7A6C0 tid=1 ESP=0x7EE7A6C0 seg=0x7E67 D000-0x7EE7AFFF --8963-- -> extended stack base to 0x7EE7A000 --8963-- REDIR: 0xFC82E78 (memmove) redirected to 0xFFBE1F4 (memmove) 1 2 3 4 5 --8963-- REDIR: 0xFC83300 (mempcpy) redirected to 0xFFBE3F4 (mempcpy) Multicast-capable network interface indexes: 1 2 3 4 All network interfaces: --8963-- REDIR: 0xFC82200 (strncpy) redirected to 0xFFBD394 (strncpy) --8963-- REDIR: 0xFC816D0 (strcmp) redirected to 0xFFBD594 (strcmp) eth0 eth1 eth2 eth3 lo Multicast-capable network interfaces: eth0 eth1 eth2 eth3 Primary addresses of all network interfaces: --8963-- REDIR: 0xFC7D88C (malloc) redirected to 0xFFBA8D0 (malloc) 172.30.39.77 127.0.0.1 All addresses associated with all network interfaces: eth0 172.30.39.77 eth1 eth2 eth3 lo 127.0.0.1 Primary addresses of multicast-capable network interfaces: 172.30.39.77 Waiting for netlink events ... --8963-- REDIR: 0xFC7D470 (calloc) redirected to 0xFFBC320 (calloc) ++8963++ do_setmask: tid = 2 how = 1 (SIG_UNBLOCK), set = 0x49263B0 000000000000 2000 --8963-- tgkill: sending signal 14 to pid 8963/8964 --8963-- Async handler got signal 14 for tid 2 info -6 --8963-- delivering signal 14 (SIGALRM):-6 to thread 2 --8963-- push_signal_frame (thread 2): signal 14 ==8963== at 0xFF90CFC: recv (socket.S:102) ==8963== by 0x100128BC: CNetlinkInterfaceLinux::CRoutingNotification::WaitFor Notification() (Netlink-linux.cpp:1504) ==8963== by 0x10003928: NotificationThread(void*) (IP_CommunicationTest.cpp:5 3) ==8963== by 0xFF899AC: start_thread (pthread_create.c:256) ==8963== by 0xFCD1284: clone (clone.S:94) --8963-- delivering signal 11 (SIGSEGV):2 to thread 2 --8963-- delivering 11 (code 2) to default handler; action: terminate+core ==8963== ==8963== Process terminating with default action of signal 11 (SIGSEGV) ==8963== Bad permissions for mapped region at address 0x4925D38 ==8963== at 0x4925D38: ??? ==8963== by 0xFF90CE4: recv (socket.S:97) ==8963== by 0x100128BC: CNetlinkInterfaceLinux::CRoutingNotification::WaitFor Notification() (Netlink-linux.cpp:1504) ==8963== by 0x10003928: NotificationThread(void*) (IP_CommunicationTest.cpp:5 3) ==8963== by 0xFF899AC: start_thread (pthread_create.c:256) ==8963== by 0xFCD1284: clone (clone.S:94) --8963-- kill_thread zaps tid 1 lwp 8963 --8963-- sigvgkill for lwp 8963 tid 1 ++8963++ sys_sigaction: sigNo 11, new 0x426F68C0, old 0x0, new flags 0x0 ++8963++ sys_sigaction: sigNo 7, new 0x426F68C0, old 0x0, new flags 0x0 ++8963++ sys_sigaction: sigNo 4, new 0x426F68C0, old 0x0, new flags 0x0 ++8963++ sys_sigaction: sigNo 8, new 0x426F68C0, old 0x0, new flags 0x0 --8963-- REDIR: 0xFC7E18C (free) redirected to 0xFFBB7A4 (free) ==8963== ==8963== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 3) --8963-- --8963-- supp: 2 Ubuntu-stripped-ld.so --8963-- supp: 1 glibc-2.3.x-on-SuSE-10.1-(PPC)-1 --8963-- supp: 4 glibc-2.3.x-on-SuSE-10.0-(PPC)-1 ==8963== malloc/free: in use at exit: 162 bytes in 5 blocks. ==8963== malloc/free: 188 allocs, 183 frees, 28,522 bytes allocated. ==8963== ==8963== searching for pointers to 5 not-freed blocks. ==8963== checked 8,707,084 bytes. ==8963== ==8963== LEAK SUMMARY: ==8963== definitely lost: 0 bytes in 0 blocks. ==8963== possibly lost: 68 bytes in 1 blocks. ==8963== still reachable: 94 bytes in 4 blocks. ==8963== suppressed: 0 bytes in 0 blocks. ==8963== Rerun with --leak-check=full to see details of leaked memory. --8963-- memcheck: sanity checks: 6 cheap, 1 expensive --8963-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --8963-- memcheck: auxmaps: 0 searches, 0 comparisons --8963-- memcheck: SMs: n_issued = 24 (384k, 0M) --8963-- memcheck: SMs: n_deissued = 0 (0k, 0M) --8963-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M) --8963-- memcheck: SMs: max_undefined = 0 (0k, 0M) --8963-- memcheck: SMs: max_defined = 180 (2880k, 2M) --8963-- memcheck: SMs: max_non_DSM = 24 (384k, 0M) --8963-- memcheck: max sec V bit nodes: 0 (0k, 0M) --8963-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) --8963-- memcheck: max shadow mem size: 688k, 0M --8963-- translate: fast SP updates identified: 1,453 ( 55.2%) --8963-- translate: generic_known SP updates identified: 429 ( 16.3%) --8963-- translate: generic_unknown SP updates identified: 746 ( 28.3%) --8963-- tt/tc: 30,489 tt lookups requiring 31,145 probes --8963-- tt/tc: 30,488 fast-cache updates, 161 flushes --8963-- transtab: new 4,626 (169,596 -> 2,324,012; ratio 137:10) [0 scs ] --8963-- transtab: dumped 0 (0 -> ??) --8963-- transtab: discarded 276 (14,848 -> ??) --8963-- scheduler: 623,426 jumps (bb entries). --8963-- scheduler: 6/26,907 major/minor sched events. --8963-- sanity: 7 cheap, 1 expensive checks. --8963-- exectx: 30,011 lists, 215 contexts (avg 0 per list) --8963-- exectx: 378 searches, 163 full compares (431 per 1000) --8963-- exectx: 0 cmp2, 14 cmp4, 0 cmpAll Killed Valgrind 3.2.3 output on x86_64: ==28377== Memcheck, a memory error detector. ==28377== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==28377== Using LibVEX rev 1732, a library for dynamic binary translation. ==28377== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==28377== Using valgrind-3.2.3, a dynamic binary instrumentation framework. ==28377== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==28377== --28377-- Command line --28377-- ./IP_CommunicationTest --28377-- Startup, with flags: --28377-- -v --28377-- --trace-signals=yes --28377-- Contents of /proc/version: --28377-- Linux version 2.6.18.2-34-default (geeko@buildhost) (gcc version 4.1 .2 20061115 (prerelease) (SUSE Linux)) #1 SMP Mon Nov 27 11:46:27 UTC 2006 --28377-- Arch and hwcaps: AMD64, amd64-sse2 --28377-- Page sizes: currently 4096, max supported 4096 --28377-- Valgrind library directory: /home/vanassb/valgrind/lib/valgrind --28377-- Reading syms from /home/vanassb/4.0/DCM_MB/Application/SoftwareTest/IP _Communication/IP_CommunicationTest (0x400000) --28377-- Reading syms from /lib64/ld-2.5.so (0x4000000) --28377-- Reading syms from /home/vanassb/valgrind/lib/valgrind/amd64-linux/memc heck (0x38000000) --28377-- object doesn't have a dynamic symbol table --28377-- Max kernel-supported signal is 64 --28377-- Reading suppressions file: /home/vanassb/valgrind/lib/valgrind/default .supp --28377-- Reading syms from /home/vanassb/valgrind/lib/valgrind/amd64-linux/vgpr eload_core.so (0x4A1E000) --28377-- Reading syms from /home/vanassb/valgrind/lib/valgrind/amd64-linux/vgpr eload_memcheck.so (0x4C20000) --28377-- REDIR: 0x4013FE0 (index) redirected to 0x4C23790 (index) --28377-- REDIR: 0x4014190 (strcmp) redirected to 0x4C23900 (strcmp) --28377-- REDIR: 0x40144D0 (strlen) redirected to 0x4C23830 (strlen) --28377-- Reading syms from /lib64/libpthread-2.5.so (0x4E27000) --28377-- Reading syms from /lib64/librt-2.5.so (0x5042000) --28377-- Reading syms from /usr/lib64/libstdc++.so.6.0.8 (0x524B000) --28377-- object doesn't have a symbol table --28377-- Reading syms from /lib64/libm-2.5.so (0x5549000) --28377-- Reading syms from /lib64/libgcc_s.so.1 (0x579F000) --28377-- object doesn't have a symbol table --28377-- Reading syms from /lib64/libc-2.5.so (0x59AD000) --28377-- REDIR: 0x5A221D0 (memset) redirected to 0x4C23AA0 (memset) ++28377++ sys_sigaction: sigNo 32, new 0x7FEFFFC30, old 0x0, new flags 0x4000004 ++28377++ sys_sigaction: sigNo 33, new 0x7FEFFFC30, old 0x0, new flags 0x1400000 4 ++28377++ do_setmask: tid = 1 how = 1 (SIG_UNBLOCK), set = 0x7FEFFFCE8 18 0000000 --28377-- REDIR: 0x5A237C0 (memcpy) redirected to 0x4C24570 (memcpy) --28377-- REDIR: 0x5A213F0 (rindex) redirected to 0x4C23640 (rindex) --28377-- REDIR: 0x5A20D50 (strlen) redirected to 0x4C237F0 (strlen) ++28377++ sys_sigaction: sigNo 14, new 0x7FEFFF9E0, old 0x0, new flags 0x4000000 ++28377++ do_setmask: tid = 1 how = 0 (SIG_BLOCK), set = 0x7FEFFFB60 2000 --28377-- REDIR: 0x5305FB0 (operator new(unsigned long)) redirected to 0x4C231A1 (operator new(unsigned long)) --28377-- REDIR: 0x5A22430 (mempcpy) redirected to 0x4C24050 (mempcpy) --28377-- REDIR: 0x5304D70 (operator delete(void*)) redirected to 0x4C222B6 (ope rator delete(void*)) --28377-- signal 11 arrived ... si_code=1, EIP=0x40D700, eip=0x402D9855D --28377-- SIGSEGV: si_code=1 faultaddr=0x7FEFFD7B8 tid=1 ESP=0x7FEFFD790 seg=0x7 FE801000-0x7FEFFDFFF --28377-- -> extended stack base to 0x7FEFFD000 --28377-- REDIR: 0x5A22040 (memmove) redirected to 0x4C23AD0 (memmove) --28377-- REDIR: 0x5A21340 (strncpy) redirected to 0x4C23E10 (strncpy) --28377-- REDIR: 0x5A1FFD0 (strcmp) redirected to 0x4C238C0 (strcmp) All network interface indexes: 1 2 3 4 Multicast-capable network interface indexes: 2 3 All network interfaces: eth0 eth1 lo sit0 Multicast-capable network interfaces: eth0 eth1 Primary addresses of all network interfaces: 127.0.0.1 172.30.36.154 All addresses associated with all network interfaces: eth0 eth1 172.30.36.154 lo 127.0.0.1 sit0 Primary addresses of multicast-capable network interfaces: 172.30.36.154 Waiting for netlink events ... --28377-- REDIR: 0x5A1CD70 (calloc) redirected to 0x4C21CB9 (calloc) ++28377++ do_setmask: tid = 2 how = 1 (SIG_UNBLOCK), set = 0x64ECFE0 2000 --28377-- tgkill: sending signal 14 to pid 28377/28378 --28377-- tgkill: sent signal 14 to pid 28377/28378 --28377-- Async handler got signal 14 for tid 2 info -6 --28377-- delivering signal 14 (SIGALRM):-6 to thread 2 --28377-- push_signal_frame (thread 2): signal 14 ==28377== at 0x4E341F1: recv (in /lib64/libpthread-2.5.so) ==28377== by 0x40D51A: CNetlinkInterfaceLinux::CRoutingNotification::WaitForN otification() (Netlink-linux.cpp:1504) ==28377== by 0x40576E: NotificationThread(void*) (IP_CommunicationTest.cpp:53 ) ==28377== by 0x4E2D09D: start_thread (in /lib64/libpthread-2.5.so) ==28377== by 0x5A6E4CC: clone (in /lib64/libc-2.5.so) --28377-- VG_(signal_return) (thread 2): isRT=1 valid magic; RIP=0x4E341F1 ++28377++ do_setmask: tid = 2 how = 0 (SIG_BLOCK), set = 0x64ECFF0 2 000 ++28377++ sys_sigaction: sigNo 11, new 0x402C87840, old 0x0, new flags 0x0 ++28377++ sys_sigaction: sigNo 7, new 0x402C87840, old 0x0, new flags 0x0 ++28377++ sys_sigaction: sigNo 4, new 0x402C87840, old 0x0, new flags 0x0 ++28377++ sys_sigaction: sigNo 8, new 0x402C87840, old 0x0, new flags 0x0 --28377-- REDIR: 0x5A1AEC0 (free) redirected to 0x4C225A4 (free) ==28377== ==28377== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1) --28377-- --28377-- supp: 2 dl-hack3 ==28377== malloc/free: in use at exit: 0 bytes in 0 blocks. ==28377== malloc/free: 152 allocs, 152 frees, 23,815 bytes allocated. ==28377== ==28377== All heap blocks were freed -- no leaks are possible. --28377-- memcheck: sanity checks: 4 cheap, 1 expensive --28377-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --28377-- memcheck: auxmaps: 0 searches, 0 comparisons --28377-- memcheck: SMs: n_issued = 22 (352k, 0M) --28377-- memcheck: SMs: n_deissued = 1 (16k, 0M) --28377-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M) --28377-- memcheck: SMs: max_undefined = 0 (0k, 0M) --28377-- memcheck: SMs: max_defined = 422 (6752k, 6M) --28377-- memcheck: SMs: max_non_DSM = 22 (352k, 0M) --28377-- memcheck: max sec V bit nodes: 0 (0k, 0M) --28377-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) --28377-- memcheck: max shadow mem size: 4496k, 4M --28377-- translate: fast SP updates identified: 6,851 ( 87.0%) --28377-- translate: generic_known SP updates identified: 517 ( 6.5%) --28377-- translate: generic_unknown SP updates identified: 505 ( 6.4%) --28377-- tt/tc: 10,181 tt lookups requiring 10,588 probes --28377-- tt/tc: 10,181 fast-cache updates, 5 flushes --28377-- transtab: new 4,728 (118,580 -> 2,235,813; ratio 188:10) [0 sc s] --28377-- transtab: dumped 0 (0 -> ??) --28377-- transtab: discarded 11 (291 -> ??) --28377-- scheduler: 467,630 jumps (bb entries). --28377-- scheduler: 4/5,969 major/minor sched events. --28377-- sanity: 5 cheap, 1 expensive checks. --28377-- exectx: 30,011 lists, 200 contexts (avg 0 per list) --28377-- exectx: 306 searches, 106 full compares (346 per 1000) --28377-- exectx: 0 cmp2, 1 cmp4, 0 cmpAll
Replaced this item by item 149519, which includes a test program.
Duplicate of http://bugs.kde.org/show_bug.cgi?id=149519.