Community
Participate
Working Groups
Build ID: Version: 3.3.1.1 M20071023-1652 Steps To Reproduce: 1. Download eclipse-SDK-3.3.1.1-linux-gtk.tar.gz 2. tar xvfz it 3. java --version writes 'java version "1.5.0_14"' etc 4. export ECLIPSE_HOME=(here) 5. ./eclipse 6. Follow the instructions to make a Java 'Hello World' project. 7. Choose 'Run -> Profile' - get dialogue box: Warning One of the selected launch delegates has failed. Reason: OK Details 8. Press 'Details' to get the 'More information' below. More information: Dialogue box contains (pity that this text can't be copied in one go): java.lang.NullPointerException at org.eclipse.tptp.platform.iac.administrator.internal.startstop.AutoStartStop.hasProcessTerminated(AutoStartStop.java:275) at org.eclipse.tptp.platform.iac.administrator.internal.startstop.AutoStartStop.startIAC(AutoStartStop.java:113) at org.eclipse.tptp.platform.execution.client.core.internal.NodeImpl.connect(NodeImpl.java:117) at org.eclipse.tptp.platform.execution.util.internal.AgentControllerPool$1$EstablishConnection.run(AgentControllerPool.java:164) at java.lang.Thread.run(Thread.java:595)
I've also tried Eclipse 3.4M5, which apparently has TPTP 4.5, and exactly the same thing happens. John A. Murdie
I should have mentioned as step 5.5 of 'Steps to reproduce' : Install updates, then install plugins including TPTP.* 4.4.1-*. John A. Murdie
Hi John, It's very likely that your problem is caused by the racing condition between Eclipse workbench and IAC (ie IAC doesn't get started quick enough). Can you try this: 1. In your Eclipse workbench, make sure IAC is enabled via Window -> Preferences -> Agent Controller. 2. In Java perspective, click the Profiling button on the tool bar and select Profile Configuration.... 3. In the dialog box, create a new External Java Application 4. Under Host tab, click on 'Test Connection'. Try it couple of times to see if you get 'Connection Successful' message. 5. If failed, check if 'ACServer' is running on your local machine.
Created attachment 91442 [details] Patch to handle when Java runtime fails to launch IAC The patch doesn't fix the original problem but it handle the scenario when IAC failed to get launched. Instead of logging NullPointException it logs more detail info to allow us to diagnose the problem.
Jonathan, do you mind reviewing the patch. Thanks.
Patch is good.
> --- Comment #3 from Bing Xu <xubing@ca.ibm.com> 2008-03-03 10:30:05 -0500 --- > Hi John, > > It's very likely that your problem is caused by the racing condition between > Eclipse workbench and IAC (ie IAC doesn't get started quick enough). > > Can you try this: > > 1. In your Eclipse workbench, make sure IAC is enabled via Window -> > Preferences -> Agent Controller. -> Integrated Agent Controller. Yes, it is enabled. > 2. In Java perspective, click the Profiling button on the tool bar and select > Profile Configuration.... Profile As -> Open Profile Dialog. > 3. In the dialog box, create a new External Java Application External Java Application -> New Configuration -> Host. > 4. Under Host tab, click on 'Test Connection'. Try it couple of times to see > if you get 'Connection Successful' message. No result or error message - in fact, no change. > 5. If failed, check if 'ACServer' is running on your local machine. No, just the fgrep(1) I use to search for it. ; ps -ef | fgrep -i AcServer john 2440 4161 0 18:20 pts/3 00:00:00 fgrep -i AcServer ; I'll apply the patch, try again, and let you know what happens. John A. Murdie
Joanna, can you check in the patch. Thanks. John, unless you've downloaded TPTP source code, the patch doesn't work for you. The symptom you described could be caused by the failed attempt to launch the IAC process through Java runtime. What Linux platform are you running this? SUSE or RedHat? 32 or 64 bit? 'uname -a' command should tell you.
I'm using a 32-bit Slackware Linux 12.0 on a 64-bit processor. `uname -a` gives: Linux pc118 2.6.24.2 #2 SMP PREEMPT Mon Feb 11 10:23:42 GMT 2008 i686 AMD Athlon(tm) 64 Processor 3500+ AuthenticAMD GNU/Linux John A. Murdie
Patch applied to Head. Bug left open in case additional patch is needed to fix the original problem.
John, can you check what does the System.getProperty("os.arch") call return in your Java program.
$ cat > HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World! - I am running on an " + System.getProperty("os.arch")); } } ^D $ javac HelloWorld.java $ java HelloWorld Hello World! - I am running on an i386 $ This is using a specially-provided Java J2SDK 1.5.0_14, even though our Slackware Linux system has 1.6.0_02-b05 as the default. (Since I gather that current versions of Eclipse have not been qualified with 1.6.*, am I right?) John A. Murdie
John, can you do these: 1. cd to <eclipse install>/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200802050100/agent_controller/bin 2. Try to run the RAStart.sh and see if you get any errors. 3. If you get error saying that config file is missing then do step 4 - 6: 4. In <eclipse install>/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200802050100/agent_controller, do 'ln -s <eclipse install>/plugins plugins' 5. cd <eclipse install>/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200802050100/agent_controller/lib, do 'cp <eclipse install>/plugins/org.eclipse.tptp.platform.agentcontroller_4.2.101.v200802120100/config.jar .'. You may have different version of org.eclipse.tptp.platform.agentcontroller in your eclipse. 6. cd <eclipse install>/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200802050100/agent_controller/bin, run ./SetConfig.sh. 7. Try RAStart.sh again and us 'ps' command to see if ACServer is running.
Ok, but in my case (Eclipse IDE 3.3.1.1, M20071023-1652) it is (of course?) plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200709261752/agent_controller/bin Now I know where to look (ok, so I could have gone digging), I see that all these files are non-executable. So, commanding 'chmod a+x *' in this directory and then doing what you ask, I see: ; ./RAStart.sh Starting Agent Controller. ACServer: error while loading shared libraries: ../lib/libtptpUtils.so.4: file too short ACServer failed to start. ; which is odd, as I got no warnings of truncation at install time. The 3.4M5 install I made similarly omits execute permissions from the executables, but does not have the allegedly truncated library. I see: ; ./RAStart.sh Starting Agent Controller. ACServer started successfully. ; I shall download again and reinstall, taking care to check the size (and checksum, if available) of the downloaded file. John A. Murdie
John, did you get the NullPointException in Eclipse 3.4M5 too? If so then it seems odd because the Integrated Agent Controller (IAC)'s RAStart.sh works. How many JVM do you have installed? It's recommand to use JVM 1.5 in: 1. PATH 2. Eclipse Window Preference -> Java -> Installed JRE 3. Eclipse Window Preference -> Agent Controller If IAC still fails you, you can try to download and install a stand-alone Agent Controller from www.eclipse.org/tptp. You just need to download, unzip and run the setconfig.
>John, did you get the NullPointException in Eclipse 3.4M5 too? If so then it >seems odd because the Integrated Agent Controller (IAC)'s RAStart.sh works. Ah, no. I've just tried 3.4M5 again, with JDK 1.5, taking care to start with an empty workspace each time (perhaps this is the mistake I made when testing 3.4M5 last time?) and I *can* do execution profiling (not tried more than this yet) without the executables in plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.0.v200706020100/agent_controller/bin being marked executable. (Using JDK 1.6 fails with the message "Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file", but that's fair enough for now.) It's odd, though; I have downloaded 3.3.1.1 twice, with plenty of free disc space, and each time I get the ACServer: error while loading shared libraries: ../lib/libtptpUtils.so.4: file too short message when trying to profile. Is this a known bug in 3.3.1.1? >How many JVM do you have installed? We have 1.6 is in people's default PATH, but we have the last version of each of 1.5 and 1.4 also - not in the default PATH - whose executables directories are prefixed as required to a user's PATH by old software which still requires them >It's recommand to use JVM 1.5 in: Checking my install of 3.1.1.1 which was done with JDK 1.5 executables in the path, having JDK 1.5 executables in the path when I start it: >1. PATH $ which java /usr/local/j2sdk-1.5.0_14/bin/java $ >2. Eclipse Window Preference -> Java -> Installed JRE /usr/local/j2sdk-1.5.0_14 >3. Eclipse Window Preference -> Agent Controller /usr/local/j2sdk-1.5.0_14/jre/bin/java >If IAC still fails you, you can try to download and install a stand-alone Agent >Controller from www.eclipse.org/tptp. You just need to download, unzip and >run the setconfig. (No need for this.) John A. Murdie
(In reply to comment #16) > Ah, no. I've just tried 3.4M5 again, with JDK 1.5, taking care to start with an > empty workspace each time (perhaps this is the mistake I made when testing > 3.4M5 last time?) and I *can* do execution profiling .... That's good news. > It's odd, though; I have downloaded 3.3.1.1 twice, with plenty of free disc > space, and each time I get the > ACServer: error while loading shared libraries: ../lib/libtptpUtils.so.4: file > too short > message when trying to profile. Is this a known bug in 3.3.1.1? So did you download Eclipse 3.3.1.1 and then install TPTP through update manager or you download TPTP separately? Can you list the files you downloaded and we would try it to see if there is an error with the update manager.
Ok, noticing that Eclipse SDK for Linux 3.3.2 has become available since I raised this bug report, I decided to try that - the first time I have done so. 1. Download eclipse-SDK-3.3.2-linux-gtk.tar.gz 2. md5sum(1) it: a59b9e8911e59da4cf7a5c5fc6a178e4 eclipse-SDK-3.3.2-linux-gtk.tar.gz which is the correct value as shown at: http://download.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/checksum/eclipse-SDK-3.3.2-linux-gtk.tar.gz.md5 3. tar xvfz eclipse-SDK-3.3.2-linux-gtk.tar.gz As ordinary user, with write access to where I have unpacked the tgz file. 4. Prefix PATH with /usr/local/j2sdk-1.5.0_14/bin; check that the command 'which java' gives /usr/local/j2sdk-1.5.0_14/bin/java. 5. ./eclipse 6. Help -> Software Updates -> Find and Install -> Search for updates. Choose UK http mirror. No updates found. 7. Help -> Software Updates -> Find and Install -> Search for new features. Choose Europa Discovery Site only. Finish. UK httpd mirror (with automatically select mirrors checked). Choose everything. (It doesn't take that long, and I have plenty of disc space!) Accept the licences. Take all optional additions. Finish. 8. Restart as requested. Build is version 3.3.2, M20080221-1800. JDK is shown as 1.5.0_14 everywhere. 9. Accept creation of new workspace. Create Java HelloWorld program as before. 10. It runs ok. Profile it, choosing Execution time profile. I get the dialogue box: Warning One of the selected launch delegates has failed Ok Details Pressing details gives org.eclipse.core.runtime.CoreException Agent Controller is unavailable under port 10002. Make sure that the service is started and the port number is correct under preferences. java.lang.NullPointerException at org.eclipse.tptp.platform.iac.administrator.internal.startstop.AutoStartStop.hasProcessTerminated(AutoStartStop.java:275) at org.eclipse.tptp.platform.iac.administrator.internal.startstop.AutoStartStop.startIAC(AutoStartStop.java:113) at org.eclipse.tptp.platform.execution.client.core.internal.NodeImpl.connect(NodeImpl.java:117) at org.eclipse.tptp.platform.execution.util.internal.AgentControllerPool$1$EstablishConnection.run(AgentControllerPool.java:164) at java.lang.Thread.run(Thread.java:595) " 11. cd-ing to plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200709261752 commanding 'chmod a+x *' and then './RAStart.sh' gives the familiar: Starting Agent Controller. ACServer: error while loading shared libraries: ../lib/libtptpUtils.so.4: file too short ACServer failed to start. 12. Help -> Software Updates -> Manage Configuration lists shows the list of installed components which I will attach as two PNG screenshots, top.png and bot.png (plus one line which wouldn't fit in those shots, the line being "XML Schema Infoset Model (XSD) Extender SDK 2.3.1.v200709252135"). It would be good if this pane had 'Select All' and 'Copy' commands so that I could have copied and pasted the list here without having to resort to screenshots. As I've said, there is no such problem in 3.4M5, so we're looking forward to Eclipse SK 3.4. John A. Murdie
Created attachment 91749 [details] Top of screenshot of installed plugins
Created attachment 91750 [details] Bottom of screenshot of installed plugins
John, I think what you experienced is related to 214788 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=214788). Can you confirm? If so I'd like to close this defect.
Yes, it looks very much like that problem - though the actual 'corrupt' file is not the same as one reported in bug 214788. I should have looked in plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200709261752/agent_controller/lib to see what actually was wrong with libtptpUtils.so.4! Now that I do look in that directory, using: $ file * | fgrep ASCII | wc -l I see that 48 of the files in that directory are broken in this way. So, yes, please mark my bug report as (effectively) a duplicate of bug 214788 and close. Many thanks, John A. Murdie
*** This bug has been marked as a duplicate of bug 214788 ***
*** Bug 197117 has been marked as a duplicate of this bug. ***
*** Bug 218118 has been marked as a duplicate of this bug. ***
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.