Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326557 - IOException during fetch
Summary: IOException during fetch
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 12:11 EDT by Dmitry Neverov CLA
Modified: 2010-10-27 11:38 EDT (History)
2 users (show)

See Also:


Attachments
test to reproduce the problem (805 bytes, text/x-java)
2010-09-29 12:13 EDT, Dmitry Neverov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Neverov CLA 2010-09-29 12:11:26 EDT
Build Identifier: standalone jgit library

Sometimes fetch from local bare repository throws IOException:

org.eclipse.jgit.errors.TransportException: Write end dead
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:286)
	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:224)
	at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:210)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:145)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:880)
	at org.eclipse.jgit.api.FetchTest.test(FetchTest.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:109)
	at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:43)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: java.io.IOException: Write end dead
	at java.io.PipedInputStream.read(PipedInputStream.java:294)
	at java.io.PipedInputStream.read(PipedInputStream.java:361)
	at org.eclipse.jgit.util.IO.readFully(IO.java:175)
	at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:140)
	at org.eclipse.jgit.transport.SideBandInputStream.needDataPacket(SideBandInputStream.java:154)
	at org.eclipse.jgit.transport.SideBandInputStream.read(SideBandInputStream.java:136)
	at org.eclipse.jgit.transport.IndexPack.fill(IndexPack.java:933)
	at org.eclipse.jgit.transport.IndexPack.readPackHeader(IndexPack.java:754)
	at org.eclipse.jgit.transport.IndexPack.index(IndexPack.java:401)
	at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:647)
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:279)
	... 27 more

java.io.IOException: Pipe closed
	at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)
	at java.io.PipedInputStream.receive(PipedInputStream.java:210)
	at java.io.PipedOutputStream.write(PipedOutputStream.java:132)
	at org.eclipse.jgit.transport.SideBandOutputStream.writeBuffer(SideBandOutputStream.java:154)
	at org.eclipse.jgit.transport.SideBandOutputStream.flush(SideBandOutputStream.java:115)
	at org.eclipse.jgit.storage.pack.PackOutputStream.flush(PackOutputStream.java:135)
	at org.eclipse.jgit.storage.pack.PackWriter.writePack(PackWriter.java:503)
	at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:657)
	at org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:352)
	at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:313)
	at org.eclipse.jgit.transport.TransportLocal$InternalLocalFetchConnection$2.run(TransportLocal.java:211)


Reproducible: Sometimes

Steps to Reproduce:
Test is attached.
Comment 1 Dmitry Neverov CLA 2010-09-29 12:13:11 EDT
Created attachment 179865 [details]
test to reproduce the problem
Comment 2 Dmitry Neverov CLA 2010-09-29 12:14:13 EDT
I got this exception in git v.0.9.3 and in master using FetchCommand.
Comment 3 Dmitry Neverov CLA 2010-09-30 04:56:27 EDT
Possible solution can be reviewed here: http://egit.eclipse.org/r/1681
Comment 4 Shawn Pearce CLA 2010-10-27 11:38:55 EDT
Fixed by commit bdf535de4fad0ce37a226ff656b44cafb624b42c