From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17227 invoked from network); 1 Sep 2006 15:56:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO, HTML_10_20,HTML_MESSAGE autolearn=no version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Sep 2006 15:56:27 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 33890 invoked from network); 1 Sep 2006 15:56:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Sep 2006 15:56:21 -0000 Received: (qmail 14575 invoked by alias); 1 Sep 2006 15:56:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22662 Received: (qmail 14560 invoked from network); 1 Sep 2006 15:56:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Sep 2006 15:56:18 -0000 Received: (qmail 33639 invoked from network); 1 Sep 2006 15:56:18 -0000 Received: from nf-out-0910.google.com (64.233.182.187) by a.mx.sunsite.dk with SMTP; 1 Sep 2006 15:56:16 -0000 Received: by nf-out-0910.google.com with SMTP id y38so726456nfb for ; Fri, 01 Sep 2006 08:56:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=oeE4H3TH/RUTknGFdi5eya9vk5xHlumf8I8kuQjZp/sVpb6VqJ9PmqVt8L/TFNyhHL1SKv6cSfFCZdh5YBXto2/T2cpJb4wE8P2MYcMV5YsxIsQxcOIBh+1rOy0K1Zz+u620o1mM18iWu5+0r9XkKqwXfZeg7iedjGUPx8TYXuw= Received: by 10.49.93.13 with SMTP id v13mr3161546nfl; Fri, 01 Sep 2006 08:56:15 -0700 (PDT) Received: by 10.48.218.18 with HTTP; Fri, 1 Sep 2006 08:56:15 -0700 (PDT) Message-ID: Date: Fri, 1 Sep 2006 11:56:15 -0400 From: "Gene Carter" To: zsh-workers@sunsite.dk Subject: zsh hangs on AIX 4.3.3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_129821_8969838.1157126175896" ------=_Part_129821_8969838.1157126175896 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Greetings, I'm trying to use zsh on an AIX 4.3.3 box. Unfortunately, I appear to be hitting a bug related to a wait on signals. I've trimmed down the script to a (perhaps local) minimum to recreate the problem. The script seems to make it through about 351 interations, and then hangs. ^C won't break it out. ^Z won't suspend. SIGHUP and SIGCHLD both will stop the process. This problem occurs with zsh binaries that I compile as well as externally supplied binaries (from two sources). I would very much like to use zsh to script our administration work on these systems. Any help would be greately appreciated. Thanks, Gene ---- script ---- #!/usr3/rfgadm/src/zsh-4.3.2/Src/zsh integer ctr=1 disks=$(while ((ctr < 100)) ; do print $ctr ; let ctr=ctr+1 ; done ) integer outer=1 while [ 1 ] ; do print $disks | while read pdisk; do echo $pdisk | read hdisk echo 0 | read n print $pdisk $((outer*${#disks}+pdisk)) done ((outer=outer+1)) done --- gcc info --- 11:39: [carterg@isriscwc {80}] gcc -v Reading specs from /usr3_is/rfgadm/bin/../lib/gcc-lib/powerpc-ibm-aix4.3.2.0 /3.3.6/specs Configured with: ../gcc-3.3.6/configure --disable-nls Thread model: aix gcc version 3.3.6 11:47: [carterg@isriscwc {81}] --- gdb trace --- 11:39: [carterg@isriscwc {260}] gdb /usr3/rfgadm/src/zsh-4.3.2/Src/zsh GNU gdb 6.5 Copyright (C) 2006 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 "powerpc-ibm-aix4.3.3.0"... (gdb) run zshprob Starting program: /usr3_is/rfgadm/src/zsh-4.3.2/Src/zsh zshprob ... 62 349 63 350 64 351 Program received signal SIGTERM, Terminated. 0xd01888c8 in sigsuspend () from /usr/lib/libc.a(shr.o) (gdb) bt #0 0xd01888c8 in sigsuspend () from /usr/lib/libc.a(shr.o) #1 0x100732b4 in signal_suspend (sig=20, sig2=0) at signals.c:376 #2 0x10079ed0 in zwaitjob (job=3, sig=0) at jobs.c:1161 #3 0x1007a090 in waitjobs () at jobs.c:1196 #4 0x1004546c in execpline (state=0x2ff22448, slcode=9218, how=2, last1=0) at exec.c:1161 #5 0x1004469c in execlist (state=0x2ff22448, dont_change_job=1, exiting=0) at exec.c:892 #6 0x100aeb48 in execwhile (state=0x2ff22448, do_exec=0) at loop.c:415 #7 0x1004a8e4 in execcmd (state=0x2ff22448, input=12, output=0, how=2, last1=2) at exec.c:2523 #8 0x10045e34 in execpline2 (state=0x2ff22448, pcode=643, how=2, input=12, output=0, last1=0) at exec.c:1300 #9 0x100460f8 in execpline2 (state=0x2ff22448, pcode=611, how=2, input=0, output=0, last1=0) at exec.c:1351 #10 0x10045024 in execpline (state=0x2ff22448, slcode=43010, how=2, last1=0) at exec.c:1086 #11 0x1004469c in execlist (state=0x2ff22448, dont_change_job=1, exiting=0) at exec.c:892 #12 0x100aeb48 in execwhile (state=0x2ff22448, do_exec=0) at loop.c:415 #13 0x1004a8e4 in execcmd (state=0x2ff22448, input=0, output=0, how=18, last1=2) at exec.c:2523 #14 0x10045e34 in execpline2 (state=0x2ff22448, pcode=515, how=18, input=0, output=0, last1=0) at exec.c:1300 #15 0x10045024 in execpline (state=0x2ff22448, slcode=58370, how=18, last1=0) ---Type to continue, or q to quit--- at exec.c:1086 #16 0x1004469c in execlist (state=0x2ff22448, dont_change_job=0, exiting=0) at exec.c:892 #17 0x100441c4 in execode (p=0x20040440, dont_change_job=0, exiting=0) at exec.c:792 #18 0x10000c28 in loop (toplevel=1, justonce=0) at init.c:167 #19 0x10004520 in zsh_main (argc=2, argv=0x2ff225d4) at init.c:1326 #20 0x10000578 in main (argc=2, argv=0x2ff225d4) at main.c:93 (gdb) ------=_Part_129821_8969838.1157126175896 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Greetings,

