[1.7.2] Please cherry-pick "upload-pack: start pack-objects before async rev-list"
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 26, 2011, 06:45 UTC
- Message-ID
- <20110526064547.GA18777@elie>
- In-Reply-To
- <20110406213333.GA18481@sigill.intra.peff.net>
Hi Junio,
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.
This server-side deadlock started being triggered by shallow clones when sv.gnu.org upgraded to v1.7.2.5 a couple of months ago[1]. So it might be worth thinking about how to help upgrade-averse server admins to fix it.
Luckily, Jeff's patch (v1.7.5.1~4^2, upload-pack: start pack-objects before async rev-list, 2011-04-06) applies cleanly on top of the oldest commit with the problem that I can find (v1.7.2-rc0~31^2~3, Reimplement async procedures using pthreads, 2010-03-06). Could you queue it for inclusion in maint-1.7.2?
If I understand correctly, Windows with threaded async rev-list before then would not have suffered from this deadlock because it did not fflush(NULL) in start_command until v1.7.4.1~18 (start_command: flush buffers in the WIN32 code path as well, 2011-02-04).
[1] http://thread.gmane.org/gmane.comp.version-control.git/172042