Re: Git push race condition?

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

 



On Tue, Mar 25, 2014 at 10:57 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Tue, Mar 25, 2014 at 09:45:20AM -0400, Scott Sandler wrote:
>
>> Version of git on the server? git version 1.8.3-rc0
>
> There was significant work done between v1.8.3 and v1.8.4 on handling
> races in the ref code. As I said before, I don't think the symptoms you
> are describing are anything we have seen, or that could be triggered by
> the races we found (which were mostly to do with ref enumeration, not
> ref writing). But I would suggest upgrading to a newer version of git as
> a precaution.
>
> You mentioned elsewhere turning on the reflog, which I think is a good
> idea. If there is a race of this sort, you will see a "hole" in the
> reflog, where a ref goes from A->B, then again from A->B' (whereas with
> normal writes, it would be B->B').
>
> -Peff

This finally happened again. Here's what the reflog looks like:

2805f68 master@{0}: push
96eebc0 master@{1}: push
75bd4a6 master@{2}: push
abc30da master@{3}: push
eba874f master@{4}: push
10981e7 master@{5}: push
76b3957 master@{6}: push
2e3ea06 master@{7}: push
9d4e778 master@{8}: push
dbd70ae master@{9}: push
508ab4f master@{10}: push
36a0ce4 master@{11}: push
ddc258e master@{12}: push
cf025de master@{13}: push
dbd70ae master@{14}: push
95d33eb master@{15}: push
75b8e9a master@{16}: push

The commit that was lost does not show in the reflog at all, its short
hash was e0de949aa. The commit that "won the race" against it is
9d4e778 (I'm inferring this based on timing since it was pushed at
about the same time as the lost commit).

One interesting thing to note is that dbd70ae shows up at two separate
points in the reflog though, one being directly before the 9d4e778
commit that won the race. According to Gitlab's event log that commit
was just pushed once, right after 95d33eb and before cf025de as it
shows in master@{14} there. The fact that the same commit shows up
again in master@{9} is interesting.

Now that it has happened again and I've got this data, I'm going to
upgrade git but let me know if this provides any insight in the mean
time.

-Scott
--
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]