git: fix locking issue in pull_checkout_branch#51854
Conversation
Signed-off-by: Alec Scott <[email protected]>
|
Can you confirm it works with RHEL 7? |
|
@haampie how did you test your previous PR with RHEL7? We no longer have any RHEL7 machines at LLNL, and the available docker containers for centos7 don't have a preinstalled git. (And the package repos don't exist anymore.) |
|
This one might have it: |
|
Yep! Thanks for the suggestion @haampie. This works with As a sanity check I also checked the original implementation prior to #51779 failed as expected when rebased against the same base as this PR. |
|
OK, curious, I thought that Do you know why tests did not catch this? Are we not testing |
|
The locking issue appears to be a bug internal in The issue also appears to depend on the timing between the My guess is that it's a thread race that's been made worse by filesystem speed / driver improvements in the OS.) Overall, I agree that we should in general do a better job testing |
Signed-off-by: Alec Scott <[email protected]>
Signed-off-by: Alec Scott <[email protected]> Signed-off-by: Gregory Becker <[email protected]>
Signed-off-by: Alec Scott <[email protected]> Signed-off-by: Gregory Becker <[email protected]>
After #51779, I started experiencing git locking issues like the following when attempting to update my packages repository.
Previously we'd used
which is shorthand for:
this was modified to the following to support RHEL7 (although we're unsure why this started creating the reference on old versions of git?)
This syntax bypasses a users configured refspecs and says "take whatever
<remote>gives me for<branch>and write it directly torefs/remotes/<remote>/<branch>which causes locking errors with some user / repository git configurations. After updating the command syntax to be the explicit form of what we'd been using before I am no longer experiencing any issues.