Irek Szczesniak
2014-03-12 09:04:00 UTC
ast-ksh.2014-03-01 on Linux hangs in heredoc.sh test:
+ /home/irek/ast/20140301/arch/linux.i386-64/src/cmd/ksh93/ksh
./src/cmd/ksh93/tests/shtests --locale
LD_LIBRARY_PATH_64=/home/irek/ast/20140301/arch/linux.i386-64/lib:
LD_LIBRARY_PATH=/home/irek/ast/20140301/arch/linux.i386-64/lib:/usr/lib64/mpi/gcc/openmpi/lib64
LD_LIBRARY_PATH_32=/home/irek/ast/20140301/arch/linux.i386-64/lib:
LC_ALL=C LANG=C VMALLOC_OPTIONS=abort
SHCOMP='/home/irek/ast/20140301/arch/*/bin/shcomp'
./src/cmd/ksh93/tests/heredoc.sh
test heredoc begins at 2014-03-12+03:58:27
free error:region=0x25c61f9eceb0:block=0x7f57a4da9be0:outside region:
^C
#0 0x00007f57a477b1b0 in __nanosleep_nocancel () from /lib64/libc.so.6
#1 0x00007f57a4ae519f in tvsleep (tv=0x0, rv=0x0) at
/home/irek/ast/20140301/src/lib/libast/tm/tvsleep.c:64
#2 0x00007f57a4b4f883 in asorelax (nsec=262144) at
/home/irek/ast/20140301/src/lib/libast/aso/asorelax.c:46
#3 0x00007f57a4b4f832 in asolock (lock=0x25c61fdeb03c, key=20130501,
type=4) at /home/irek/ast/20140301/src/lib/libast/aso/asolock.c:40
#4 0x00007f57a4b58402 in dballoc (vm=0x25c61f9eceb0, size=176,
local=0) at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:333
#5 0x00007f57a4b50f58 in _ast_malloc (size=176) at
/home/irek/ast/20140301/src/lib/libast/vmalloc/malloc.c:770
#6 0x00007f57a4b23ac1 in sfnew (oldf=0x0, buf=0x25c61fe55770,
size=32, file=-1, flags=5)
at /home/irek/ast/20140301/src/lib/libast/sfio/sfnew.c:97
#7 0x00007f57a4b40627 in _sfopenat (cwd=-100, f=0x0,
file=0x25c61fe55770 "cd /; rm -rf /tmp/tmp6ETCkUN.XYq",
mode=0x7f57a56f414f "s")
at /home/irek/ast/20140301/src/lib/libast/sfio/_sfopen.c:120
#8 0x00007f57a4b40763 in _sfopen (f=0x0, file=0x25c61fe55770 "cd /;
rm -rf /tmp/tmp6ETCkUN.XYq", mode=0x7f57a56f414f "s")
at /home/irek/ast/20140301/src/lib/libast/sfio/_sfopen.c:203
#9 0x00007f57a4b246d3 in sfopen (f=0x0, file=0x25c61fe55770 "cd /; rm
-rf /tmp/tmp6ETCkUN.XYq", mode=0x7f57a56f414f "s")
at /home/irek/ast/20140301/src/lib/libast/sfio/sfopen.c:40
#10 0x00007f57a56860f9 in sh_trap_20120720 (shp=0x7f57a5921b60 <sh>,
trap=0x25c61fe55770 "cd /; rm -rf /tmp/tmp6ETCkUN.XYq", mode=0)
at /home/irek/ast/20140301/src/cmd/ksh93/sh/fault.c:863
#11 0x00007f57a568568c in sh_done (ptr=0x7f57a5921b60 <sh>, sig=6) at
/home/irek/ast/20140301/src/cmd/ksh93/sh/fault.c:647
#12 0x00007f57a5684481 in sh_fault (sig=6, info=0x7fff0a5f2670,
context=0x7fff0a5f2540) at
/home/irek/ast/20140301/src/cmd/ksh93/sh/fault.c:182
#13 <signal handler called>
#14 0x00007f57a46f63d5 in raise () from /lib64/libc.so.6
#15 0x00007f57a46f7858 in abort () from /lib64/libc.so.6
#16 0x00007f57a4b579e0 in vmdbwarn (vm=0x25c61f9eceb0,
mesg=0x7fff0a5f2b40 "free
error:region=0x25c61f9eceb0:block=0x7f57a4da9be0:outside region:\n",
n=70)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:147
#17 0x00007f57a4b580a3 in dbwarn (vm=0x25c61f9eceb0,
data=0x7f57a4da9be0 <_Sfstdin>, where=0, file=0x0, line=0, func=0x0,
type=2)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:236
#18 0x00007f57a4b5871a in dbfree (vm=0x25c61f9eceb0,
data=0x7f57a4da9be0 <_Sfstdin>, local=0)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:401
#19 0x00007f57a4b511cd in _ast_free (data=0x7f57a4da9be0 <_Sfstdin>)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/malloc.c:806
#20 0x00007f57a4b1c6e9 in sfclose (f=0x7f57a4da9be0 <_Sfstdin>) at
/home/irek/ast/20140301/src/lib/libast/sfio/sfclose.c:166
#21 0x00007f57a5692ff4 in iovex_stream (context=0x7f57a5921b60 <sh>,
origfd=0, fd2=18446744073709551615)
at /home/irek/ast/20140301/src/cmd/ksh93/sh/io.c:969
#22 0x00007f57a4af1a54 in spawnvex_apply (vex=0x25c61fdf55d0, cur=0,
flags=0) at /home/irek/ast/20140301/src/lib/libast/misc/spawnvex.c:685
#23 0x00007f57a5692cf6 in sh_vexrestore (shp=0x7f57a5921b60 <sh>, n=0)
at /home/irek/ast/20140301/src/cmd/ksh93/sh/io.c:893
#24 0x00007f57a56dbf07 in sh_exec (shp=0x7f57a5921b60 <sh>,
t=0x25c61fe26750, flags=4) at
/home/irek/ast/20140301/src/cmd/ksh93/sh/xec.c:1782
---Type <return> to continue, or q <return> to quit---^CQuit
The puzzle here is:
1. Why is sh_fault() called for an SIGABRT signal? I don't see anyone
setting such a signal handler up, yet sh_fault() is called for this
signal. Why?
2. Why is sh_done() called from within a signal handler? It doesn't
make sense and I doubt it can work
Irek
+ /home/irek/ast/20140301/arch/linux.i386-64/src/cmd/ksh93/ksh
./src/cmd/ksh93/tests/shtests --locale
LD_LIBRARY_PATH_64=/home/irek/ast/20140301/arch/linux.i386-64/lib:
LD_LIBRARY_PATH=/home/irek/ast/20140301/arch/linux.i386-64/lib:/usr/lib64/mpi/gcc/openmpi/lib64
LD_LIBRARY_PATH_32=/home/irek/ast/20140301/arch/linux.i386-64/lib:
LC_ALL=C LANG=C VMALLOC_OPTIONS=abort
SHCOMP='/home/irek/ast/20140301/arch/*/bin/shcomp'
./src/cmd/ksh93/tests/heredoc.sh
test heredoc begins at 2014-03-12+03:58:27
free error:region=0x25c61f9eceb0:block=0x7f57a4da9be0:outside region:
^C
#0 0x00007f57a477b1b0 in __nanosleep_nocancel () from /lib64/libc.so.6
#1 0x00007f57a4ae519f in tvsleep (tv=0x0, rv=0x0) at
/home/irek/ast/20140301/src/lib/libast/tm/tvsleep.c:64
#2 0x00007f57a4b4f883 in asorelax (nsec=262144) at
/home/irek/ast/20140301/src/lib/libast/aso/asorelax.c:46
#3 0x00007f57a4b4f832 in asolock (lock=0x25c61fdeb03c, key=20130501,
type=4) at /home/irek/ast/20140301/src/lib/libast/aso/asolock.c:40
#4 0x00007f57a4b58402 in dballoc (vm=0x25c61f9eceb0, size=176,
local=0) at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:333
#5 0x00007f57a4b50f58 in _ast_malloc (size=176) at
/home/irek/ast/20140301/src/lib/libast/vmalloc/malloc.c:770
#6 0x00007f57a4b23ac1 in sfnew (oldf=0x0, buf=0x25c61fe55770,
size=32, file=-1, flags=5)
at /home/irek/ast/20140301/src/lib/libast/sfio/sfnew.c:97
#7 0x00007f57a4b40627 in _sfopenat (cwd=-100, f=0x0,
file=0x25c61fe55770 "cd /; rm -rf /tmp/tmp6ETCkUN.XYq",
mode=0x7f57a56f414f "s")
at /home/irek/ast/20140301/src/lib/libast/sfio/_sfopen.c:120
#8 0x00007f57a4b40763 in _sfopen (f=0x0, file=0x25c61fe55770 "cd /;
rm -rf /tmp/tmp6ETCkUN.XYq", mode=0x7f57a56f414f "s")
at /home/irek/ast/20140301/src/lib/libast/sfio/_sfopen.c:203
#9 0x00007f57a4b246d3 in sfopen (f=0x0, file=0x25c61fe55770 "cd /; rm
-rf /tmp/tmp6ETCkUN.XYq", mode=0x7f57a56f414f "s")
at /home/irek/ast/20140301/src/lib/libast/sfio/sfopen.c:40
#10 0x00007f57a56860f9 in sh_trap_20120720 (shp=0x7f57a5921b60 <sh>,
trap=0x25c61fe55770 "cd /; rm -rf /tmp/tmp6ETCkUN.XYq", mode=0)
at /home/irek/ast/20140301/src/cmd/ksh93/sh/fault.c:863
#11 0x00007f57a568568c in sh_done (ptr=0x7f57a5921b60 <sh>, sig=6) at
/home/irek/ast/20140301/src/cmd/ksh93/sh/fault.c:647
#12 0x00007f57a5684481 in sh_fault (sig=6, info=0x7fff0a5f2670,
context=0x7fff0a5f2540) at
/home/irek/ast/20140301/src/cmd/ksh93/sh/fault.c:182
#13 <signal handler called>
#14 0x00007f57a46f63d5 in raise () from /lib64/libc.so.6
#15 0x00007f57a46f7858 in abort () from /lib64/libc.so.6
#16 0x00007f57a4b579e0 in vmdbwarn (vm=0x25c61f9eceb0,
mesg=0x7fff0a5f2b40 "free
error:region=0x25c61f9eceb0:block=0x7f57a4da9be0:outside region:\n",
n=70)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:147
#17 0x00007f57a4b580a3 in dbwarn (vm=0x25c61f9eceb0,
data=0x7f57a4da9be0 <_Sfstdin>, where=0, file=0x0, line=0, func=0x0,
type=2)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:236
#18 0x00007f57a4b5871a in dbfree (vm=0x25c61f9eceb0,
data=0x7f57a4da9be0 <_Sfstdin>, local=0)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/vmdebug.c:401
#19 0x00007f57a4b511cd in _ast_free (data=0x7f57a4da9be0 <_Sfstdin>)
at /home/irek/ast/20140301/src/lib/libast/vmalloc/malloc.c:806
#20 0x00007f57a4b1c6e9 in sfclose (f=0x7f57a4da9be0 <_Sfstdin>) at
/home/irek/ast/20140301/src/lib/libast/sfio/sfclose.c:166
#21 0x00007f57a5692ff4 in iovex_stream (context=0x7f57a5921b60 <sh>,
origfd=0, fd2=18446744073709551615)
at /home/irek/ast/20140301/src/cmd/ksh93/sh/io.c:969
#22 0x00007f57a4af1a54 in spawnvex_apply (vex=0x25c61fdf55d0, cur=0,
flags=0) at /home/irek/ast/20140301/src/lib/libast/misc/spawnvex.c:685
#23 0x00007f57a5692cf6 in sh_vexrestore (shp=0x7f57a5921b60 <sh>, n=0)
at /home/irek/ast/20140301/src/cmd/ksh93/sh/io.c:893
#24 0x00007f57a56dbf07 in sh_exec (shp=0x7f57a5921b60 <sh>,
t=0x25c61fe26750, flags=4) at
/home/irek/ast/20140301/src/cmd/ksh93/sh/xec.c:1782
---Type <return> to continue, or q <return> to quit---^CQuit
The puzzle here is:
1. Why is sh_fault() called for an SIGABRT signal? I don't see anyone
setting such a signal handler up, yet sh_fault() is called for this
signal. Why?
2. Why is sh_done() called from within a signal handler? It doesn't
make sense and I doubt it can work
Irek