You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Kenneth Lee <ke...@cybermind.com.hk> on 2005/12/15 12:30:43 UTC
Test hanged with threads enabled on FreeBSD 4.10
Hi,
I have built APR successfully but when I run testall it hanged on testrand()
mysteriously. The test was OK when I rebuild with threads disabled.
I tried to place some breakpoints to track down the problem:
(gdb) b apr_generate_random_bytes
Breakpoint 1 at 0x804b3e0
(gdb) b apr_assert_success
Breakpoint 2 at 0x804bf18: file testutil.c, line 28.
(gdb) run
Starting program: /home/klee/apr-1.2.2/test/testall
Breakpoint 1 at 0x2809354d: file misc/unix/rand.c, line 80.
testatomic : SUCCESS
testdir : SUCCESS
testdso : SUCCESS
testdup : SUCCESS
testenv : SUCCESS
testfile : SUCCESS
testfilecopy : SUCCESS
testfileinfo : SUCCESS
testflock : SUCCESS
testfmt : SUCCESS
testfnmatch : SUCCESS
testargs : SUCCESS
testhash : SUCCESS
testipsub : SUCCESS
testlock : SUCCESS
testlfs : SUCCESS
testmmap : SUCCESS
testnames : SUCCESS
testoc : SUCCESS
testpath : SUCCESS
testpipe : SUCCESS
testpoll : SUCCESS
testpools : SUCCESS
testproc : SUCCESS
testprocmutex : SUCCESS
testrand : -
Breakpoint 1, apr_generate_random_bytes (buf=0xbfbffa44 "\205涂
005\bXE\025(", length=42) at misc/unix/rand.c:80
80 {
(gdb) cont
Continuing.
^Z
Program received signal SIGTSTP, Stopped (user).
0x2810fd44 in __sys_poll () from /usr/lib/libc_r.so.4
(gdb) bt
#0 0x2810fd44 in __sys_poll () from /usr/lib/libc_r.so.4
#1 0x2810f290 in _thread_kern_sched_state_unlock () from
/usr/lib/libc_r.so.4
#2 0x2810ec55 in _thread_kern_scheduler () from /usr/lib/libc_r.so.4
#3 0x0 in ?? ()
Does anybody managed to get it work on FreeBSD 4.x?
Thanks!
Kenneth
Re: Test hanged with threads enabled on FreeBSD 4.10
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On December 15, 2005 10:04:49 AM -0800 Paul Querna <ch...@force-elite.com>
wrote:
> Do not enable threads on FreeBSD 4.x It will just NOT work. If you MUST
> use threads on FreeBSD, you MUST upgrade to at least 5.3 or 6.0.
5.3 requires changes to libmap.conf to use libpthread instead of libc_r.
It'll work out of the box with 5.4-RELEASE and higher. -- justin
Re: Test hanged with threads enabled on FreeBSD 4.10
Posted by Paul Querna <ch...@force-elite.com>.
Kenneth Lee wrote:
> Hi,
>
> I have built APR successfully but when I run testall it hanged on testrand()
> mysteriously. The test was OK when I rebuild with threads disabled.
>
>
Do not enable threads on FreeBSD 4.x It will just NOT work. If you MUST
use threads on FreeBSD, you MUST upgrade to at least 5.3 or 6.0.
-Paul
> I tried to place some breakpoints to track down the problem:
>
> (gdb) b apr_generate_random_bytes
> Breakpoint 1 at 0x804b3e0
> (gdb) b apr_assert_success
> Breakpoint 2 at 0x804bf18: file testutil.c, line 28.
> (gdb) run
> Starting program: /home/klee/apr-1.2.2/test/testall
> Breakpoint 1 at 0x2809354d: file misc/unix/rand.c, line 80.
> testatomic : SUCCESS
> testdir : SUCCESS
> testdso : SUCCESS
> testdup : SUCCESS
> testenv : SUCCESS
> testfile : SUCCESS
> testfilecopy : SUCCESS
> testfileinfo : SUCCESS
> testflock : SUCCESS
> testfmt : SUCCESS
> testfnmatch : SUCCESS
> testargs : SUCCESS
> testhash : SUCCESS
> testipsub : SUCCESS
> testlock : SUCCESS
> testlfs : SUCCESS
> testmmap : SUCCESS
> testnames : SUCCESS
> testoc : SUCCESS
> testpath : SUCCESS
> testpipe : SUCCESS
> testpoll : SUCCESS
> testpools : SUCCESS
> testproc : SUCCESS
> testprocmutex : SUCCESS
> testrand : -
> Breakpoint 1, apr_generate_random_bytes (buf=0xbfbffa44 "\205涂
> 005\bXE\025(", length=42) at misc/unix/rand.c:80
> 80 {
> (gdb) cont
> Continuing.
> ^Z
> Program received signal SIGTSTP, Stopped (user).
> 0x2810fd44 in __sys_poll () from /usr/lib/libc_r.so.4
> (gdb) bt
> #0 0x2810fd44 in __sys_poll () from /usr/lib/libc_r.so.4
> #1 0x2810f290 in _thread_kern_sched_state_unlock () from
> /usr/lib/libc_r.so.4
> #2 0x2810ec55 in _thread_kern_scheduler () from /usr/lib/libc_r.so.4
> #3 0x0 in ?? ()
>
>
> Does anybody managed to get it work on FreeBSD 4.x?
>
> Thanks!
> Kenneth
>