zsh-workers
 help / color / mirror / code / Atom feed
* zsh hangs on AIX 4.3.3
@ 2006-09-01 15:56 Gene Carter
  2006-09-02 17:42 ` Gene
  2006-09-07 18:43 ` Peter Stephenson
  0 siblings, 2 replies; 3+ messages in thread
From: Gene Carter @ 2006-09-01 15:56 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 3786 bytes --]

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)

[-- Attachment #2: Type: text/html, Size: 4591 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zsh hangs on AIX 4.3.3
  2006-09-01 15:56 zsh hangs on AIX 4.3.3 Gene Carter
@ 2006-09-02 17:42 ` Gene
  2006-09-07 18:43 ` Peter Stephenson
  1 sibling, 0 replies; 3+ messages in thread
From: Gene @ 2006-09-02 17:42 UTC (permalink / raw)
  To: zsh-workers

For what it's worth, this bug also appears to exist on an AIX 5.2
platform I have access to.

Gene Carter wrote:
> 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)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zsh hangs on AIX 4.3.3
  2006-09-01 15:56 zsh hangs on AIX 4.3.3 Gene Carter
  2006-09-02 17:42 ` Gene
@ 2006-09-07 18:43 ` Peter Stephenson
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2006-09-07 18:43 UTC (permalink / raw)
  To: Gene Carter, zsh-workers

On Fri, 1 Sep 2006 11:56:15 -0400
"Gene Carter" <gananda@gmail.com> wrote:
> 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.

Unfortunately it looks like there's no AIX host at Sourceforge, so
there's no way for us to debug this, unless it turns up on another
system.  That seems unlikely (for common systems like Linux and Solaris,
anyway), since someone ought to have tripped over it by now, I would
think.

> The script seems to make it through about 351 interations, and then
> hangs.

Do you mean the second number output would be 351, or 35100?  In any
case I seem to have got to about 300000 with no problems (Fedora Core 5
on x86 with the latest zsh source), but I'll leave it running.

sigsuspend(), which is where the shell is hanging, is the standard POSIX
mechanism.  The only suggestion I can make is that you try defining
BROKEN_POSIX_SIGSUSPEND in config.h and recompiling to see if that
helps.  It's not very likely, however.  Alternatively, try one of the
other signal handling styles: undefine POSIX_SIGNALS in config.h and define
BSD_SIGNALS or SYSV_SIGNALS.  (They won't necessarily compile and link.)

Other than that, someone is going to have take a deeper look with a
debugger.  Are there jobs in the table given by the jobtab variable that
aren't done (the index maxjob gives the highest possible valid one)?  If
so, what is the state of them and the process structures pointed to by
them?

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-07 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-01 15:56 zsh hangs on AIX 4.3.3 Gene Carter
2006-09-02 17:42 ` Gene
2006-09-07 18:43 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).