Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360824 - commons tests hang when parsing discovery directory.xml
Summary: commons tests hang when parsing discovery directory.xml
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7   Edit
Assignee: Steffen Pingel CLA
QA Contact: Steffen Pingel CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 351100
  Show dependency tree
 
Reported: 2011-10-13 09:37 EDT by Steffen Pingel CLA
Modified: 2011-10-13 13:48 EDT (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (2.17 KB, application/octet-stream)
2011-10-13 09:48 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2011-10-13 09:37:09 EDT
For some reason commons tests hang when running on mylyn.org, e.g.: http://ci.mylyn.org/job/mylyn-commons-trigger/17/console. I can also reproduce that problem locally.

"main" prio=1 tid=0x09a2ed30 nid=0x7ea0 in Object.wait() [0xbfdea000..0xbfdec2a8]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x6414b1c0> (a java.io.PipedInputStream)
	at java.io.PipedInputStream.read(PipedInputStream.java:258)
	- locked <0x6414b1c0> (a java.io.PipedInputStream)
	at java.io.PipedInputStream.read(PipedInputStream.java:303)
	- locked <0x6414b1c0> (a java.io.PipedInputStream)
	at org.eclipse.equinox.internal.p2.transport.ecf.FileReader$1.read(FileReader.java:246)
	at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
	at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
	- locked <0x60b07000> (a java.io.InputStreamReader)
	at java.io.InputStreamReader.read(InputStreamReader.java:167)
	at java.io.BufferedReader.fill(BufferedReader.java:136)
	at java.io.BufferedReader.read1(BufferedReader.java:187)
	at java.io.BufferedReader.read(BufferedReader.java:261)
	- locked <0x60b07000> (a java.io.InputStreamReader)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1740)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1437)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:191)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at org.eclipse.mylyn.internal.discovery.core.model.DirectoryParser.parse(DirectoryParser.java:77)
	at org.eclipse.mylyn.internal.discovery.core.model.RemoteBundleDiscoveryStrategy$1.process(RemoteBundleDiscoveryStrategy.java:111)
	at org.eclipse.mylyn.internal.discovery.core.util.WebUtil.readResource(WebUtil.java:99)
	at org.eclipse.mylyn.internal.discovery.core.model.RemoteBundleDiscoveryStrategy.performDiscovery(RemoteBundleDiscoveryStrategy.java:107)
	at org.eclipse.mylyn.discovery.tests.core.RemoteBundleDiscoveryStrategyTest.testPerformDiscovery(RemoteBundleDiscoveryStrategyTest.java:45)
Comment 1 Steffen Pingel CLA 2011-10-13 09:46:47 EDT
This is the contents of the file:

pre. 
<?xml version="1.0" encoding="UTF-8" ?>
<directory xmlns="http://www.eclipse.org/mylyn/discovery/directory/">
	<entry url="http://www.eclipse.org/downloads/download.php?file=/mylyn/discovery/org.eclipse.mylyn.discovery-3.2.jar&amp;r=1&amp;protocol=http" permitCategories="true"/>
	<entry url="http://tasktop.com/downloads/discovery/com.tasktop.discovery.jar" permitCategories="true"/>
</directory>

David, do you have any idea what might be causing this?
Comment 2 Steffen Pingel CLA 2011-10-13 09:48:42 EDT
Created attachment 205123 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2011-10-13 10:48:09 EDT
Looks like this is a problem in org.eclipse.equinox.internal.p2.transport.ecf.FileReader.
Comment 4 Steffen Pingel CLA 2011-10-13 11:45:03 EDT
Exception happens in HttpHost which gets passed a proxy that has an empty null host. This is due to an empty "http_proxy" environment variable that is set in the parent pom.

