From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1935 invoked by alias); 12 Sep 2011 16:27:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29770 Received: (qmail 14250 invoked from network); 12 Sep 2011 16:27:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at altlinux.org does not designate permitted sender hosts) Date: Mon, 12 Sep 2011 20:27:03 +0400 From: "Alexey I. Froloff" To: zsh-workers@zsh.org Subject: Re: How to misplace an entire pipeline Message-ID: <20110912162703.GB12110@altlinux.org> References: <110805203111.ZM32508@torch.brasslantern.com> <20110807185002.6a042cab@pws-pc.ntlworld.com> <110807144359.ZM27903@torch.brasslantern.com> <110807210507.ZM28821@torch.brasslantern.com> <20110808192720.380a3ee7@pws-pc.ntlworld.com> <110808231032.ZM2380@torch.brasslantern.com> <20110809211910.631d6561@pws-pc.ntlworld.com> <110813115208.ZM20513@torch.brasslantern.com> <20110912135123.GA12110@altlinux.org> <110912090353.ZM13021@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nVMJ2NtxeReIH9PS" Content-Disposition: inline In-Reply-To: <110912090353.ZM13021@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-12-30) --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 12, 2011 at 09:03:53AM -0700, Bart Schaefer wrote: > to verify which test is causing the segmentation fault? I suspect it's > the very last test with "print -lO ... | while read ..." but I'd like > to be sure. (OTOH it may not be possible to reproduce the fault with > verbose output, but it's worth a try.) Test successful. ZTST_test: looking for new test ZTST_test: examining line: ZTST_test: examining line: print -lO $'a' $'a\0' $'a\0b' $'a\0b\0' $'a\0b\0a' $'a\0b\0b' $'a\0c' | ZTST_getchunk: read code chunk: print -lO $'a' $'a\0' $'a\0b' $'a\0b\0' $'a\0b\0a' $'a\0b\0b' $'a\0c' | while read -r line; do for (( i =3D 1; i <=3D ${#line}; i++ )); do foo=3D$line[i] printf "%02x" $(( #foo )) done print done ZTST_test: examining line: >610063 ZTST_getredir: read redir for '>': 610063 6100620062 6100620061 61006200 610062 6100 61 ZTST_test: examining line: Running test: sorting with embedded nulls ZTST_test: expecting status: 0 Input: /usr/src/tmp/zsh.ztst.in.2764, output: /usr/src/tmp/zsh.ztst.out.276= 4, error: /usr/src/tmp/zsh.ztst.terr.2764 ************************************** 0 successful test scripts, 1 failure, 0 skipped ************************************** make[1]: *** [check] Error 1 make[1]: Leaving directory `/usr/src/RPM/BUILD/zsh-4.3.12/Test' make: *** [check] Error 2 > I further suspect the signal is arriving during foo=3D$line[i] or some > other part of the inner loop where no actual command is being run, but > list_pipe remains true because of the outer loop. I think there's a race condition somewhere. I've managed to reproduce this error on an average loaded system with decent swap usage. Fail chance is about 15-20%% on my system and >80% on build server. --=20 Regards, -- Sir Raorn. --- http://thousandsofhate.blogspot.com/ --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJObjLRAAoJEErPkC6vOrpJfocP/jUX5y9wBO5TgeamJpdm6kBZ UlvaLlepoQjVESEOz8Qa43rfWNvfWI9uKdAXdYJwVtiBuK2ZiTN2o6p+xMLPp4OO mkTLgUV1vrRqtawDtokCBxuQx6enBd1AeDw58WhZniVt+uE5oxPhUiZI48dweuN4 hVcaMCLcX9R8EP/nRhvD08rvvkAci/YjphsLYJYQDDO7uxiInOjfVI4fuQkz0c3s azOokKc6rCbm1ZBlBww6iR3KU/eTGT5AwZ2+1zu5QI/WfvdojlQp3SzXkcJpJDgD sz2nFi0BdkI+tKSSg1xGx8Yndmsiq2gdhREMDY+BuBXy9tPjmfxmUcEcZsjX9mLd ahlKgXfQJndD931jSa040fhqUmD3JhxU/gQCEq1EIwDsbYPx5ch3K/G0PNrCTqZ8 PE//IxXYcJuOchmAr4MRBOjwXiKhlcP8PZAYN0AaxwN/ExE3q4COw+d332iujeR1 jHTdoher+S8Nlw4ZpahaImoRpwje5PC5CpDg9eiM2ZWIvXIT1qdVcAL2YGkuaGlV kXqx7a8H+97BH9b/tjWK6uCYYewIPZhfhPH8DbTW6ASg01vtjnxDgQ4ft35Eo2MR 4mP6Wl4dzODdGYFQlOGrQ5hRWsE765+gwQdiK8KXsSyW8zWIvz41OYq0gunemPSK IX0m55xOVRbupZr4NOiH =d6w8 -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS--