Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 548737

Summary: Jgit does nothing when cloning git repository
Product: [Technology] JGit Reporter: torsten piotraschke <torsten.piotraschke>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn, twolf
Version: 5.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
desired jstack log
none
JarLauncher Jstack Log none

Description torsten piotraschke CLA 2019-06-28 04:12:17 EDT
With version 5.4.0.201906121030-r absolutely nothing happens, when cloning a remote git repository like this:

>Using oomph:
>Performing Git Clone git@git.our.git:project/oomph.git  (master)
>Cloning Git repo git@git.our.git:project/oomph.git to /my/folder

The same behavior appears using the instructions from https://bugs.eclipse.org/bugs/show_bug.cgi?id=545920#c5:

>./jgit54.sh clone ssh://git@git.our.git:project/oomph.git --ssh apache
>2019-04-01 11:38:55 DEBUG FS:548 - readpipe [git, --version],/usr/bin
>2019-04-01 11:38:55 DEBUG FS:571 - readpipe may return 'git version 2.16.1.2.g9d582f143'
>2019-04-01 11:38:55 DEBUG FS:572 - remaining output:
>
>2019-04-01 11:38:55 DEBUG FS:548 - readpipe [git, config, --system, --edit],/usr/bin
>2019-04-01 11:38:55 DEBUG FS:571 - readpipe may return '/etc/gitconfig'
>2019-04-01 11:38:55 DEBUG FS:572 - remaining output:

This is the only output I get (I copied it from https://bugs.eclipse.org/bugs/attachment.cgi?id=278096, but it's essentially the only output that I get). After that nothing happens. I waited several minutes.
Comment 1 Matthias Sohn CLA 2019-06-28 05:25:39 EDT
Can you create a thread dump when it hangs and attach that here ?

Find the process id using
$ jps
and use
$ jstack <pid>
to create a thread dump
Comment 2 torsten piotraschke CLA 2019-06-28 09:09:52 EDT
Here is my output:

 ./jgit54.sh clone ssh://git@git.our.git:my-project/oomph.git --ssh apache
Picked up JAVA_TOOL_OPTIONS: -Dsun.java2d.xrender=false
Picked up _JAVA_OPTIONS: -Dlog4j.configuration=file:///home/torsten/Desktop/log.debug
Cloning into 'oomph'...
2019-06-28 15:02:04 DEBUG FS:644 - readpipe [git, --version],/usr/bin
2019-06-28 15:02:04 DEBUG FS:667 - readpipe may return 'git version 2.20.1'
2019-06-28 15:02:04 DEBUG FS:668 - remaining output:

2019-06-28 15:02:04 DEBUG FS:644 - readpipe [git, config, --system, --edit],/usr/bin
2019-06-28 15:02:04 DEBUG FS:667 - readpipe may return '/etc/gitconfig'
2019-06-28 15:02:04 DEBUG FS:668 - remaining output:

And please see the attached jstack log.
Comment 3 torsten piotraschke CLA 2019-06-28 09:10:49 EDT
Created attachment 279117 [details]
desired jstack log
Comment 4 Thomas Wolf CLA 2019-06-28 09:35:19 EDT
(In reply to torsten piotraschke from comment #3)
> Created attachment 279117 [details]
> desired jstack log

This is a jstack log of an idle Eclipse. Please atatch a jstack log of the ./jgit54.sh command when it hangs.

(I assume that "After that nothing happens. I waited several minutes." means ./jgit54.sh hangs; you don't return to the comamnd prompt, and you waited several minutes before killing the process.)
Comment 5 Thomas Wolf CLA 2019-06-28 10:45:37 EDT
BTW, if it's really hanging, this might be a duplicate of bug 545860.
Comment 6 Thomas Wolf CLA 2019-06-28 10:50:39 EDT
What kind of server are you trying to clone from? (Bitbucket, Gitlab, Github, other (which one)?)

Do you have a way to capture network traffic between your machine and that server, including the actual payload bytes? If so, such a network trace during the clone might also be helpful.
Comment 7 torsten piotraschke CLA 2019-07-01 07:37:45 EDT
Created attachment 279144 [details]
JarLauncher Jstack Log

(In reply to Thomas Wolf from comment #4)
> (In reply to torsten piotraschke from comment #3)
> > Created attachment 279117 [details]
> > desired jstack log
> 
> This is a jstack log of an idle Eclipse. Please atatch a jstack log of the
> ./jgit54.sh command when it hangs.

Sorry about that. I hope this one is the correct one. The process is called JarLauncher and it contains jgit logs.

> (I assume that "After that nothing happens. I waited several minutes." means
> ./jgit54.sh hangs; you don't return to the comamnd prompt, and you waited
> several minutes before killing the process.)

Yes, that's what I meant.
Comment 8 torsten piotraschke CLA 2019-07-01 07:46:45 EDT
(In reply to Thomas Wolf from comment #6)
> What kind of server are you trying to clone from? (Bitbucket, Gitlab,
> Github, other (which one)?)

We are using Gitlab. Btw: Using plain git works of course and using jgit version .

> Do you have a way to capture network traffic between your machine and that
> server, including the actual payload bytes? If so, such a network trace
> during the clone might also be helpful.

I reckon I could use wireshark. I'm going to ask a coworker for help.
Comment 9 torsten piotraschke CLA 2019-07-01 07:47:58 EDT
(In reply to torsten piotraschke from comment #8)
> (In reply to Thomas Wolf from comment #6)
> > What kind of server are you trying to clone from? (Bitbucket, Gitlab,
> > Github, other (which one)?)
> 
> We are using Gitlab. Btw: Using plain git works of course and using jgit
> version .

5.3.0.201903130848-r works as well.
Comment 10 torsten piotraschke CLA 2019-07-01 08:06:39 EDT
(In reply to torsten piotraschke from comment #8)
> (In reply to Thomas Wolf from comment #6)
> > What kind of server are you trying to clone from? (Bitbucket, Gitlab,
> > Github, other (which one)?)
> 
> We are using Gitlab. Btw: Using plain git works of course and using jgit
> version .
> 
> > Do you have a way to capture network traffic between your machine and that
> > server, including the actual payload bytes? If so, such a network trace
> > during the clone might also be helpful.
> 
> I reckon I could use wireshark. I'm going to ask a coworker for help.

I just talked with one of my coworkers and we unfortunately don't have any way to capture the network traffic.
Comment 11 Thomas Wolf CLA 2019-07-01 08:21:30 EDT
Thanks; a network capture won't be necessary. This is the same as bug 548598, and is being worked on. Again FileStoreAttributeCache.getFsTimestampResolution(9 which never leaves the loop.

*** This bug has been marked as a duplicate of bug 548598 ***