Bug 392594 - DNF in text.tests on Mac (1.7 VM crash on StackOverflowError with -XstartOnFirstThread)
Summary: DNF in text.tests on Mac (1.7 VM crash on StackOverflowError with -XstartOnFi...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.8.2   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2012-10-22 13:39 EDT by David Williams CLA
Modified: 2012-11-12 10:55 EST (History)
1 user (show)

See Also:


Attachments
crash log from N20121022-0010 (68.55 KB, text/x-apport)
2012-10-22 13:48 EDT, David Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2012-10-22 13:39:09 EDT
These DNFs started (I think) when we switched to new Java 7 version. 

As far as I can see (so far) it is from a "quick crash" as opposed to timing out after two hours. 

I'll attach a "crash log".
Comment 1 David Williams CLA 2012-10-22 13:48:25 EDT
Created attachment 222648 [details]
crash log from N20121022-0010

According to timestamp, I think this log corresponds to the N20121022-0010 build, but haven't checked if it really matches the time the test was trying to run. 

I was obtained "manually" from that Mac machine, from 

/Users/hudsonBuild/Library/Logs/DiagnosticReports


The main log reports
[junitreport] the file /Users/hudsonBuild/workspace/ep4-unit-mac64/workarea/N20121022-0010/eclipse-testing/test-eclipse/eclipse/org.eclipse.text.tests.EclipseTextTestSuite.xml is empty.
[junitreport] This can be caused by the test JVM exiting unexpectedly


There is a "log" for 

http://download.eclipse.org/eclipse/downloads/drops4/N20121022-0010/testresults/macosx.cocoa.x86_5.0/org.eclipse.text.tests.EclipseTextTestSuite.txt

but shorter on mac than other two platforms.
Comment 2 Dani Megert CLA 2012-10-23 03:58:56 EDT
Markus can you run the tests on our Mac with "1.7.0_10-ea-b09?

The .log doesn't tell me much. I see DNFs for search and jdt.text tests in previous builds where 1.6 was used.

David, I assume that the header of the test results page is wrong - it still says 1.6 for Mac OSX.
Comment 3 Markus Keller CLA 2012-10-23 07:17:40 EDT
org.eclipse.text.tests.FindReplaceDocumentAdapterTest#testRegexFindStackOverflow_fail() crashes the VM.

I can reproduce when running this test, but I couldn't reproduce outside of Eclipse so far.
Comment 4 David Williams CLA 2012-10-23 07:37:50 EDT
(In reply to comment #2)
> ...
> David, I assume that the header of the test results page is wrong - it still
> says 1.6 for Mac OSX.

Yes, its wrong. This appears to be simply hard coded in testResults.php.template to I changed it this morning to hard code "1.7".
Comment 5 Markus Keller CLA 2012-10-23 08:35:14 EDT
This is a bug in the VM when a StackOverflowError occurs and the VM was started with -XstartOnFirstThread.

But without -XstartOnFirstThread, SWT can't create a Display, so "headfull" JUnit Plug-in Tests won't run.

I'll disable the test on the Mac and file a bug for Oracle.


package stack;

/*
 * Launch on Mac OS X with Oracle JDK 1.7.0_09 or 1.7.0_10.
 * - Succeeds if launched without VM arguments.
 * - Crashes the VM if launched with -XstartOnFirstThread .
 * Eclipse bug: https://bugs.eclipse.org/392594
 */
public class Overflow {
	public static void main(String[] args) {
		try {
			recurse(0);
		} catch (StackOverflowError e) {
			System.out.println("success: caught StackOverflowError");
		}
	}

	private static void recurse(int i) {
		if (i % 10000 == 0)
			System.out.println("Overflow.recurse(" + i + ")");
		recurse(i + 1);
	}
}
Comment 7 Markus Keller CLA 2012-10-23 12:37:44 EDT
.
Comment 8 Dani Megert CLA 2012-10-24 02:49:00 EDT
Verified in N20121023-2000.
Comment 9 David Williams CLA 2012-10-24 09:12:15 EDT
(In reply to comment #5)
> ... and file a bug for Oracle.

Would be nice to have a cross-reference to that bug listed here? just out for the curious (like me) who are too lazy to go search for it.
Comment 10 Markus Keller CLA 2012-10-24 13:30:20 EDT
I filed a bug for Oracle, but I didn't get a bug link. Just an "internal review ID of 2366819". Maybe it will eventually show up as
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2366819 , but the bug number looks a bit low for that. Also, the Sun bugdatabase has been in read-only mode for quite a while now.

I'll post updates if I get any.
Comment 11 Dani Megert CLA 2012-11-12 04:15:24 EST
Cherry-picked the fix into 'R3_8_maintenance' with http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=19e93d9c606be22370bdd797f825b64440b066c8