fatal: fsync error on git/repo/path
Asked Answered
I

4

9

I try to whole day resolve the trouble: When i try to pull or clone exists repository in empty directory, i got error:

$ git clone https://bitbucket.org/path_to_repo/aroma
Cloning into 'aroma'...
remote: Counting objects: 1335, done.
remote: Compressing objects: 100% (1174/1174), done.
remote: Total 1335 (delta 618), rReecused 551 (deltea 72)
Receiving objects: 100% (1335/1335), 43.16 MiB | 3.78 MiB/s, done.
Resolving deltas: 100% (618/618), done.
fatal: fsync error on 'H:/Project/testrep/aroma/.git/objects/pack/tmp_pack_xqHCKb': Bad file descriptor
fatal: index-pack failed

I tried set pack.windowMemory size and pack.packSizeLimit in config and more. The same error ;[ Before I could to clone repositories. But something went wrong

Inferior answered 27/11, 2016 at 10:49 Comment(6)
The fsync() operation ensures that file data are successfully written to stable storage (see pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html or the earlier pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html). Failure implies that the file system is no longer functioning, i.e., your H: drive is broken.Simpleton
So other repos locate neighbor and it repos very good pull and push.Inferior
I don't understand that comment, but if you have something that demonstrates that the server itself (the one running the H: drive) is fine, then the "broken" part must logically have something to do with the client and/or the client's connection to the server.Simpleton
Nearby exists repositories have success pull and push commandsInferior
Perhaps, then, you're out of disk space (or disk quota) on the network drive?Simpleton
Have you found any solution though?Capping
U
2

Check if the issue persists with:

Depending on the nature of the drive H:\, you could have issue accessing/updating files because of said nature.

So other repos locate neighbor and it repos very good pull and push.

If other repos are working from H: (meaning you can clone/push/pull from those repos on H:), try and duplicate (simple copy) your faulty repo to another folder, and try to clone it from that other folder. If it still fails, something is corrupted in it: time to apply git fsck to check it out.


Note: with Git 2.42 (Q3 2023), you now can use existing trace2 facility to know more about fsync events.

See commit a27eece (20 Jul 2023) by Beat Bolli (bbolli).
(Merged by Junio C Hamano -- gitster -- in commit 52d9dc2, 02 Aug 2023)

wrapper: use trace2 counters to collect fsync stats

Signed-off-by: Beat Bolli

As mentioned in the thread starting at this thread, trace2 counters should be used to count events instead of ad-hoc static variables.

Convert the two fsync static variables to trace2 counters, reducing the coupling between wrapper.c and the trace2 subsystem.
Adjust t/t5351 to match the trace2 counter output format.

The counters are not per-thread because the ones being replaced also were not.

Unexpected answered 27/11, 2016 at 11:16 Comment(3)
I tried to use Command windows shell, but I got the same error. I can't use disk C because it SSD. You know, I have 2 PC and it have the same versions git. But one PC have this trouble and the second not. 2.8.1 git versionInferior
@Inferior Can you try with Git 2.11.0.rc3?Unexpected
@Inferior And can you try with another drive? (note: all mines are SSD, and git works just fine on them)Unexpected
R
-2

I had the same trouble with several Git repositories (from same server). Couldn't pull, couldn't clone.

After restarting my workstation, the problem was gone.

Reprieve answered 8/2, 2018 at 10:42 Comment(0)
P
-3

Confirm the config is done for the git, check using the below command.

$ git config --list

If you can't see anything then setup the config using commands

$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"

confirm again

$ git config --list
Plow answered 19/2, 2020 at 14:14 Comment(0)
I
-3

I think the problem is when you are creating ssh key you forget to add it. ssg-add ~/.ssh/id_rsa. Then copy your key to github and then check if everything is working fine using. ssh -T [email protected]. If you get the success. you are all setup.

Insistency answered 30/3, 2022 at 7:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.