Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369278 - RPM proposal list thread may not have exited when asked to return value
Summary: RPM proposal list thread may not have exited when asked to return value
Status: CLOSED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: RPM (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.0   Edit
Assignee: Alexander Kurtakov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 366816 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-20 14:27 EST by Severin Gehwolf CLA
Modified: 2012-03-12 16:16 EDT (History)
3 users (show)

See Also:
sgehwolf: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Severin Gehwolf CLA 2012-01-20 14:27:14 EST
I've seen this a couple of times today:

!ENTRY org.eclipse.core.jobs 4 2 2012-01-20 14:08:20.251
!MESSAGE An internal error occurred during: "Update RPM packages proposal list".
!STACK 0
java.lang.IllegalThreadStateException: process hasn't exited
	at java.lang.UNIXProcess.exitValue(UNIXProcess.java:188)
	at org.eclipse.linuxtools.rpm.core.utils.BufferedProcessInputStream.getExitValue(BufferedProcessInputStream.java:44)
	at org.eclipse.linuxtools.rpm.ui.editor.RpmPackageBuildProposalsJob.retrievePackageList(RpmPackageBuildProposalsJob.java:176)
	at org.eclipse.linuxtools.rpm.ui.editor.RpmPackageBuildProposalsJob.run(RpmPackageBuildProposalsJob.java:60)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

In a nutshell, the code doesn't check if the process has exited before it is asked to return a the return value of the underlying process. I'll submit a patch for review shortly. Thanks.
Comment 1 Severin Gehwolf CLA 2012-01-20 14:40:09 EST
Here is a proposed patch:

https://github.com/jerboaa/linuxtools/commit/4f2de0d9b5068116fb612be3af874d847843e0b6

Could you have a brief look? Thanks.
Comment 2 Severin Gehwolf CLA 2012-03-10 18:57:50 EST
*** Bug 366816 has been marked as a duplicate of this bug. ***
Comment 3 Alexander Kurtakov CLA 2012-03-12 07:39:44 EDT
Severin,
The patch looks good, please push it.
Comment 4 Severin Gehwolf CLA 2012-03-12 16:15:31 EDT
Pushed. Commit 5ef63e5c18275f22bfcfac7fddd70fd0567b5e5c.