From mikets at frontline-pcb.com Wed Apr 1 09:33:11 2009 From: mikets at frontline-pcb.com (Michael Tseitlin) Date: Wed, 1 Apr 2009 09:33:11 +0300 Subject: Tcsh.exe crashes on multicore computers Message-ID: <830C82B0B852B9488F0A944853D4D01205F2931F@uganda.FRONTLINE-PCB.COM> Hi, I've reported several time to this list about intermittent crashes of tcsh.exe that I experience for a long time. Before the crashes tcsh usually reports about memory inconsistency etc. Now I've figured out that if I define a CPU affinity for tcsh.exe to run on a single CPU - the crashes don't happen any more. The simplest way to do it is using Task Manager. More advanced tools are those that monitor starting processes and set the affinity automatically. What I did finally - just put the following code into nt_init function of win32/support.c: SetProcessAffinityMask(GetCurrentProcess(), 1); I might be a bit more creative and set a random CPU in the range of existing ones. The best way is certainly to solve the real memory problems, but I'm not proficient enough in tcsh code to figure it out. The above solution is at least sufficient for me. Regards, Michael From trineo at gmail.com Wed Apr 1 23:56:29 2009 From: trineo at gmail.com (Neon) Date: Wed, 1 Apr 2009 16:56:29 -0400 Subject: Subscript out of range error on existing working script Message-ID: Just downloaded tcsh 6.10.0 source tgz and looks like this bug is fixed. Will there be a patch release to 6.14.xx with this fix? I am in a situation where I do not control the tcsh versions on the target machines. Looks like Red Hat Enterprise Linus (RHEL) 5.3 includes tcsh 6.14.00 with this problem. If there was a version 6.14.01 (Red Hat and others may be more inclined to include it in a patch fix for there OS) Is there a regression test for this bug in tcsh? Where is your bug database? Regards, Neon > Can you try 6.16? > > christos > | I have an existing script that worked fine under tcsh 6.12.00 which no | longer works in version 6.14.00 | | It errors out with "Subscript is out of range." message in version 6.12.00 | | Here is a test script to show the problem. | | -- begin test.tcsh -- | #!/bin/tcsh | set second_til_last = "${argv[2-]}" | echo "2nd to last arguments = $second_til_last" | -- end of test.tcsh --- | | This originally is a csh script which would set the second_til_last | variable to a blank string (i.e. "") From trineo at gmail.com Thu Apr 2 00:31:06 2009 From: trineo at gmail.com (Neon) Date: Wed, 1 Apr 2009 17:31:06 -0400 Subject: Subscript out of range error on existing working script In-Reply-To: References: Message-ID: I have to take that back what I said in the previous post, this also fails in tcsh 6.16.00 my test script was referring to /bin/tcsh (v6.12.00) where this used to work when I ran that. Interesting thing is that I also compiled 6.14.00 from a refresh src tgz and that seems to work on my local box. Under further investigation. Here are the tcsh versions with this subscript error for my test script: tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options wide,nls,dl,al,kan,sm,rh,color,filec tcsh 6.16.00 (Astron) 2008-09-30 (i386-intel-linux) options wide,nls,dl,al,kan,sm,rh,color,filec Here are the tcsh versions without the subscript error for my test script: tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options wide,nls,dl,al,kan,rh,color,filec tcsh 6.12.00 (Astron) 2002-07-23 (i386-intel-linux) options 8b,nls,dl,al,kan,rh,color,dspm,filec So, it looks like with the "sm" option in version 6.14.00 and 6.16.00 we have this subscript error for my test script. Regards, Neon On Wed, Apr 1, 2009 at 4:56 PM, Neon wrote: > Just downloaded tcsh 6.10.0 source tgz and looks like this bug is fixed. > > Will there be a patch release to 6.14.xx with this fix? > > I am in a situation where I do not control the tcsh versions on the > target machines. > Looks like Red Hat Enterprise Linus (RHEL) 5.3 includes tcsh 6.14.00 > with this problem. > If there was a version 6.14.01 (Red Hat and others may be more > inclined to include it in a patch fix for there OS) > > Is there a regression test for this bug in tcsh? Where is your bug database? > > Regards, > > Neon > >> Can you try 6.16? >> >> christos >> > | I have an existing script that worked fine under tcsh 6.12.00 which no > | longer works in version 6.14.00 > | > | It errors out with "Subscript is out of range." message in version 6.12.00 > | > | Here is a test script to show the problem. > | > | -- begin test.tcsh -- > | #!/bin/tcsh > | set second_til_last = "${argv[2-]}" > | echo "2nd to last arguments = $second_til_last" > | -- end of test.tcsh --- > | > | This originally is a csh script which would set the second_til_last > | variable to a blank string (i.e. "") From christos at zoulas.com Thu Apr 2 00:56:05 2009 From: christos at zoulas.com (Christos Zoulas) Date: Wed, 1 Apr 2009 17:56:05 -0400 Subject: Subscript out of range error on existing working script In-Reply-To: from Neon (Apr 1, 5:31pm) Message-ID: <20090401215605.1EF8656550@rebar.astron.com> On Apr 1, 5:31pm, trineo at gmail.com (Neon) wrote: -- Subject: Re: Subscript out of range error on existing working script | I have to take that back what I said in the previous post, this also | fails in tcsh 6.16.00 | my test script was referring to /bin/tcsh (v6.12.00) where this used | to work when I ran that. | | Interesting thing is that I also compiled 6.14.00 from a refresh src | tgz and that seems to work on my local box. | Under further investigation. | | Here are the tcsh versions with this subscript error for my test script: | tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options | wide,nls,dl,al,kan,sm,rh,color,filec | tcsh 6.16.00 (Astron) 2008-09-30 (i386-intel-linux) options | wide,nls,dl,al,kan,sm,rh,color,filec | | Here are the tcsh versions without the subscript error for my test script: | tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options | wide,nls,dl,al,kan,rh,color,filec | tcsh 6.12.00 (Astron) 2002-07-23 (i386-intel-linux) options | 8b,nls,dl,al,kan,rh,color,dspm,filec | | So, it looks like with the "sm" option in version 6.14.00 and 6.16.00 | we have this subscript error for my test script. Hmm, this should only be in 6.16... It is fix 24 in the fixes file: 24. $x[A-B] did not complain for A out of range. (Cai Xianchao) Yes, this is a behavior change, but it was done for symmetry. christos From avg at icyb.net.ua Thu Apr 23 12:25:16 2009 From: avg at icyb.net.ua (Andriy Gapon) Date: Thu, 23 Apr 2009 12:25:16 +0300 Subject: periodic annoyance with history -S In-Reply-To: <46C1A41D.20303@icyb.net.ua> References: <20070811085747.25F9D56407@rebar.astron.com> <46C1A41D.20303@icyb.net.ua> Message-ID: <49F033FC.2070404@icyb.net.ua> on 14/08/2007 15:46 Andriy Gapon said the following: > Christos, > http://bugs.gw.com/view.php?id=58 > > Thank you! It's been a long while - I now found some time to analyze this issue more and I put some additional comments in the bug tracker. -- Andriy Gapon From christos at zoulas.com Fri Apr 24 17:35:36 2009 From: christos at zoulas.com (Christos Zoulas) Date: Fri, 24 Apr 2009 10:35:36 -0400 Subject: periodic annoyance with history -S In-Reply-To: <49F033FC.2070404@icyb.net.ua> from Andriy Gapon (Apr 23, 12:25pm) Message-ID: <20090424143536.E379F5654E@rebar.astron.com> On Apr 23, 12:25pm, avg at icyb.net.ua (Andriy Gapon) wrote: -- Subject: Re: periodic annoyance with history -S | on 14/08/2007 15:46 Andriy Gapon said the following: | > Christos, | > http://bugs.gw.com/view.php?id=58 | > | > Thank you! | | It's been a long while - I now found some time to analyze this issue | more and I put some additional comments in the bug tracker. You nailed it! Index: sh.c =================================================================== RCS file: /p/tcsh/cvsroot/tcsh/sh.c,v retrieving revision 3.142 diff -u -u -r3.142 sh.c --- sh.c 25 Feb 2009 22:54:53 -0000 3.142 +++ sh.c 24 Apr 2009 14:35:00 -0000 @@ -139,6 +139,7 @@ Char HIST; int cantell; struct Bin B; + int justpr; }; static int srccat (Char *, Char *); @@ -1470,6 +1471,7 @@ st->alvec = alvec; st->onelflg = onelflg; st->enterhist = enterhist; + st->justpr = justpr; if (hflg) st->HIST = HIST; else @@ -1568,6 +1570,7 @@ HIST = st->HIST; enterhist = st->enterhist; cantell = st->cantell; + justpr = st->justpr; if (st->argv != NULL) setq(STRargv, st->argv, &shvhed, VAR_READWRITE); From avg at icyb.net.ua Fri Apr 24 17:44:53 2009 From: avg at icyb.net.ua (Andriy Gapon) Date: Fri, 24 Apr 2009 17:44:53 +0300 Subject: periodic annoyance with history -S In-Reply-To: <20090424143536.E379F5654E@rebar.astron.com> References: <20090424143536.E379F5654E@rebar.astron.com> Message-ID: <49F1D065.9080500@icyb.net.ua> on 24/04/2009 17:35 Christos Zoulas said the following: > On Apr 23, 12:25pm, avg at icyb.net.ua (Andriy Gapon) wrote: > -- Subject: Re: periodic annoyance with history -S > > | on 14/08/2007 15:46 Andriy Gapon said the following: > | > Christos, > | > http://bugs.gw.com/view.php?id=58 > | > > | > Thank you! > | > | It's been a long while - I now found some time to analyze this issue > | more and I put some additional comments in the bug tracker. > > You nailed it! Christos, thank you very much for the fix! > Index: sh.c > =================================================================== > RCS file: /p/tcsh/cvsroot/tcsh/sh.c,v > retrieving revision 3.142 > diff -u -u -r3.142 sh.c > --- sh.c 25 Feb 2009 22:54:53 -0000 3.142 > +++ sh.c 24 Apr 2009 14:35:00 -0000 > @@ -139,6 +139,7 @@ > Char HIST; > int cantell; > struct Bin B; > + int justpr; > }; > > static int srccat (Char *, Char *); > @@ -1470,6 +1471,7 @@ > st->alvec = alvec; > st->onelflg = onelflg; > st->enterhist = enterhist; > + st->justpr = justpr; > if (hflg) > st->HIST = HIST; > else > @@ -1568,6 +1570,7 @@ > HIST = st->HIST; > enterhist = st->enterhist; > cantell = st->cantell; > + justpr = st->justpr; > > if (st->argv != NULL) > setq(STRargv, st->argv, &shvhed, VAR_READWRITE); -- Andriy Gapon From christos at zoulas.com Fri Apr 24 18:38:55 2009 From: christos at zoulas.com (Christos Zoulas) Date: Fri, 24 Apr 2009 11:38:55 -0400 Subject: periodic annoyance with history -S In-Reply-To: <49F1D065.9080500@icyb.net.ua> from Andriy Gapon (Apr 24, 5:44pm) Message-ID: <20090424153855.74EEE5654E@rebar.astron.com> On Apr 24, 5:44pm, avg at icyb.net.ua (Andriy Gapon) wrote: -- Subject: Re: periodic annoyance with history -S | Christos, thank you very much for the fix! You did all the work :-) christos