Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-09-10 Thread SZEDER Gábor
On Wed, Sep 04, 2019 at 01:04:42AM -0400, Jeff King wrote: > On Fri, Aug 30, 2019 at 02:10:05PM +0200, SZEDER Gábor wrote: > > > On Fri, Aug 30, 2019 at 12:06:30AM +0200, SZEDER Gábor wrote: > > > On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > > > > On Thu, Aug 29, 2019 at 10:38:0

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-09-03 Thread Jeff King
On Fri, Aug 30, 2019 at 02:10:05PM +0200, SZEDER Gábor wrote: > On Fri, Aug 30, 2019 at 12:06:30AM +0200, SZEDER Gábor wrote: > > On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > > > On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > > > > So any fixes there have to happen

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-30 Thread SZEDER Gábor
On Fri, Aug 30, 2019 at 12:06:30AM +0200, SZEDER Gábor wrote: > On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > > On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > > > So any fixes there have to happen on the client side. I am still > > > confused about why the client is

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread SZEDER Gábor
On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > > So any fixes there have to happen on the client side. I am still > > confused about why the client is writing in this case, per the argument > > in 014ade7484 (upload-pack:

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread SZEDER Gábor
On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > So any fixes there have to happen on the client side. I am still > confused about why the client is writing in this case, per the argument > in 014ade7484 (upload-pack: send ERR packet for non-tip objects, > 2019-04-13). It would be nice

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 10:27:16AM -0400, Derrick Stolee wrote: > > I don't think we should need such a call. For one thing, if it were > > necessary, that would mean we're not writing out the packet at all. But > > your whole problem is that we're writing the message twice, one of which > > comes

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Derrick Stolee
On 8/29/2019 10:13 AM, Jeff King wrote: > On Thu, Aug 29, 2019 at 08:58:55AM -0400, Derrick Stolee wrote: > >> However, I do have a theory: the process exits before flushing the >> packet line. Adding this line before exit(1) should fix it: >> >> packet_writer_flush(writer); >> >> I can send

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 08:58:55AM -0400, Derrick Stolee wrote: > However, I do have a theory: the process exits before flushing the > packet line. Adding this line before exit(1) should fix it: > > packet_writer_flush(writer); > > I can send this in a v2, but it would be nice if you could

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Derrick Stolee
On 8/28/2019 12:15 PM, SZEDER Gábor wrote: > On Wed, Aug 28, 2019 at 11:39:44AM -0400, Jeff King wrote: >> On Wed, Aug 28, 2019 at 10:54:12AM -0400, Jeff King wrote: >> Unfortunately, however, while running './t5516-fetch-push.sh -r 1,79 --stress' to try to reproduce a failure caused by t

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-28 Thread SZEDER Gábor
On Wed, Aug 28, 2019 at 11:39:44AM -0400, Jeff King wrote: > On Wed, Aug 28, 2019 at 10:54:12AM -0400, Jeff King wrote: > > > > Unfortunately, however, while running './t5516-fetch-push.sh -r 1,79 > > > --stress' to try to reproduce a failure caused by those mingled > > > messages, the same check

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-28 Thread Jeff King
On Wed, Aug 28, 2019 at 10:54:12AM -0400, Jeff King wrote: > > Unfortunately, however, while running './t5516-fetch-push.sh -r 1,79 > > --stress' to try to reproduce a failure caused by those mingled > > messages, the same check only failed for a different reason so far > > (both on Linux and macO

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-28 Thread Jeff King
On Wed, Aug 28, 2019 at 11:34:08AM +0200, SZEDER Gábor wrote: > On Tue, Aug 27, 2019 at 06:43:29PM -0700, Derrick Stolee via GitGitGadget > wrote: > > Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, > > allowtipsha1inwant=true' that checks stderr for a specific error > > string

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-28 Thread SZEDER Gábor
On Tue, Aug 27, 2019 at 06:43:29PM -0700, Derrick Stolee via GitGitGadget wrote: > Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, > allowtipsha1inwant=true' that checks stderr for a specific error > string from the remote. In some build environments the error sent > over the remo

[PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-27 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1, allowtipsha1inwant=true' that checks stderr for a specific error string from the remote. In some build environments the error sent over the remote connection gets mingled with the error from the die() statement