Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 243784 - Profiling launch configuration wizard hangs retrieving monitors, NPE
Summary: Profiling launch configuration wizard hangs retrieving monitors, NPE
Status: CLOSED DUPLICATE of bug 243213
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 blocker (vote)
Target Milestone: ---   Edit
Assignee: Bing Xu CLA
QA Contact:
URL:
Whiteboard: closed471
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-11 12:41 EDT by Aubrey Barnard CLA
Modified: 2016-05-05 11:02 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aubrey Barnard CLA 2008-08-11 12:41:47 EDT
Steps to reproduce:
1. Run the following script (or similar) to make a new TPTP All In One installation:
#!/bin/bash

# Script to run a clean TPTP

base_dir=/scratch/barnard/tptpTest/allInOne
tptp=~/downloads/tptp.runtime.allInOne.linux.gtk.x86-TPTP-4.5.1-200808090100.zip
java=/scratch/barnard/opt/jdk1.6.0_06-i586/bin/java

# Remove any existing installation
if [[ -e $base_dir ]]
then
    rm -Rf $base_dir
fi

# Create the install/working directory and extract TPTP
mkdir $base_dir
unzip -q -d $base_dir $tptp

# Run Eclipse
$base_dir/eclipse/eclipse -vm $java -data $base_dir/workspace

2. Once Eclipse starts, close the Welcome perspective and create a new Java project.
3. In the Java project create a class with a main, e.g. HelloWorld or equivalent.
4. In the package explorer view, right click on the application, and in the context menu select "Profile As" -> "Java Application".
5. The wizard for defining the profiling launch configuration starts, but hangs with the Monitor tab displaying "Pending...". The Eclipse progress notification area shows the string "Fetching children o...ector: (0%)".
6. After many seconds (minutes?), the following stack trace goes to the terminal:
Exception in thread "org.eclipse.hyades.execution.core.task.ReusableThread@13b8cfd" java.lang.NullPointerException
        at org.eclipse.hyades.execution.local.util.AgentControllerDescriptor.versionIsAtLeast(AgentControllerDescriptor.java:67)
        at org.eclipse.hyades.execution.local.util.AgentControllerDescriptor.isVersionAtLeast(AgentControllerDescriptor.java:194)
        at org.eclipse.hyades.execution.local.file.FileManagerFactory$3.run(FileManagerFactory.java:413)
        at org.eclipse.hyades.execution.core.task.ReusableThread.run(ReusableThread.java:131)
        at java.lang.Thread.run(Thread.java:619)
7. This exception repeats periodically (every 15-30 seconds?) if Eclipse is left to sit.
8. Eclipse itself is not hung as the wizard can be closed and Eclipse exited.

Environment:
Red Hat Enterprise Linux (RHEL) 5 x86-64
Sun's JDK 1.6.0-06 i586
TPTP All In One 4.5.1-200808090100

I am glad to provide additional information as needed.
Comment 1 Eugene Chan CLA 2008-08-11 13:02:46 EDT
This looks like a dup of bug 243213.
Comment 2 Aubrey Barnard CLA 2008-08-11 13:16:03 EDT
Sorry about the duplicate. My search criteria must have been too specific. What build will the fix for bug 243213 be in?
Comment 3 jkubasta CLA 2008-08-11 13:21:34 EDT
TPTP-4.5.1-200808080100
Comment 4 jkubasta CLA 2008-08-11 13:22:22 EDT
looks like you are on a more recent version....
Comment 5 Aubrey Barnard CLA 2008-08-11 14:32:36 EDT
Apparently, the 20080809 build doesn't fix bug 243213 for me. Is that the correct conclusion?
Comment 6 Eugene Chan CLA 2008-08-11 14:49:14 EDT
It looks like you are using IAC on Linux which is a know bug 243431.
I applied the patch of bug 243431 and try your use case again using 08090100 build and it works okay. Could you verify that?
Comment 7 Eugene Chan CLA 2008-08-11 14:54:11 EDT
You can also try with Standalone AC without the patch required.
Comment 8 Aubrey Barnard CLA 2008-08-11 15:19:25 EDT
I don't observe any change using the patched server. (I assume it is supposed to overlay the ACServer in eclipse/dropins/eclipse/plugins/org.eclipse.tptp.platform.ac.../agent_controller/bin.) Unfortunately, I cannot run the stand-alone AC (which worked last time I tried it) seemingly because the system administrators broke an update. (I now have missing standard libraries!)
Comment 9 Bing Xu CLA 2008-08-11 15:33:50 EDT
Can you install your own version of stand-alone AC?   Download the Agent Controller runtime for Linux IA32, unzip, then run SetConfig.sh.  Profile Java program should work.  The only known issue is that IAC can't be started from workbench.

