From owner-freebsd-current Sat Aug 17 7:27:14 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D14237B400 for ; Sat, 17 Aug 2002 07:27:13 -0700 (PDT) Received: from dilbert.robbins.dropbear.id.au (164.b.010.mel.iprimus.net.au [210.50.201.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CDC043E6A for ; Sat, 17 Aug 2002 07:27:11 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (y878pkpi8tgel4k8@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.3/8.12.3) with ESMTP id g7HER6Ea039143 for ; Sun, 18 Aug 2002 00:27:06 +1000 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.3/8.12.3/Submit) id g7HER5Dv039142 for current@FreeBSD.ORG; Sun, 18 Aug 2002 00:27:05 +1000 (EST) Date: Sun, 18 Aug 2002 00:27:04 +1000 From: Tim Robbins To: current@FreeBSD.ORG Subject: Re: WTF is going on? pipe breakage, patch(1) breakage?? Message-ID: <20020818002704.A38629@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG FWIW, the pipe breakage seems to have been caused by /bin/sh freeing the job table (jobs.c lines 744-746) then later using a value in the freed region as an argument to setpgid() and tcsetpgrp() (jobs.c lines 753-760) when the job had more than one process in it (a pipeline). phkmalloc was overwriting the freed memory with garbage, causing tcsetpgrp() and setpgid() to be called with bogus process group ID's. I'm going to commit the fix for this tomorrow after I've tested it some more. In the meantime, ln -sf j /etc/malloc.conf will work around the error. The bug seems to have been there since at least 4.4BSD-Lite. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message