Page MenuHomePhabricator

Fix race condition inside `git diff-files`
ClosedPublic

Authored by epriestley on Jun 18 2014, 12:11 AM.
Tags
None
Referenced Files
F19026712: D9616.diff
Mon, Nov 24, 12:06 PM
F19026524: D9616.id23066.diff
Mon, Nov 24, 11:17 AM
F18905989: D9616.diff
Sat, Nov 8, 4:27 PM
F18845941: D9616.diff
Wed, Oct 29, 3:21 PM
F18585694: D9616.diff
Sep 11 2025, 4:04 PM
F18579930: D9616.id23052.diff
Sep 11 2025, 2:09 AM
F18579299: D9616.id23066.diff
Sep 11 2025, 12:16 AM
F18579007: D9616.id23066.diff
Sep 10 2025, 11:51 PM
Subscribers

Details

Summary

There's some sort of race inside git here, where the git diff-files command exits with different results some of the time when run in parallel with git ls-files or git diff (running either command was sufficient to trigger the race).

Run it separately to avoid the race.

I poked around the git source a little bit but quickly lost interest given that the issue seems fixed and this workaround is essentially reasonable.

Test Plan

Ran test 20x in a row without failures.

Diff Detail

Repository
rARC Arcanist
Branch
staturace
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1207
Build 1207: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Fix race condition inside `git diff-files`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: hach-que.
hach-que edited edge metadata.

Ran it 5x in a row, no problemo.

This revision is now accepted and ready to land.Jun 18 2014, 6:45 AM
epriestley updated this revision to Diff 23066.

Closed by commit rARCdd1f93d77b5f (authored by @epriestley).