You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
Race condition writing objects in LooseObjectDB #85
There's a TOCTTOU in LooseObjectDB when storing a new object, that causes storing an object to fail with FileExistsError:
File "patch_tree.py", line 132, in write_tree
return self.db.store(istream).binsha
File ".venv/lib/python3.9/gitdb/db/git.py", line 77, in store
return self._loose_db.store(istream)
File ".venv/lib/python3.9/gitdb/db/loose.py", line 226, in store
mkdir(obj_dir)
FileExistsError: [Errno 17] File exists: '/tmp/tmp.flUcclypOQ/objects/a0'
Activity
[-]Race condition in LooseDB[/-][+]Race condition in LooseObjectDB[/+][-]Race condition in LooseObjectDB[/-][+]Race condition writing objects in LooseObjectDB[/+]Byron commentedon Feb 14, 2023
Thanks for reporting and for providing a suggestion for a fix. A PR is definitely welcome.