What do you get from 'uname -a' from your Linux?
Comment 10 Aubrey Barnard CLA 2008-08-11 16:02:11 EDT
I installed a stand-alone AC previously to get around the IAC not working, and things seemed OK at that time. However, the same AC install no longer runs, failing to start the network transport layer (!). That is why I think there was a problem with a system update. I'll talk to my system administrators and see if they have any ideas, but for the time being I can't run the AC, either 32-bit or 64-bit.

'uname -a': Linux panther 2.6.18-92.1.6.el5 #1 SMP Fri Jun 20 02:36:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Comment 11 Bing Xu CLA 2008-08-11 16:20:15 EDT
First, you can check if port 10002 is in use by using command 'netstat --all'.  Only one instance of AC can be running at one time.

Second, seems you are running on 64 bit Linux (please verify this with your system admin, you could be running a 32-bit Linux using 64-bit chipset).  Make sure you download the right version of AC and use right JVM.   The bad news is that the all-in-one is for Linux 32 only.  You need to download Eclipse, EMF, and TPTP separately for 64-bit Linux.
Comment 12 Aubrey Barnard CLA 2008-08-11 17:24:19 EDT
You were correct, there is some process already listening on 10002. However, it is owned by root, which seems a bit strange. It is also strange that all the connections are in a CLOSE_WAIT state, which means the server has not closed the sockets. I'm not sure what that all means with respect to the ACServer.

I have been careful about which versions (32-bit, 64-bit) of software I am running, so I doubt that is an issue, especially given that I was able to use the ACServer previously to successfully collect profiling data.

I am running a 64-bit Linux and have successfully run both 64-bit and 32-bit Eclipses with the appropriate JVMs. With the TPTP All-In-One release, I have now tried the TPTP in both 64-bit and 32-bit versions. This bug exists in both. (I thought I would report it against the All-In-One release because that is easier to set up rather than installing the TPTP through the Eclipse software updates.)
Comment 13 Aubrey Barnard CLA 2008-08-12 14:57:03 EDT
It turns out there was a process named 'tptpProcessController' sitting around listening on port 10002. Evidently, it "leaked" and was not cleaned up after some earlier attempt to run the TPTP last week. (I would be helpful if the IAC reported this problem when trying to start it.) What confused me was that 'netstat -ep' showed that root owned the sockets and wouldn't tell me the owning process. However, 'netstat -aep' showed the listening socked as well, which was owned by 'tptpProcessController' and by me.

With all that taken care of, I can say that profiling with the stand alone ACServer works for me. However, the IAC still doesn't work, displaying "IWAT0435E An error occurred when connecting to the host." in red on the Monitors tab of the profiling launch configuration dialog/wizard.

So, I guess the case is closed on this particular bug as the appropriate improvements are already on your to-do lists.
Comment 14 Bing Xu CLA 2008-08-13 11:48:37 EDT

*** This bug has been marked as a duplicate of bug 243213 ***
Comment 15 Kathy Chan CLA 2010-11-18 23:41:21 EST
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.