From: Brandon Williams Date: Wed, 30 Nov 2016 23:57:56 GMT Subject: Re: What's cooking in git.git (Nov 2016, #06; Mon, 28) Message-ID: <20161130235756.GC192901@google.com> In-Reply-To: <20161130234636.6az7xfywzprpn6ly@sigill.intra.peff.net> On 11/30, Jeff King wrote: > On Wed, Nov 30, 2016 at 03:42:48PM -0800, Brandon Williams wrote: > > > > where 20813 and 20867 are two threads of the main process. One is doing > > > the lstat and the other calls chdir at the same moment. > > > > Yeah so it looks like the start_command function calls chdir. Which > > means any uses of the run-command interface are not thread safe.... > > That seems crazy. The chdir should be happening on the child side of the > fork (and looking at the code, it seems to be the case). And on the > Windows side, without fork, it's an option to the spawn call, which > makes sense. > > > For now the work around could be to just pass "-C " to the child > > process instead of relying on run-command to chdir. > > Yeah, that would push it after the exec. I just don't understand why > that would be necessary. > > -Peff You're right, I jumped the gun. That doesn't seem to fix the problem (as I'm still seeing the same failure). -- Brandon Williams