git clone to NFS disk error: fatal: write error: Bad file descriptor
Asked Answered
G

3

10

I have a NFS server and shared a disk(without ssd cached) to few host,When users git clone to this NFS disk form our gitlab,it always got error like that:

remote: Compressing objects: 100% (430/430), done.
fatal: write error: Bad file descriptor.61 MiB | 453.00 KiB/s     
fatal: index-pack failed

If only one man git clone, it will be done, if many peoples git at the same time, will get errors. This is the config of our NFS server:

/data/proj 192.168.1.0/24(rw,no_root_squash,sync,no_subtree_check)

This is the host mount info:

192.168.1.10:/data/proj on /proj type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.2.211,local_lock=none,addr=192.168.1.10)

I try to change the NFS server config like async, but it not work, change .gitconfig setting not work so. I think the issue is more like in NFS-server config, but I don't know how to solve it, Please help!

Gardia answered 10/9, 2018 at 14:41 Comment(0)
H
1

I was having a similar problem with git on an nfs mount. I had a different error message though:

Cloning into 'tileserver-gl'...
remote: Counting objects: 2179, done.
remote: Compressing objects: 100% (813/813), done.
remote: Total 2179 (delta 1357), reused 2179 (delta 1357)
Receiving objects: 100% (2179/2179), 3.04 MiB | 22.72 MiB/s, done.
fatal: premature end of pack file, 83 bytes missing
warning: die() called many times. Recursion error or racy threaded death!
fatal: premature end of pack file, 81 bytes missing
fatal: index-pack failed

The fix was actually the exact opposite of Cao Cự Bảo's answer. The solution was adding the sync option to the mount options in /etc/fstab.

With that added the git clone works as expected.

Halfmast answered 12/10, 2021 at 9:47 Comment(0)
M
0

I think you config NFS server with export file with option "sync".
To fixed it, maybe try it file /etc/exports as below:

<<folder share nfs>> <<your network>> (rw,**async**)

Example: /home/abc 172.33.32.0/255.255.224.0 (rw,async)

On Nfs Client : remount nfs.

Match answered 19/6, 2020 at 5:2 Comment(0)
P
-1

Check if you have write acces to the git-repository.

Pulmonate answered 11/1, 2021 at 11:53 Comment(2)
The person who asked the question said that the problem appears only if several users do git clone simultaneously, so your answer seems irrelevant. Besides, it is only a remark, and as such it should be posted as a comment rather than an answer.Ceroplastic
In the question: If only one man git clone, it will be done, if many peoples git at the same time, will get errors Write access is not the problem.Brother

© 2022 - 2024 — McMap. All rights reserved.