-
Notifications
You must be signed in to change notification settings - Fork 218
Git clone fails with large repositories #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Out of curiosity - how much free memory do you have on the client? (re)packing tends to be greedy and can fail for larger repos on memory constrained systems |
The system I'm testing on had 110GB free at the time. I can clone those repositories onto the normal disk. It's only on the MooseFS mount the bigger repositories fail. |
No problems on v4 mountpoint:
Also no problems on a fresh v3.0.109 instance made for this test using default settings:
Cloning started when PoC had only one CS, it was then expanded to two chunkservers (ZFS backed). The only indication of unhappiness is the reference to Line 3536 in 6426302
Working with big git repos can be a PITA in general. Maybe try a shallow clone first, and then fetch more data to see where it breaks for you? It is worth noting that the above tests used client and servers running Linux, not FreeBSD. |
On my hardware, clone tests against v3 and v4 mountpoints resulted in a noticeable CPU load on the respective masters due to metadata operations needed to support 1K+ chunk creations/second but a healthy margin was always present preventing any housekeeping tasks from starving. It would be helpful if you edit the issue and include all relevant information |
It appears to be an issue related to the mfscachemode. Using mfscachemode=DIRECT works as expected, though slower. mfscachemode=DIRECTgit clone https://github.com/freebsd/freebsd.git mfscachemode=AUTOgit clone https://github.com/freebsd/freebsd.git I ran each test several times on both settings. The results and errors were similar each time. The mfsmount.cfg file looks like this: mfsmaster=IP address or mfsmaster=IP address This was tested on FreeBSD 12.1 with the new Fuse stack. The sysctl vfs.fusefs.data_cache_mode is set to 1. I suspect the issue is related to mfscachemode=AUTO and the new FreeBSD Fuse stack. I don't think it's GIT specific, but it seems to be a good test case. Any chance somebody running FreeBSD 12.1+ can verify these results? |
There is a bug in FreeBSD 12.1 behaviour. Basically, when you append data to a file, the system opens it write only and should only write data to the end. It absolutely should not read the file (or even a part of it) first - this is not a POSIX compliant behaviour. But FreeBSD does. Yesterday, while testing something else, I run a script on FreeBSD and I discovered this bug. In DIRECT mode, FreeBSD does not attempt to read anything while appending, in mode with cache - it does. Now, I don't know what operations exactly Anyway, as of right now, we recommend going back to only using DIRECT mode with FreeBSD. I will run some more test and make a bug report to FreeBSD, but then the ball is in their court to fix this. |
Thank you @chogata Please link to the FreeBSD bug report once filed. I'll follow up on it. |
Hello @chogata Has a bug report been filed with FreeBSD? If not, is there any further information you can provide to assist in replicating the issue? |
It turns out FUSE allows reading from files opened with O_WRONLY flag. We will accommodate this behaviour in the next release of MooseFS 3.0.x. Until then - use the DIRECT mode. |
Hello @chogata I've patched mfs_fuse.c on the client using https://github.com/moosefs/moosefs/commit/fb38c809f78a734678c90894d09a18783dcb26b4.patch. Unfortunately, using AUTO still causes large git clones to fail. Using DIRECT works as expected. Are there any other patches I should be testing with? |
Strange. Yesterday I was able to clone whole "freebsd.git" on FreeBSD 12.1 using new client in AUTO mode without any issues. I'll check again. |
Just cloned linux.git:
|
I must have messed up the patch job. I'll wait until 3.0.110 is out and retest. Thank you. |
EDIT: This is working with 3.0.111. My last test still had a connected client using 3.0.109 which was causing the issue. |
For a moment there I thought I've found your problem... MooseFS from ports still uses the "old" (version 2) FUSE as a dependency. We will change it ASAP. But I Installed fresh FreeBSD 12.1, updated it to p2, compiled 3.0.111 from ports and tried cloning linux from git and it finished successfully... With "old" FUSE, in FBSDAUTO mode. Nevertheless, you can try recompiling and reinstalling with "new" (version 3) FUSE. Please, install manually the port |
Also, one additional question - are you cloning to an empty directory every time? |
Hello @chogata The git clones are working with 3.0.111. I had a 3.0.109 client still connected that was causing the issue. The moosefs3-client port has a hard requirement on fusefs-libs. How do I change that to allow for fusefs-libs3? |
As I wrote above - we will change this requirement ASAP. In the meantime, if you compile and install fusefs-libs3 BEFORE you start compiling moosefs client, it will link to fusefs-libs3 (it will still compile fusefs-libs as a dependency, but it will use the newer version, as the configuration script always tries that first). |
Thank you for the instructions. I've built fusefs-libs3 and rebuilt the moosefs3-client. Everything seems to be working as normal. The original issue is resolved so I'll close this. Thank you. |
Have you read through available documentation and open Github issues?
Yes
Is this a BUG report, FEATURE request, or a QUESTION? Who is the indended audience?
BUG report
System information
FreebSD 12.1
MooseFS 3.0.109 installed through ports.
Hardware / network configuration, and underlying filesystems on master, chunkservers, and clients.
1x master server
4x chunk server
2x 1GB LACP network.
All servers are dedicated hardware. The underlying file system is ZFS.
How much data is tracked by moosefs master (order of magnitude)?
None. This is testing lab, not production.
Describe the problem you observed.
Git clone fails on large repositories. Using git version 2.25.0.
Can you reproduce it? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Yes
Tests showing output with different repositories.
1: Cloning MooseFS works
git clone https://github.com/moosefs/moosefs.git
Cloning into 'moosefs'...
remote: Enumerating objects: 696, done.
remote: Counting objects: 100% (696/696), done.
remote: Compressing objects: 100% (424/424), done.
remote: Total 9288 (delta 447), reused 413 (delta 263), pack-reused 8592
Receiving objects: 100% (9288/9288), 4.95 MiB | 10.50 MiB/s, done.
Resolving deltas: 100% (7811/7811), done.
Updating files: 100% (429/429), done.
2: Cloning FreeBSD fails
git clone https://github.com/freebsd/freebsd.git
Cloning into 'freebsd'...
remote: Enumerating objects: 190, done.
remote: Counting objects: 100% (190/190), done.
remote: Compressing objects: 100% (151/151), done.
remote: Total 3834965 (delta 59), reused 75 (delta 35), pack-reused 3834775
Receiving objects: 100% (3834965/3834965), 2.35 GiB | 19.43 MiB/s, done.
fatal: premature end of pack file, 96 bytes missing
fatal: index-pack failed
3: Cloning Linux fails
git clone https://github.com/torvalds/linux.git
Cloning into 'linux'...
remote: Enumerating objects: 7131368, done.
remote: Total 7131368 (delta 0), reused 0 (delta 0), pack-reused 7131368
Receiving objects: 100% (7131368/7131368), 2.65 GiB | 21.43 MiB/s, done.
fatal: premature end of pack file, 1011 bytes missing
fatal: index-pack failed
Tests 2 and 3 fail on the 'Resolving deltas' part. A possible related bug: s3fs-fuse/s3fs-fuse#839
The text was updated successfully, but these errors were encountered: