简体   繁体   中英

Git push randomly fails through git-http-backend on AFS share

My Git repository sits on an AFS share. All running processes on the Linux server have rights to write on this AFS share what ever the mask of files and directories are.

Git is served through Git Smart HTTP with Apache and git-http-backend.

The problem I have, is when I try to push to the master from a client, I have to repeat the operation 3 to 4 times until it works. On the Apache server side I see these errors:

fatal: failed to write object error: insufficient permission for adding an object to repository database ./objects

On the client side I have this error:

error: unpack failed: unpack-objects abnormal exit

What I don't understand is why is it working after 3/4 times because in between the rights on the folder don't change.

Any clue?

Thank you!

Gilles

PS: version of Git on the client is git-1.7.3.4-3.6 and on the server git-1.7.4.1

why is it working after 3/4 times because in between the rights on the folder don't change.

Probably because it is not permissions related. More likely, there is a kind of race condition that is made possible by storing on the AFS share. Your best bets would be to

  • do 'not do that' (ie store on local storage first)
  • per-use AFS documentation to find any relevant flags (look for 'sync', 'delay', 'cache' or 'lazy')
  • file it as a bug/post on AFS user groups

I've seen problems like this occur on ZFS-fuse when we first started out optimizing small writes (git does very accurate and optimized stat updates; if it cannot read back as expected immediately, it will fail)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM