Bug 17411 - [ExternalTools] Lots of output crashes tools not writing to console
Summary: [ExternalTools] Lots of output crashes tools not writing to console
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Ryan Cooper CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-05-23 13:19 EDT by Adam Schlegel CLA
Modified: 2002-09-18 13:58 EDT (History)
2 users (show)

See Also:


Attachments
Ant script to create lots of output (296 bytes, text/plain)
2002-05-23 13:20 EDT, Adam Schlegel CLA
no flags Details
First error dialog encountered (249.01 KB, image/bmp)
2002-05-23 13:56 EDT, Adam Schlegel CLA
no flags Details
Second error dialog encountered (200.07 KB, image/bmp)
2002-05-23 13:56 EDT, Adam Schlegel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Schlegel CLA 2002-05-23 13:19:40 EDT
If you create an external tool that creates a lot of output, and do not select 
the option to log output to the console, the tool will crash with the following 
error:
ExternalToolsAction.runAntProblem
Reason:
External tool runner internal error

When the same tool is run with the output logged to the console, it does not 
crash.

Due to bug 17381, only Ant scripts can display this behaviour.
Comment 1 Adam Schlegel CLA 2002-05-23 13:20:29 EDT
Created attachment 1007 [details]
Ant script to create lots of output
Comment 2 Adam Schlegel CLA 2002-05-23 13:52:51 EDT
I got different behaviour when running a fresh Eclipse. Now, the script runs 
longer (a couple of minutes), but crashes the JVM. No significant data is 
written to the workspace log, and no java core file was created. I have 
attached screenshots of the dialogs below.
Comment 3 Adam Schlegel CLA 2002-05-23 13:56:29 EDT
Created attachment 1011 [details]
First error dialog encountered
Comment 4 Adam Schlegel CLA 2002-05-23 13:56:47 EDT
Created attachment 1012 [details]
Second error dialog encountered
Comment 5 Nick Edgar CLA 2002-05-27 23:30:20 EDT
Need to determine why this crashes and where.
What happens to the output when it's not being logged?
Comment 6 Mike Wilson CLA 2002-05-28 09:59:45 EDT
Sounds like a pipe fills up somewhere and their code doesn't expect it to. 
Could explicitely send the output to /dev/null (or equivalent) if output is not 
being logged and see if this fixes the problem.
Comment 7 Rodrigo Peretti CLA 2002-05-30 23:50:19 EDT
I've got a different error in a self hosting workspace. A dialog saying 
internal error shows up and here is what I get in the debug console besides 
the normal script output:

  [antcall] java.lang.StackOverflowError
  [antcall] 	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run
(InternalAntRunner.java:277)
  [antcall] 	at java.lang.reflect.Method.invoke(Native Method)
  [antcall] 	at org.eclipse.ant.core.AntRunner.run(AntRunner.java:155)
  [antcall] 	at 
org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute
(AntFileRunner.java:51)
  [antcall] 	at 
org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeRunner
(DefaultRunnerContext.java:214)
  [antcall] 	at 
org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run
(DefaultRunnerContext.java:264)
  [antcall] 	at 
org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run
(AntLaunchWizard.java:116)
  [antcall] 	at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)

BUILD FAILED

java.lang.StackOverflowError
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run
(InternalAntRunner.java:277)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.ant.core.AntRunner.run(AntRunner.java:155)
	at org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute
(AntFileRunner.java:51)
	at 
org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeRunner
(DefaultRunnerContext.java:214)
	at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run
(DefaultRunnerContext.java:264)
	at org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run
(AntLaunchWizard.java:116)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)
Comment 8 Ryan Cooper CLA 2002-05-31 10:55:11 EDT
The stack overflow occurs even when showing output to the Log Console. It also 
occurs when not writing to the Log Console but when using a NullBuilder.
Comment 9 Mike Wilson CLA 2002-05-31 11:36:05 EDT
I'm going to ignore this until someone points out the connection to SWT.
Comment 10 Nick Edgar CLA 2002-06-01 00:55:17 EDT
Change released.  Please verify.
Comment 11 Nick Edgar CLA 2002-06-01 00:56:47 EDT
McQ, I cc'ed you on this because this was causing a VM crash.
We have not been able to reproduce the VM crash so far.
Comment 12 Ryan Cooper CLA 2002-06-03 10:54:19 EDT
Build: 20020602 (F@ candidate 2)

The overflow seems to be caused by the recursive nature of the test script, not 
the amount of output generated by the script. If the tool shows output to the 
console, this is pretty obvious. The stack trace shown to the console when the 
stack overflow occurs contains only 6 distinct method calls that repeat until 
the stack overflows:

at org.apache.tools.ant.Task.perform(Task.java:217)
at org.apache.tools.ant.Target.execute(Target.java:184)
at org.apache.tools.ant.Target.performTasks(Target.java:202)
at org.apache.tools.ant.Project.executeTarget(Project.java:601)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:120)

Each target in the Ant file we are using to test calls the other target, so the 
stack gets continously larger until the overflow occurs.

The VM crash is still occuring on Adam's machine. It is happening whether or 
not the output goes to the Log Console. This is really making me think that 
this isn't an External Tools issue. It seems like for some reason Adam's 
machine is not handling the stack overflow correctly.
Comment 13 Nick Edgar CLA 2002-06-03 13:01:59 EDT
Adam, which VM were you using?
Comment 14 Adam Schlegel CLA 2002-06-03 13:39:55 EDT
IBM Windows 32 JDK 1.3.1 SR-1 (30 April 2002)
Comment 15 Ryan Cooper CLA 2002-06-04 17:27:54 EDT
Build: 20020602 (F2)

I have not been able to reproduce this problem on my machine. Closing PR.