Last modified: 2012-05-19 06:18:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37949, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35949 - Shallow clones fail with errors: git clone --depth 1 fails with error: RPC failed; result=22, HTTP code = 500
Shallow clones fail with errors: git clone --depth 1 fails with error: RPC fa...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Git/Gerrit (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: upstream
Depends on: 35466
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-13 18:37 UTC by T. Gries
Modified: 2012-05-19 06:18 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description T. Gries 2012-04-13 18:37:29 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 ?
Comment 1 Chad H. 2012-04-13 19:05:35 UTC
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.
Comment 2 Chad H. 2012-04-13 19:08:04 UTC
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*
Comment 3 T. Gries 2012-04-13 19:15:12 UTC
(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!
Comment 4 Chad H. 2012-05-04 18:30:31 UTC
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.
Comment 5 T. Gries 2012-05-04 19:07:41 UTC
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.
Comment 6 T. Gries 2012-05-04 19:22:46 UTC
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
Comment 7 T. Gries 2012-05-19 06:18:01 UTC
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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links