| Summary: | A lot of jar files in project causes TPTP to timeout when launching profile | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | PDL PDL <patches> | ||||||
| Component: | TPTP | Assignee: | Torsten Stolpmann <stolpmann> | ||||||
| Status: | ASSIGNED --- | QA Contact: | Torsten Stolpmann <stolpmann> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | acunin, dordet.n, jgwest, patches | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
PDL PDL
I am suspecting that you are hitting an OS limitation for the maximum command line length here. AFAIK this would be 8191 characters for Windows 7 which would fit quite nicely with the example you gave here. Given the current overall TPTP architecture I see no feasible way to circumvent this. I simplified the original issue for bug reporting, but this bug was discovered with librairies stored in Maven repository. As you know, this kind of repository has very long path for each jars, so this bug will specially impact Maven Projects with lots of dependencies. I see your pain in this yet I really see no way what TPTP can do to help you. The command line limitation occurs when the profiled process is launched by the agent controller assembling all of the supplied jars into the class path argument of the java command line invocation. Exceeding the OS limit will truncate the command line at the limit location and will break the profiling process call thus leading to the time-out shown below. AFAIK this is not a bug and I see no way to circumvent this besides using an operation system allowing longer command lines (Linux). I tried to profile the same project on Linux Fedora, but profiling failed to start and AC reports broken pipes errors (see below).
When I remove all libraries from classpath, profiling is OK.
-----------------------------------
Starting Agent Controller.
ACServer started successfully.
[root@fedora15 bin]# java.net.SocketException: Relais brisé (pipe)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
at org.eclipse.tptp.platform.execution.client.core.internal.ConnectionImpl.sendMessage(ConnectionImpl.java:528)
at org.eclipse.tptp.platform.execution.client.core.internal.AgentController.sendCommand(AgentController.java:1497)
at org.eclipse.tptp.platform.execution.client.agent.internal.AgentImpl.sendCommand(AgentImpl.java:353)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.sendFilters(TIDelegateHelper.java:1465)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.sendFilters(TIDelegateHelper.java:1487)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:879)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:804)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.access$7(TIDelegateHelper.java:802)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper$2.processLaunched(TIDelegateHelper.java:633)
at org.eclipse.tptp.platform.execution.client.core.internal.ProcessImpl.launchAC(ProcessImpl.java:701)
at org.eclipse.tptp.platform.execution.client.core.internal.ProcessImpl.launch(ProcessImpl.java:130)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launchProcess(TIDelegateHelper.java:678)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launch(TIDelegateHelper.java:403)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIJavaLauncherDelegate.launch(TIJavaLauncherDelegate.java:37)
at org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUtility.delegateInit(LauncherUtility.java:1164)
at org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunchDelegate.run(PrimaryLaunchDelegate.java:195)
at java.lang.Thread.run(Thread.java:662)
java.net.SocketException: Socket is closed
at java.net.Socket.getOutputStream(Socket.java:828)
at org.eclipse.tptp.platform.execution.client.core.internal.ConnectionImpl.sendMessage(ConnectionImpl.java:522)
at org.eclipse.tptp.platform.execution.client.core.internal.AgentController.sendCommand(AgentController.java:1497)
at org.eclipse.tptp.platform.execution.client.agent.internal.AgentImpl.sendCommand(AgentImpl.java:353)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.sendOptions(TIDelegateHelper.java:1220)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:880)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:804)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.access$7(TIDelegateHelper.java:802)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper$2.processLaunched(TIDelegateHelper.java:633)
at org.eclipse.tptp.platform.execution.client.core.internal.ProcessImpl.launchAC(ProcessImpl.java:701)
at org.eclipse.tptp.platform.execution.client.core.internal.ProcessImpl.launch(ProcessImpl.java:130)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launchProcess(TIDelegateHelper.java:678)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launch(TIDelegateHelper.java:403)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIJavaLauncherDelegate.launch(TIJavaLauncherDelegate.java:37)
at org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUtility.delegateInit(LauncherUtility.java:1164)
at org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunchDelegate.run(PrimaryLaunchDelegate.java:195)
at java.lang.Thread.run(Thread.java:662)
java.net.SocketException: Socket is closed
at java.net.Socket.getOutputStream(Socket.java:828)
at org.eclipse.tptp.platform.execution.client.core.internal.ConnectionImpl.sendMessage(ConnectionImpl.java:522)
at org.eclipse.tptp.platform.execution.client.core.internal.AgentController.sendCommand(AgentController.java:1497)
at org.eclipse.tptp.platform.execution.client.agent.internal.AgentImpl.sendCommand(AgentImpl.java:353)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.configureDataProcessor(TIDelegateHelper.java:970)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:889)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.attachToAgent(TIDelegateHelper.java:804)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.access$7(TIDelegateHelper.java:802)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper$2.processLaunched(TIDelegateHelper.java:633)
at org.eclipse.tptp.platform.execution.client.core.internal.ProcessImpl.launchAC(ProcessImpl.java:701)
at org.eclipse.tptp.platform.execution.client.core.internal.ProcessImpl.launch(ProcessImpl.java:130)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launchProcess(TIDelegateHelper.java:678)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launch(TIDelegateHelper.java:403)
at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIJavaLauncherDelegate.launch(TIJavaLauncherDelegate.java:37)
at org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUtility.delegateInit(LauncherUtility.java:1164)
at org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunchDelegate.run(PrimaryLaunchDelegate.java:195)
at java.lang.Thread.run(Thread.java:662)
Created attachment 208918 [details]
ServiceLog in DEBUG
Created attachment 210574 [details]
Patch reallocating the buffer size if message is too big...
Here is a patch allowing to test the use case with success on linux 32 bits. The size of the buffer is realloc()'ed if necessary, but there should be a maximum size to prevent memory exhaustion.
What remains to be made now is to make this maximum buffer size configurable, unless there is a way in the upper layer to break the message into smaller parts...
Hi, What's the status of this patch? |