Bug 330758 - while cloning git repository jgit.git on Android 2.2
Summary: while cloning git repository jgit.git on Android 2.2
Status: RESOLVED WORKSFORME
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: Other other
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Christian Halstrick CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, core
Depends on:
Blocks:
 
Reported: 2010-11-21 15:05 EST by Venky CLA
Modified: 2011-03-25 11:47 EDT (History)
5 users (show)

See Also:


Attachments
android app which clones your repo (602.43 KB, application/octet-stream)
2011-03-24 19:55 EDT, Christian Halstrick CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Venky CLA 2010-11-21 15:05:12 EST
Build Identifier: Version: Helios Service Release 1 Build id: 20100917-0705

While cloning git repository on Android 2.2 I the the following error.
jGit works fine of some git repository ( maybe with out pack compressions) but fails on some of them like https://github.com/venkateshswdev/git_test.git and jgit.git

The command line jgit works correctly but just the android version fails with the below error.

WARN/System.err(775): org.eclipse.jgit.errors.TransportException: Packfile corruption detected: Unknown zlib error.
WARN/System.err(775): at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:286)
WARN/System.err(775): at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:585)
WARN/System.err(775): at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:224)
WARN/System.err(775): at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:210)
WARN/System.err(775): at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:145)
WARN/System.err(775): at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)
WARN/System.err(775): at org.eclipse.jgit.transport.Transport.fetch(Transport.java:880)
WARN/System.err(775): at com.example.LoadRepository.runFetch(LoadRepository.java:219)
WARN/System.err(775): at com.example.LoadRepository.LoadFromRemoteRepository(LoadRepository.java:112)
WARN/System.err(775): at com.example.LoadRepository.run(LoadRepository.java:63)
WARN/System.err(775): at java.lang.Thread.run(Thread.java:1096)
WARN/System.err(775): Caused by: org.eclipse.jgit.errors.CorruptObjectException: Packfile corruption detected: Unknown zlib error.
WARN/System.err(775): at org.eclipse.jgit.transport.IndexPack.inflate(IndexPack.java:991)
WARN/System.err(775): at org.eclipse.jgit.transport.IndexPack.inflateAndReturn(IndexPack.java:965)
WARN/System.err(775): at org.eclipse.jgit.transport.IndexPack.whole(IndexPack.java:847)
WARN/System.err(775): at org.eclipse.jgit.transport.IndexPack.indexOneObject(IndexPack.java:806)
WARN/System.err(775): at org.eclipse.jgit.transport.IndexPack.index(IndexPack.java:409)
WARN/System.err(775): at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:647)
WARN/System.err(775): at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:279)
WARN/System.err(775): ... 10 more

WARN/System.err(775): java.lang.NullPointerException
WARN/System.err(775): at org.eclipse.jgit.lib.ObjectIdSubclassMap.index(ObjectIdSubclassMap.java:172)
WARN/System.err(775): at org.eclipse.jgit.lib.ObjectIdSubclassMap.get(ObjectIdSubclassMap.java:89)
WARN/System.err(775): at org.eclipse.jgit.revwalk.RevWalk.lookupCommit(RevWalk.java:629)
WARN/System.err(775): at org.eclipse.jgit.api.LogCommand.add(LogCommand.java:211)
WARN/System.err(775): at org.eclipse.jgit.api.LogCommand.add(LogCommand.java:144)
WARN/System.err(775): at com.example.GitRepositoryService.getCommitDTOs(GitRepositoryService.java:37)
WARN/System.err(775): at com.example.LoadActivity$1.handleMessage(LoadActivity.java:25)
WARN/System.err(775): at android.os.Handler.dispatchMessage(Handler.java:99)
WARN/System.err(775): at android.os.Looper.loop(Looper.java:123)
WARN/System.err(775): at android.app.ActivityThread.main(ActivityThread.java:4627)
WARN/System.err(775): at java.lang.reflect.Method.invokeNative(Native Method)
WARN/System.err(775): at java.lang.reflect.Method.invoke(Method.java:521)
WARN/System.err(775): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
WARN/System.err(775): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
WARN/System.err(775): at dalvik.system.NativeStart.main(Native Method)



Reproducible: Always

Steps to Reproduce:
1. Clone git repository https://github.com/venkateshswdev/git_test.git on android using code
2.
3.
Comment 1 Chris Aniszczyk CLA 2010-11-22 10:08:37 EST
Can you try with the latest nightly build from our p2 repo?

http://download.eclipse.org/egit/updates-nightly
Comment 2 Vladimir Vukicevic CLA 2011-03-14 07:48:01 EDT
*** Bug 339869 has been marked as a duplicate of this bug. ***
Comment 3 Vladimir Vukicevic CLA 2011-03-14 07:49:19 EDT
Note that I'm seeing this using the latest egit nightly as of Mar 14 on win32 with the Oracle JDK.  remote git repo (via git+ssh) was created by git 1.7.4.1, 1.7.0.1 on mingw32 can pull it fine.
Comment 4 Vladimir Vukicevic CLA 2011-03-17 22:55:21 EDT
Cloning from the command line using jgit 0.10.1 works fine, so this looks like a regression.