Thread [main] (Suspended)	
	owns: HostConfiguration  (id=2028)	
	owns: RunnableLock  (id=1843)	
	ProxyHost(HttpHost).<init>(String, int, Protocol) line: 68	
	ProxyHost.<init>(String, int) line: 64	
	HostConfiguration.setProxy(String, int) line: 415	
	HttpClientRetrieveFileTransfer.setupProxy(Proxy) line: 1038	
	HttpClientRetrieveFileTransfer.setupProxies() line: 438	
	HttpClientRetrieveFileTransfer(AbstractRetrieveFileTransfer).sendRetrieveRequest(IFileID, IFileRangeSpecification, IFileTransferListener, Map) line: 888	
	HttpClientRetrieveFileTransfer(AbstractRetrieveFileTransfer).sendRetrieveRequest(IFileID, IFileTransferListener, Map) line: 576	
	MultiProtocolRetrieveAdapter.sendRetrieveRequest(IFileID, IFileTransferListener, Map) line: 106	
	FileReader.sendRetrieveRequest(URI, OutputStream, FileReader$DownloadRange, boolean, IProgressMonitor) line: 349	
	FileReader.read(URI, IProgressMonitor) line: 213	
	RepositoryTransport.stream(URI, IProgressMonitor) line: 146	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	P2TransportService.stream(URI, IProgressMonitor) line: 93	
	WebUtil.stream(URI, IProgressMonitor) line: 161	
	WebUtil.readResource(URI, WebUtil$TextContentProcessor, IProgressMonitor) line: 95	
	RemoteBundleDiscoveryStrategy.performDiscovery(IProgressMonitor) line: 107	
	RemoteBundleDiscoveryStrategyTest.testPerformDiscovery() line: 45	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	RemoteBundleDiscoveryStrategyTest(TestCase).runTest() line: 168	
	RemoteBundleDiscoveryStrategyTest(TestCase).runBare() line: 134	
	TestResult$1.protect() line: 110	
	TestResult.runProtected(Test, Protectable) line: 128	
	TestResult.run(TestCase) line: 113	
	RemoteBundleDiscoveryStrategyTest(TestCase).run(TestResult) line: 124	
	TestSuite.runTest(Test, TestResult) line: 243	
	TestSuite.run(TestResult) line: 238	
	TestSuite.runTest(Test, TestResult) line: 243	
	TestSuite.run(TestResult) line: 238	
	SuiteMethod(JUnit38ClassRunner).run(RunNotifier) line: 83	
	JUnit4TestSet.execute(ReporterManager, ClassLoader) line: 62	
	JUnit4DirectoryTestSuite(AbstractDirectoryTestSuite).executeTestSet(SurefireTestSet, ReporterManager, ClassLoader) line: 140	
	JUnit4DirectoryTestSuite(AbstractDirectoryTestSuite).execute(ReporterManager, ClassLoader) line: 127	
	Surefire.run(List, List, ClassLoader, ClassLoader, Boolean) line: 177	
	OsgiSurefireBooter.run(String[]) line: 72	
	AbstractUITestApplication$1.run() line: 35	
	RunnableLock.run() line: 35	
	UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 135	
	Display.runAsyncMessages(boolean) line: 3563	
	Display.readAndDispatch() line: 3212	
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2696	
	Workbench.runUI() line: 2660	
	Workbench.access$4(Workbench) line: 2494	
	Workbench$7.run() line: 674	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 667	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.start(IApplicationContext) line: 123	
	UITestApplication.runApplication(Object, String[]) line: 31	
	UITestApplication(AbstractUITestApplication).run(String[]) line: 114	
	UITestApplication.start(IApplicationContext) line: 37	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 344	
	EclipseStarter.run(String[], Runnable) line: 179	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	Main.invokeFramework(String[], URL[]) line: 622	
	Main.basicRun(String[]) line: 577	
	Main.run(String[]) line: 1410	
	Main.main(String[]) line: 1386
Comment 5 Steffen Pingel CLA 2011-10-13 12:24:11 EDT
Fixed by removing the explicit setting of the http_proxy environment variables in the parent pom.
Comment 6 David Green CLA 2011-10-13 13:48:10 EDT
(In reply to comment #1)
> David, do you have any idea what might be causing this?

Thanks for working this one out Steffen