Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Jgit thread hang issue( java.lang.Thread.State: RUNNABLE due to )
Jgit thread hang issue [message #1761220] Tue, 09 May 2017 08:00 Go to next message
Narendra Kumar is currently offline Narendra KumarFriend
Messages: 1
Registered: May 2017
Junior Member
Hi
I am using jgit API to clone git http:xxxxxx project and my application is having multi threading and i found one issue one thread block

pool-1-thread-8" #54 prio=5 os_prio=0 tid=0x00007f45842b9800 nid=0x10608 runnable [0x00007f45410e0000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:170)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
- locked <0x00000007912934f0> (a java.io.BufferedInputStream)
at sun.net.www.http.ChunkedInputStream.fastRead(ChunkedInputStream.java:244)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:689)
- locked <0x0000000791293518> (a sun.net.www.http.ChunkedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3335)
at org.eclipse.jgit.util.io.UnionInputStream.read(UnionInputStream.java:145)
at org.eclipse.jgit.transport.SideBandInputStream.read(SideBandInputStream.java:139)
at org.eclipse.jgit.transport.PackParser.fill(PackParser.java:1173)
at org.eclipse.jgit.transport.PackParser$InflaterStream.read(PackParser.java:1706)
at java.io.InputStream.read(InputStream.java:101)
at org.eclipse.jgit.transport.PackParser.whole(PackParser.java:1019)
at org.eclipse.jgit.transport.PackParser.indexOneObject(PackParser.java:952)
at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:523)
at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:195)
at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:484)
at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:773)
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:370)
at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:758)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:308)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:298)
at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:245)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:161)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1179)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:202)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:135)
at com.huawei.ccm.sync.service.GitSyncservice.cloneGit(GitSyncservice.java:170)
at com.huawei.ccm.sync.service.CCMSyncService.onPerformSync(CCMSyncService.java:69)
at com.huawei.ccm.sync.manager.SyncFutureTask.run(SyncFutureTask.java:36)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Re: Jgit thread hang issue [message #1765370 is a reply to message #1761220] Thu, 08 June 2017 19:53 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 944
Registered: July 2009
Senior Member
This thread is RUNNABLE so it's not in a deadlock. It's currently trying to read from a socket apparently using http protocol.
Maybe you miss some proxy configuration ?
Re: Jgit thread hang issue [message #1765372 is a reply to message #1765370] Thu, 08 June 2017 19:54 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 944
Registered: July 2009
Senior Member
Always set a timeout when using any of the TransportCommands in order to prevent that your application waits indefinitely in such cases.
Previous Topic:Strategies for repairing a branch after a misguided rebase
Next Topic:GIT Team Provider Option not Showing up
Goto Forum:
  


Current Time: Tue Sep 26 03:58:14 GMT 2017

Powered by FUDForum. Page generated in 0.02899 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software