X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 16 Jun 2009 17:39:23 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: job control "Bad address" error
Message-ID: <20090616153923.GA30240@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <7vd494i72q.fsf@gmail.com> <loom.20090616T152044-225@post.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <loom.20090616T152044-225@post.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jun 16 15:28, Eric Blake wrote:
> Haojun Bao <baohaojun <at> gmail.com> writes:
> 
> > type the command:
> >     cat|cat <Enter>
> > 
> > type ^Z, type
> >     bg <Enter>
> 
> I can also reproduce it under cygwin 1.7, and further clarified that it is the 
> second cat that is failing:
> 
> $ sleep 100 | cat
> ^Z
> $ bg
> cat: -: Bad address
> 
> I'm not quite sure how to strace this, since you can't use ^Z to suspend an 
> active strace.  But my guess is that there is a bug in cygwin1.dll pipe 
> handling code, such that it dereferences bad memory when resuming execution of 
> a read from a pipe after a SIGSTOP; cat is just reporting the EFAULT from a 
> failed read() call.

I have a patch for this in the loop.  Actually it is supposed to fix
the "Bad address" problem in git(*), but the underlying problem is
apparently the same.


Corinna

(*) http://cygwin.com/ml/cygwin/2009-06/msg00546.html

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

