| Summary: | [transport] FileReader fails to stop CancelHandler Job | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Eckart Langhuth <eckart.langhuth> | ||||
| Component: | p2 | Assignee: | P2 Inbox <equinox.p2-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | gsnerf, henrik.lindberg, pascal | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Eckart Langhuth
Please try again with 3.7 and reopen if the issue still exists. Thx Created attachment 198734 [details]
FileReader test project
Attached simple JUnit Plug-in Test project.
Running with Eclipse 3.7 it generates contained myLocalOutput.txt.
None of the workers
Thread[Worker-22,5,main]
java.lang.Thread.sleep(Native Method)
org.eclipse.equinox.internal.p2.transport.ecf.FileReader$CancelHandler.run(FileReader.java:111)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
will ever finish.
See attached test project. org.eclipse.equinox.internal.p2.transport.ecf.FileReader will leak a worker thread in case an UnknownHostException occurs. Henrik, could you please take a look? (In reply to comment #4) > Henrik, could you please take a look? I am not setup to work on this. I did take a look at the code. And it seems that if these lines: // kill the cancelJob, if there is one if (cancelJob != null) { cancelJob.cancel(); cancelJob = null; } were to also be inserted into this method: public synchronized void handleTransferEvent(IFileTransferEvent event) } else if (event instanceof IIncomingFileTransferReceiveDoneEvent) { if (closeStreamWhenFinished) hardClose(theOutputStream); just before the if(closeStreamWhenFinished) check that would probably solve the problem as at that point (done), the cancel job has played out its role anyway. For a normal run the cancel job would have been cancelled by one of the other callbacks. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug can still be seen. We currently experience it in several places, one of which is really annoying: When building an eclipse plugin via maven the hanging worker threads will cause the spawning maven process to run indefinitely. This means CI jobs on a machine without direct access to the internet and no configured proxy settings (which is intentionally left out) will never finish. The behavior can also be seen in other eclipse projects accessing update sites like the oomph setup mechanisms. At least there the stale processes are killed as soon as the tool is of the opinion that it's finished. As a hint for other people having problems with this: The tycho maven plugin is trying to call a mirror list from the official eclipse repositories, even if you have configured specific sources for artifacts in the respective plugin project. If the host for that call cannot be resolved it will result in the stale threads described in this issue which will hang the maven process indefinitely. To get rid of this configure your environment to not ask for mirror lists as described here: https://wiki.eclipse.org/Tycho/FAQ#How_do_I_disable_P2_mirrors.3F Even though the above works around the issue, this bug should still be fixed. |