Last modified: 2012-05-19 06:18:01 UTC
$ git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git fails with error: RPC failed; result=22, HTTP code = 500 Related bugs and mailing list posts: * https://code.google.com/p/gerrit/issues/detail?id=769 * http://www.gossamer-threads.com/lists/wiki/wikitech/278195 * http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/60018/focus=60060 * http://comments.gmane.org/gmane.comp.desktop.trinity.devel/3757 Tested (not working) with git versions 1.7.1, 1.7.9.2, 1.7.9.6. If the --depth option really crashes the git server, then sending this command could be possibly used for a DoS attack -> That's why I set severity to major. Should your server's memory size be increased ?
If this is indeed issue 769, I suspect it will be fixed by the 2.3 upgrade (since they upgraded JGit to 1.1). We can test again then.
And for the record, it doesn't *crash* gerrit. It hits an exception that's logged and it fails for the user, but it doesn't *crash*
(In reply to comment #2) > And for the record, it doesn't *crash* gerrit. It hits an exception that's > logged and it fails for the user, but it doesn't *crash* Thanks for investigating this in the logs, and for reporting!
Works for me with the 2.3 upgrade: $ git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git test-shallow-clone Cloning into 'test-shallow-clone'... remote: Counting objects: 31773, done remote: Finding sources: 100% (31773/31773) remote: Total 31773 (delta 12783), reused 16435 (delta 12783) Receiving objects: 100% (31773/31773), 291.11 MiB | 1.82 MiB/s, done. Resolving deltas: 100% (12783/12783), done. Marking FIXED.
Hmmmm, strange is my following observation (each clone into a fresh directory): git clone ssh://<username>@gerrit.wikimedia.org:29418/mediawiki/core.git du -h . ==> 178 MB git clone --depth 1 ssh://<username>@gerrit.wikimedia.org:29418/mediawiki/core.git du -h . ==> 360 MB [sic] ==> Shallow clone needs 360 MB ??? I am puzzled.
some more examples, where shallow clones are smaller: git clone git://gitorious.org/owncloud/owncloud.git ==> 39M git clone --depth 1 git://gitorious.org/owncloud/owncloud.git ==> 34M git clone https://github.com/Pita/etherpad-lite.git ==> 4,8M git clone --depth 1 https://github.com/Pita/etherpad-lite.git ==> 2,6M
for info only (2012-05-19) + git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/core.git ==> 84M + git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git ==> 184M