From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27772 invoked by alias); 17 Jan 2014 16:13:40 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 27749 invoked by uid 89); 17 Jan 2014 16:13:39 -0000 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 Received: from s137.n254.n204.n199.static.myhostcenter.com (HELO tishler.net) (199.204.254.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 17 Jan 2014 16:13:39 +0000 Received: from pool-74-101-187-105.nycmny.fios.verizon.net ([74.101.187.105] helo=stella) by cpanel03.myhostcenter.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1W4C36-000Gva-O1 for cygwin@cygwin.com; Fri, 17 Jan 2014 11:13:36 -0500 Received: from [127.0.0.1] (helo=stella.tishler.net) by stella with smtp (Exim 4.76) (envelope-from ) id MZJZQN-000600-K4 for cygwin@cygwin.com; Fri, 17 Jan 2014 11:13:36 -0500 Received: by stella.tishler.net (sSMTP sendmail emulation); Fri, 17 Jan 2014 11:13:34 -0500 Date: Fri, 17 Jan 2014 16:13:00 -0000 From: Jason Tishler To: cygwin@cygwin.com Subject: Re: Add retry logic to rebaseall Message-ID: <20140117161333.GA59772@tishler.net> Mail-Followup-To: cygwin@cygwin.com References: <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 X-SW-Source: 2014-01/txt/msg00219.txt.bz2 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