Description of problem: Occasionally when executing a command in backticks, it will abort and core dump after producing "warning: job list infinite loop -- this should not happen" Version-Release number of selected component (if applicable): $ ksh --version version sh (AT&T Research) 93t+ 2008-12-10 How reproducible: Easily Steps to Reproduce: $ cat joblist.sh while true; do haha=`echo hoho | sed s/o/a/g ` done $ ksh joblist.sh joblist.sh: line 3: warning: job list infinite loop -- this should not happen Aborted (core dumped) Actual results: Expected results: Additional info: This started happening after updating ksh to obtain the fix for https://bugzilla.redhat.com/show_bug.cgi?id=510833
Thanks for this bug report. I'm not able to reproduce this. How long does it take for you to reproduce this using that reproducer? On what arch? I'd like to verify new build works before I push it to repository thanks
Thanks for looking at the bug report! :-) $ uname -a Linux andre 2.6.29.5-191.fc11.x86_64 #1 SMP Tue Jun 16 23:23:21 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux Usually I'll get it within a few seconds, but sometimes it takes longer. I've installed the debuginfo gdb asked for so I can now give you a stacktrace from the corefile, hope this helps. Reading symbols from /lib64/libdl-2.10.1.so...Reading symbols from /usr/lib/debug/lib64/libdl-2.10.1.so.debug...done. done. Loaded symbols for /lib64/libdl-2.10.1.so Reading symbols from /lib64/libm-2.10.1.so...Reading symbols from /usr/lib/debug/lib64/libm-2.10.1.so.debug...done. done. Loaded symbols for /lib64/libm-2.10.1.so Reading symbols from /lib64/libc-2.10.1.so...Reading symbols from /usr/lib/debug/lib64/libc-2.10.1.so.debug...done. done. Loaded symbols for /lib64/libc-2.10.1.so Reading symbols from /lib64/ld-2.10.1.so...Reading symbols from /usr/lib/debug/lib64/ld-2.10.1.so.debug...done. done. Loaded symbols for /lib64/ld-2.10.1.so Core was generated by `ksh joblist.sh'. Program terminated with signal 6, Aborted. #0 0x00000038bd6332f5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb) bt #0 0x00000038bd6332f5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00000038bd634b20 in *__GI_abort () at abort.c:88 #2 0x0000000000416447 in job_chksave (pid=30310) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/jobs.c:1760 #3 0x0000000000417689 in job_subrestore (ptr=<value optimized out>) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/jobs.c:1813 #4 0x000000000043b733 in sh_subshell (t=<value optimized out>, flags=<value optimized out>, comsub=<value optimized out>) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/subshell.c:616 #5 0x00000000004238ab in comsubst (mp=<value optimized out>, t=0x19c87e0, type=1) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/macro.c:1951 #6 0x00000000004232e8 in copyto (mp=0x19be0e0, endch=<value optimized out>, newquote=<value optimized out>) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/macro.c:581 #7 0x0000000000423615 in sh_mactrim (shp=<value optimized out>, str=0x19c8531 "haha=`echo $$ | sed s/o/a/g > lastpid`", mode=-1) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/macro.c:173 #8 0x000000000042aff3 in nv_setlist (arg=0x19c8520, flags=131584) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/name.c:324 #9 0x0000000000440f09 in sh_exec (t=<value optimized out>, flags=<value optimized out>) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/xec.c:815 #10 0x0000000000441497 in sh_exec (t=<value optimized out>, flags=<value optimized out>) at /usr/src/debug/ksh-20081212/src/cmd/ksh93/sh/xec.c:1703 #11 0x000000000040787a in exfile () #12 0x0000000000406d15 in sh_main () #13 0x00000038bd61ea2d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff161af4b8) at libc-start.c:220 #14 0x0000000000406039 in _start ()
thanks for the info, I can reproduce it now. It's easier to reproduce if system is under load. FYI, this bug existed in all previous ksh versions (at least since 20080220), but only this version got an internal check for looped job list instead of using corrupted list, so this is not a new bug, but it is a known one. I'll check if latest version is fixed or ask upstream for help.
ksh-20090630-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/ksh-20090630-1.fc11
ksh-20090630-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update ksh'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9050
ksh-20090630-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.