Hi,

"make tests" had starting hanging in t/src/extend.t.  I think it might
be the same problem chromatic was experiencing recently, but really I
have no idea.  Putting a "Parrot_exit(0);" in front of the "return 0;"s
caused all the t/src/extend.t tests to work.  I had the same problems in
t/src/intlist.t; and the same solution worked.  After that all the tests
in t/src worked.

Oh yeah, the patch is probably The Wrong Way To Do It because I have no idea
what I'm doing ;-)

In addition to the patch, I'm attaching a short log of the backtrace in
case someone can glean helpful information from it :-)

Jeff

(Hopefully) Relevent information:
uname -a:
Linux localhost.localdomain 2.4.22-ben2 #1 Thu Sep 25 00:11:16 EDT 2003 ppc ppc ppc 
GNU/Linux

perl -v:
This is perl, v5.8.0 built for ppc-linux-thread-multi
[snip]

gcc -v
Reading specs from /usr/lib/gcc-lib/ppc-yellowdog-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking 
--with-system-zlib --enable-__cxa_atexit --host=ppc-yellowdog-linux
Thread model: posix
gcc version 3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a)
[EMAIL PROTECTED] parrot]$ make src_tests
perl t/harness t/src/*.t
t/src/basic.......ok 3/3
t/src/exit........ok 3/3
t/src/extend......
[1]+  Stopped                 make src_tests
[EMAIL PROTECTED] parrot]$ bg
[1]+ make src_tests &
[EMAIL PROTECTED] parrot]$ ps aux | grep extend
jad      26786  0.4  0.7  7180 2860 pts/1    S    12:45   0:00 perl t/src/extend
jad      26793  0.0  0.4 15680 1800 pts/1    S    12:45   0:00 ./t/src/extend_1
jad      26798  0.0  0.1  3400  616 pts/1    S    12:46   0:00 grep extend
[EMAIL PROTECTED] parrot]$ gdb ./t/src/extend_1 26793
GNU gdb Yellow Dog Linux (5.2.1-4b)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-yellowdog-linux"...
Attaching to program: /home/jad/code/parrot/parrot/t/src/extend_1, process 26793
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libpthread.so.0...done.
[New Thread 16384 (LWP 26793)]
[New Thread 32769 (LWP 26794)]
[New Thread 16386 (LWP 26795)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
0x0fd03d04 in __sigsuspend (set=0x7ffff368) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:76
76      ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory.
        in ../sysdeps/unix/sysv/linux/sigsuspend.c
(gdb) bac
#0  0x0fd03d04 in __sigsuspend (set=0x7ffff368) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:76
#1  0x0fea810c in __pthread_wait_for_restart_signal (self=0x4) at pthread.c:1141
#2  0x0fea842c in pthread_onexit_process (retcode=4, arg=0x8) at restart.h:34
#3  0x0fd06304 in exit (status=0) at exit.c:54
#4  0x0fcee050 in __libc_start_main (argc=1, ubp_av=0x7ffff544, ubp_ev=0x1, 
auxvec=0x7ffff5dc, rtld_fini=0x4, 
    stinfo=0x101d7bd8, stack_on_entry=0xfea80fc) at 
../sysdeps/powerpc/elf/libc-start.c:178
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /home/jad/code/parrot/parrot/t/src/extend_1, process 26793
[EMAIL PROTECTED] parrot]$ ps aux | grep extend
jad      26786  0.2  0.7  7180 2860 pts/1    S    12:45   0:00 perl t/src/extend
jad      26793  0.0  0.4 15680 1800 pts/1    S    12:45   0:00 ./t/src/extend_1
jad      26801  0.0  0.1  3400  616 pts/1    S    12:47   0:00 grep extend
[EMAIL PROTECTED] parrot]$ gdb perl 26786
GNU gdb Yellow Dog Linux (5.2.1-4b)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-yellowdog-linux"...(no debugging symbols found)...
Attaching to program: /usr/bin/perl, process 26786
Reading symbols from 
/usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so...done.
Loaded symbols for /usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libpthread.so.0...done.
[New Thread 16384 (LWP 26786)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
0x0fd742c4 in __libc_waitpid (pid=26793, stat_loc=0x7ffff1c0, options=0) at 
../sysdeps/unix/sysv/linux/waitpid.c:28
28      ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
        in ../sysdeps/unix/sysv/linux/waitpid.c
(gdb) bac
#0  0x0fd742c4 in __libc_waitpid (pid=26793, stat_loc=0x7ffff1c0, options=0) at 
../sysdeps/unix/sysv/linux/waitpid.c:28
#1  0x0ff3661c in Perl_wait4pid () from 
/usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so
#2  0x0ff8b104 in Perl_pp_system () from 
/usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so
#3  0x0ff45808 in Perl_runops_standard () from 
/usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so
#4  0x0fef14b8 in S_run_body () from 
/usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so
#5  0x0fef1158 in perl_run () from 
/usr/lib/perl5/5.8.0/ppc-linux-thread-multi/CORE/libperl.so
#6  0x10002190 in main ()
#7  0x0fc2304c in __libc_start_main (argc=2, ubp_av=0x7ffff544, ubp_ev=0x0, 
auxvec=0x7ffff5e0, rtld_fini=0x200, 
    stinfo=0x10003134, stack_on_entry=0x7ffff1c0) at 
../sysdeps/powerpc/elf/libc-start.c:178
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /usr/bin/perl, process 26786
[EMAIL PROTECTED] parrot]$ 
Index: t/src/extend.t
===================================================================
RCS file: /cvs/public/parrot/t/src/extend.t,v
retrieving revision 1.14
diff -u -r1.14 extend.t
--- t/src/extend.t      11 Jan 2004 11:06:08 -0000      1.14
+++ t/src/extend.t      24 Jan 2004 16:57:39 -0000
@@ -27,6 +27,7 @@
 
     printf("%d\n", (int)new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 
@@ -58,6 +59,7 @@
 
     printf("%.1f\n", (double)new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 
@@ -83,6 +85,7 @@
     output = Parrot_new_string(interpreter, "Test", 4, NULL, NULL, 0, 0);
     PIO_eprintf(interpreter, "%S\n", output);
 
+    Parrot_exit(0);
     return 0;
 }
 
@@ -112,6 +115,7 @@
     new_value = Parrot_get_strreg(interpreter, parrot_reg);
     PIO_eprintf(interpreter, "%S\n", new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 
@@ -144,6 +148,7 @@
 
     printf("%ld\n", (long)new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE
@@ -179,6 +184,7 @@
     new_value = Parrot_PMC_get_intval(interpreter, newpmc);
     printf("%d\n", (int)new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE
@@ -211,6 +217,7 @@
 
     printf("%.7f\n", (double)new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE
@@ -243,6 +250,7 @@
 
     PIO_eprintf(interpreter, "%S\n", new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE
@@ -276,6 +284,7 @@
 
     Parrot_free_cstring(new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE
@@ -313,6 +322,7 @@
 
     Parrot_free_cstring(new_value);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE
Index: t/src/intlist.t
===================================================================
RCS file: /cvs/public/parrot/t/src/intlist.t,v
retrieving revision 1.9
diff -u -r1.9 intlist.t
--- t/src/intlist.t     13 Dec 2003 15:01:19 -0000      1.9
+++ t/src/intlist.t     24 Jan 2004 16:57:40 -0000
@@ -22,6 +22,7 @@
             x = (int) intlist_get(interpreter, list, 0);
 
             printf("The answer is %d.\n", x);
+            Parrot_exit(0);
             return 0;
         }
 CODE
Index: t/src/sprintf.t
===================================================================
RCS file: /cvs/public/parrot/t/src/sprintf.t,v
retrieving revision 1.25
diff -u -r1.25 sprintf.t
--- t/src/sprintf.t     13 Dec 2003 15:01:19 -0000      1.25
+++ t/src/sprintf.t     24 Jan 2004 16:57:40 -0000
@@ -7,6 +7,7 @@
 int main(int argc, char* argv[]) {
     PIO_printf(NULL, INTVAL_FMT "\n", (INTVAL) 42);
     PIO_printf(NULL, FLOATVAL_FMT "\n", (FLOATVAL) 42.0);
+    Parrot_exit(0);
     return 0;
 }
 CODE
@@ -157,6 +158,7 @@
     Parrot_init(interpreter);
     do_test(interpreter);
 
+    Parrot_exit(0);
     return 0;
 }
 CODE

Reply via email to