I'm trying to use zsh on an AIX 4.3.3 box. Unfortunately, I appear to be hitting a bug related to a wait
on signals.

I've trimmed down the script to a (perhaps local) minimum to recreate the problem. The script seems
to make it through about 351 interations, and then hangs. ^C won't break it out. ^Z won't suspend.
SIGHUP and SIGCHLD both will stop the process.

This problem occurs with zsh binaries that I compile as well as externally supplied
binaries (from two sources).

I would very much like to use zsh to script our administration work on these systems.
Any help would be greately appreciated.

Thanks,
Gene

----
script
----
#!/usr3/rfgadm/src/zsh-4.3.2/Src/zsh

integer ctr=1
disks=$(while ((ctr < 100)) ; do print $ctr ; let ctr=ctr+1 ; done )

integer outer=1
while [ 1 ] ; do
    print $disks |
        while read pdisk; do
            echo $pdisk  | read hdisk
            echo 0 | read n
            print $pdisk $((outer*${#disks}+pdisk))
        done
    ((outer=outer+1))
done

---
gcc info
---
11:39: [carterg@isriscwc {80}] gcc -v
Reading specs from /usr3_is/rfgadm/bin/../lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.3.6/specs
Configured with: ../gcc-3.3.6/configure --disable-nls
Thread model: aix
gcc version 3.3.6
11:47: [carterg@isriscwc {81}]

---
gdb trace
---
11:39: [carterg@isriscwc {260}] gdb /usr3/rfgadm/src/zsh-4.3.2/Src/zsh
GNU gdb 6.5
Copyright (C) 2006 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 "powerpc-ibm-aix4.3.3.0"...
(gdb) run zshprob
Starting program: /usr3_is/rfgadm/src/zsh-4.3.2/Src/zsh zshprob
...
62 349
63 350
64 351

Program received signal SIGTERM, Terminated.
0xd01888c8 in sigsuspend () from /usr/lib/libc.a(shr.o)
(gdb) bt
#0  0xd01888c8 in sigsuspend () from /usr/lib/libc.a(shr.o)
#1  0x100732b4 in signal_suspend (sig=20, sig2=0) at signals.c:376
#2  0x10079ed0 in zwaitjob (job=3, sig=0) at jobs.c:1161
#3  0x1007a090 in waitjobs () at jobs.c:1196
#4  0x1004546c in execpline (state=0x2ff22448, slcode=9218, how=2, last1=0)
    at exec.c:1161
#5  0x1004469c in execlist (state=0x2ff22448, dont_change_job=1, exiting=0) at exec.c:892
#6  0x100aeb48 in execwhile (state=0x2ff22448, do_exec=0) at loop.c:415
#7  0x1004a8e4 in execcmd (state=0x2ff22448, input=12, output=0, how=2, last1=2)
    at exec.c:2523
#8  0x10045e34 in execpline2 (state=0x2ff22448, pcode=643, how=2, input=12, output=0,
    last1=0) at exec.c:1300
#9  0x100460f8 in execpline2 (state=0x2ff22448, pcode=611, how=2, input=0, output=0,
    last1=0) at exec.c:1351
#10 0x10045024 in execpline (state=0x2ff22448, slcode=43010, how=2, last1=0)
    at exec.c:1086
#11 0x1004469c in execlist (state=0x2ff22448, dont_change_job=1, exiting=0) at exec.c:892
#12 0x100aeb48 in execwhile (state=0x2ff22448, do_exec=0) at loop.c:415
#13 0x1004a8e4 in execcmd (state=0x2ff22448, input=0, output=0, how=18, last1=2)
    at exec.c:2523
#14 0x10045e34 in execpline2 (state=0x2ff22448, pcode=515, how=18, input=0, output=0,
    last1=0) at exec.c:1300
#15 0x10045024 in execpline (state=0x2ff22448, slcode=58370, how=18, last1=0)
---Type <return> to continue, or q <return> to quit---
    at exec.c:1086
#16 0x1004469c in execlist (state=0x2ff22448, dont_change_job=0, exiting=0) at exec.c:892
#17 0x100441c4 in execode (p=0x20040440, dont_change_job=0, exiting=0) at exec.c:792
#18 0x10000c28 in loop (toplevel=1, justonce=0) at init.c:167
#19 0x10004520 in zsh_main (argc=2, argv=0x2ff225d4) at init.c:1326
#20 0x10000578 in main (argc=2, argv=0x2ff225d4) at main.c:93
(gdb)
------=_Part_129821_8969838.1157126175896--