(Can't change the bug summary, but this seems to be general, not Android related)
Comment 5 Christian Halstrick CLA 2011-03-24 19:54:03 EDT
I tried this out. I wrote a small android app which tries to clone your repo and then print info's about the commits. I tested the app on my LG-P500 with android 2.2 ... and it works fine for me. I attached the app here and I shared the sources for it here: git://github.com/chalstrick/GitLog.git . Does this app work for you?
Comment 6 Christian Halstrick CLA 2011-03-24 19:55:31 EDT
Created attachment 191879 [details]
android app which clones your repo
Comment 7 Vladimir Vukicevic CLA 2011-03-24 23:33:30 EDT
Since I can reproduce this on the desktop, is there any information that I can provide?  Happy to get jgit in the debugger or similar at the point where the exception is thrown if it would help.  (The repo's internal unfortunately.)
Comment 8 Christian Halstrick CLA 2011-03-25 04:04:39 EDT
It is not yet clear to me how exactly you reproduce the problem. You once wrote that to reproduce the problem you "Clone git repository https://github.com/venkateshswdev/git_test.git on android using code" . That's what I did, right? I wrote a android app which used the JGit lib to clone exactly the mentioned repo. 

I guess I misunderstood your use-case. What "exactly" do you do to reproduce the problem?
Comment 9 Vladimir Vukicevic CLA 2011-03-25 07:32:33 EDT
I think you have me confused with the original reporter of this bug :-)

I filed bug 339869 and was pointed to this one on irc which seemed very similar -- I duped 339869 against this, and then realized I couldn't edit the bug summary to reflect that it's not just android.

For my use case, I am just cloning a repo on a win32 host using sun's java version 1.6.0_23.  Attempting to clone with both egit/jgit 0.11.3 and 0.12.0.201103170911 fail with the same exception above.  Other repos work fine.  However, all repos work fine with jgit 0.10.1, both via egit and via jgit command line, which makes me think that there's a regression somewhere.  (Can't use egit 0.10.1 though, because there's a file rename bug on windows in that version.)
Comment 10 Vladimir Vukicevic CLA 2011-03-25 07:33:09 EDT
Note that I don't see this error with the original reporter's repo though (just tried), so perhaps the bugs aren't identical, just have a similar symptom.
Comment 11 Christian Halstrick CLA 2011-03-25 08:04:03 EDT
Ahhh, now I understand. That explains. I would suggest to reopen 339869 and to close this (if the original auther has no objections). I'll do that and then try to solve your problem on 339869.
Comment 12 Christian Halstrick CLA 2011-03-25 08:11:44 EDT
(In reply to comment #0)

> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Clone git repository https://github.com/venkateshswdev/git_test.git on
> android using code


Since I can't reproduce this problem anymore on android I would like to close it now.
Comment 13 Christian Halstrick CLA 2011-03-25 11:42:26 EDT
If I would have access to your repo then I would run a "git bisect" in order to find out when the problem was introduced. Maybe you can do? In order to do that you just must be able to compile jgit with maven from command line as described in our Contributors guide[1].

Then I would
- cd <yourJGitDir>
- git bisect start origin/master v0.10.1 --
- git bisect run sh -c "rm -fr <aTempFolder>; mvn -Dmaven.test.skip=true package || exit 125; java -Xmx512m -jar org.eclipse.jgit.pgm/target/jgit-cli.jar clone <yourRepoURL> C:/tmp/a || exit 127; rm -fr <aTempFolder>"

This will do a binary search on the jgit states between v0.10.1 and origin/master. Each inspected state is first build and then we try to clone the repo with the just build jgit commandline tool.

In the end it should tell you that commit which broke the clone.

[1] http://wiki.eclipse.org/EGit/Contributor_Guide
Comment 14 Christian Halstrick CLA 2011-03-25 11:47:16 EDT
(In reply to comment #13)

forget this last comment on git bisect. This should go to the other bug 339869.

> If I would have access to your repo then I would run a "git bisect" in order to
> find out when the problem was introduced. Maybe you can do? In order to do that
> you just must be able to compile jgit with maven from command line as described
> in our Contributors guide[1].
> 
> Then I would
> - cd <yourJGitDir>
> - git bisect start origin/master v0.10.1 --
> - git bisect run sh -c "rm -fr <aTempFolder>; mvn -Dmaven.test.skip=true
> package || exit 125; java -Xmx512m -jar
> org.eclipse.jgit.pgm/target/jgit-cli.jar clone <yourRepoURL> C:/tmp/a || exit
> 127; rm -fr <aTempFolder>"
> 
> This will do a binary search on the jgit states between v0.10.1 and
> origin/master. Each inspected state is first build and then we try to clone the
> repo with the just build jgit commandline tool.
> 
> In the end it should tell you that commit which broke the clone.
> 
> [1] http://wiki.eclipse.org/EGit/Contributor_Guide