Re: [RFC] upload-pack deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King wrote:

> Subject: [PATCH] upload-pack: start pack-objects before async rev-list
>
> In a pthread-enabled version of upload-pack, there's a race condition
> that can cause a deadlock on the fflush(NULL) we call from run-command.
[...]
> To fix this, we swap the start order: we start the
> pack-objects reader first, and then the rev-list writer
> after. Thus the problematic fflush(NULL) happens before we
> even open the new file descriptor (and even if it didn't,
> flushing should no longer block, as the reader at the end of
> the pipe is now active).
>
> Signed-off-by: Jeff King <peff@xxxxxxxx>

t5500.12 "fetch same depth in shallow repo" reproducibly hangs[1] on
the HURD without this patch and passes with it.  I had just assumed it
was some weird hurd thing.  Thanks for figuring it out.

Tested-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

[1] http://bugs.debian.org/607346
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]