X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:references
	:mime-version:content-type:in-reply-to; q=dns; s=default; b=oOFt
	vKRAo/i91PVSrIeRP3FDdACRSpC7WGN8VeRf1v5XYG28HkQgYChVJ2ZigIouwJ3x
	dNVSERgyThPlejW7MXtWL5a4h0bsqaEbv2oemfl4glYE3K7lcRGloHKrofQ2skGP
	nnNNn/UZnbViv79jAa/ljhISo6tdoONQonoJw8U=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:references
	:mime-version:content-type:in-reply-to; s=default; bh=A9rOokOCTz
	A2kiqtWUkePqL9aSE=; b=K4Jwm8Dcdxwj4NsERPyjtxEF5pgrQPSx1l2pTyofYh
	IgKyRWygDxJo3Jr/yz4W+fLZPMyqeS0UStLTDhCqlx8qjo9/3wRVmjd6CdYOg81W
	+5URwNaMVg2PKzTRkgAU93UyE5M+YCaHl44l1078tIwYT5AtqK5qpl0j/8Hf93CT
	k=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: tishler.net
Date: Fri, 17 Jan 2014 11:13:34 -0500
From: Jason Tishler <jason@tishler.net>
To: cygwin@cygwin.com
Subject: Re: Add retry logic to rebaseall
Message-ID: <20140117161333.GA59772@tishler.net>
Mail-Followup-To: cygwin@cygwin.com
References: <CACUHbYNK6e+NrBiNo9RUynqc=F39mLWnizQNFeU-DUSVj0rmeQ@mail.gmail.com> <20140116061906.GA1992@ednor.casa.cgf.cx> <20140116085431.GB26205@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20140116085431.GB26205@calimero.vinschen.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-IsSubscribed: yes

On Thu, Jan 16, 2014 at 09:54:31AM +0100, Corinna Vinschen wrote:
> On Jan 16 01:19, Christopher Faylor wrote:
> > On Wed, Jan 15, 2014 at 11:23:08PM -0500, David Boyce wrote:
> > >Jason et al,
> > >
> > >Here's a suggested new flag (with patch, attached) for
> > >/usr/bin/rebaseall. It adds a -w(ait) flag which causes the check for
> > >running Cygwin processes to be done in a loop, breaking out and doing
> > >the rebaseall as soon as it finds a quiescent moment.
> > 
> > +1
> > 
> > Seems like a good idea to me.
> 
> ACK.  Jason, shall I apply the patch?

AFAICT, there is a race condition issue with the proposed functionality.
David's build servers could be quiescent when the check for running
processes is performed, but they could restart before the rebase is
finished.  I realize the window is very small, but it is nevertheless
nonzero, so the rebase could still fail.

The patch could be enhanced to check the status of the rebase and retry
if the rebase failed and the wait option was specified.  This would fix
the race condition.

There are also formatting issues with the patch.  For example, the
addition of the while loop requires lines to be shifted to the right.
I know rebaseall unfortunately has a mixture of tabs and spaces, but
after applying the patch some lines are not indented correctly.

IMO, the proposed functionality is very specialized and doesn't seem to
be generally applicable.  This functionality could also be implemented
(by the few who need it) as a very simple wrapper script that calls
rebaseall until is succeeds.  This approach would also workaround the
race condition.

I'm not enamored with this change, but I will go along with the
consensus.  If we decide to move forward, then I would like the race
condition and formatting issues resolved.

Thanks,
Jason

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

