On Mon, Feb 09, 2009 at 04:15:01PM +0100, Dr. Werner Fink wrote:
> On Fri, Feb 06, 2009 at 09:02:33AM -0500, Glenn Fowler wrote:
> > 
> > thanks werner
> > I will be posting 2002-02-02 beta src later today
> > 
> > On Fri, 6 Feb 2009 12:17:34 +0100 Dr. Werner Fink wrote:
> > > Hi,
> > 
> > > this is the message which was found by a tester. The tar balls
> > > ast-ksh and INIT are from 2008-12-12.  It seems that 2009-01-20
> > > has fixed that probem but the test suite shows:
> > 
> > >   test basic.sh begins at 2009-02-06+10:46:30
> > >   /tmp/ksh2454x: line 2: 2556: (coredump)
> > >   test basic.sh passed at 2009-02-06+10:46:43 [ 90 tests 0 errors ]
> > 
> > >   test coprocess.sh begins at 2009-02-06+10:46:52
> > >   coprocess.sh: line 95: 2664: 
> > >   coprocess.sh: line 97: 2667: 
> > >           coprocess.sh[97]: parent coprocess prevents script coprocess
> > >   coprocess.sh: line 1: 2709: 
> > >   test coprocess.sh failed at 2009-02-06+10:47:02 with exit code 1 [ 25 
> > > tests 1 error ]
> > 
> > > this was Version JM 93t+ 2009-01-20.  Please note that the
> > > tests are done within an special environment without having
> > > a terminal around.
> 
> It looks like a setjmp/setsigjmp -> longjmp/siglongjmp goes
> wrong here.  This because it is not a real SIGSEGV but only
> the message about.  The script sniplet which fails is a three
> liner:
> 
>   myfilter() { x=$(print ok | cat); print  -r -- $SECONDS;}
>   set -o pipefail
>   sleep 3 | myfilter
> 
> please note that if I add a line like
> 
>   type cat
> 
> before the first line it works.  To reproduce this I've
> to deinstall ksh and run the test within the build
> tree like:
> 
>   base=src/cmd/ksh93
>   root=$(echo ${PWD}/arch/linux*)
>   test=${PWD}/${base}/tests
>   pushd ${test}
>   LD_LIBRARY_PATH=${root}/lib ${root}/bin/ksh /tmp/scriptlet
> 
> which is simply what is done within the build environment.
> Please note that I using shared libraries for libast, libcmd,
> libdll, and libshell.  Therefore the LD_LIBRARY_PATH variable
> is set.

This change

--- src/cmd/ksh93/sh/xec.c
+++ src/cmd/ksh93/sh/xec.c
@@ -1440,7 +1452,12 @@
                        pid_t   savepgid = job.curpgid;
                        job.curpgid = 0;
                        if(shp->subshell)
-                               sh_subtmpfile(1);
+                       {
+                               if(shp->subshare)
+                                       sh_subtmpfile(0);
+                               else
+                                       sh_subfork();
+                       }
                        shp->inpipe = pvo;
                        shp->outpipe = pvn;
                        pvo[1] = -1;

seems to cause the false coredump message ... using only
sh_subtmpfile(1) removes the messages but cause an other
message from shell.sh

        subshell.sh[244]: $() of pipeline hangs
        subshell.sh[245]: ${} sub of pipeline hangs

...

Nevertheless the random message

 test coprocess.sh begins at 2009-02-10+14:51:33
 coprocess.sh: line 97: 12715: 
         coprocess.sh[97]: parent coprocess prevents script coprocess
 coprocess.sh: line 1: 12755: 

still happens sometimes.


     Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to