United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7148499 Stack size in tools/launcher/Settings.java needs to be increased
7148499 : Stack size in tools/launcher/Settings.java needs to be increased

Details
Type:
Bug
Submit Date:
2012-02-24
Status:
Closed
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2012-04-21
Component:
tools
OS:
os_x,generic
Sub-Component:
launcher
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u4,8
Fixed Versions:
8

Related Reports
Backport:
Duplicate:
Relates:
Relates:

Sub Tasks

Description
jdk8/tl has picked up a new test failure with hs23-b15 or b16. Looks like the minimum stack size has increased.


#Test Results (version 2)
#Thu Feb 23 17:54:10 PST 2012
#checksum:1102c6cb7068a33c
#-----testdescription-----
$file=/export/home/aurora/sandbox/testbase/test/tools/launcher/Settings.java
$root=/export/home/aurora/sandbox/testbase/test
author=ksrini
keywords=bug6994753 bug7123582
run=USER_SPECIFIED compile -XDignore.symbol.file Settings.java\nUSER_SPECIFIED main Settings\n
source=Settings.java
title=tests -XshowSettings options

#-----environment-----

#-----testresult-----
description=file\:/export/home/aurora/sandbox/testbase/test/tools/launcher/Settings.java
elapsed=385 0\:00\:00.385
end=Thu Feb 23 17\:54\:10 PST 2012
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.lang.RuntimeException\: VM settings\: not found
hostname=sfx2100-04
javatestOS=Linux 2.6.18-194.11.1.0.1.el5 (amd64)
javatestVersion=4.4
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages compile build main
start=Thu Feb 23 17\:54\:10 PST 2012
test=tools/launcher/Settings.java
user.name=dtftest
work=/export/home/aurora/sandbox/gresults/testoutput/jdk_tools2/JTwork/tools/launcher

#section:script_messages
----------messages:(4/226)----------
JDK under test: (/export/home/aurora/sandbox/jdk)
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-langtools-nightly-h176-20120223-b27-b00)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b16, mixed mode)

#section:compile
----------messages:(3/220)----------
command: compile -XDignore.symbol.file /export/home/aurora/sandbox/testbase/test/tools/launcher/Settings.java
reason: User specified action: run compile -XDignore.symbol.file Settings.java 
elapsed time (seconds): 0.061
result: Passed. Compilation successful

#section:build
----------messages:(3/91)----------
command: build Settings
reason: Named class compiled on demand
elapsed time (seconds): 0.0
result: Passed. All files up to date

#section:main
----------messages:(3/103)----------
command: main Settings
reason: User specified action: run main Settings 
elapsed time (seconds): 0.322
----------System.out:(19/1445)----------
Executed command: /export/home/aurora/sandbox/jdk/bin/java -Xms64m -Xmx512m -Xss128k -XshowSettings -jar /export/home/aurora/sandbox/gresults/testoutput/jdk_tools2/JTwork/scratch/test.jar 
  Error: string <VM settings:> not found
++++Begin Test Info++++
++++Test Environment++++
HOME=/export/home/aurora/
XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
CLASSPATH=/export/home/aurora/sandbox/jtreg/lib/javatest.jar:/export/home/aurora/sandbox/jtreg/lib/jtreg.jar:/export/home/aurora/sandbox/jdk/lib/tools.jar
PATH=/bin:/usr/bin
NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat
DISPLAY=jsn-sb2500-5.us.oracle.com:0
LANG=en_US.UTF-8
++++Test Output++++
  
  The stack size specified is too small, Specify at least 160k
  Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit.
++++Test Stack Trace++++
java.lang.Throwable: current stack of the testTestHelper.doExec(TestHelper.java:344)TestHelper.doExec(TestHelper.java:314)Settings.runTestOptionDefault(Settings.java:77)Settings.main(Settings.java:146)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:474)com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:690)java.lang.Thread.run(Thread.java:722)++++End of Test Info++++

----------System.err:(15/752)----------
java.lang.RuntimeException: VM settings: not found
	at Settings.checkContains(Settings.java:54)
	at Settings.containsAllOptions(Settings.java:70)
	at Settings.runTestOptionDefault(Settings.java:79)
	at Settings.main(Settings.java:146)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:474)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:690)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: VM settings: not found


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: VM settings: not found

                                    

Comments
SUGGESTED FIX

--- a/test/tools/launcher/Settings.java
+++ b/test/tools/launcher/Settings.java
@@ -75,14 +75,14 @@
     static void runTestOptionDefault() throws IOException {
         TestHelper.TestResult tr = null;
         tr = TestHelper.doExec(TestHelper.javaCmd, "-Xms64m", "-Xmx512m",
-                "-Xss128k", "-XshowSettings", "-jar", testJar.getAbsolutePath());
+                "-Xss256k", "-XshowSettings", "-jar", testJar.getAbsolutePath());
         containsAllOptions(tr);
         if (!tr.isOK()) {
             System.out.println(tr.status);
             throw new RuntimeException("test fails");
         }
         tr = TestHelper.doExec(TestHelper.javaCmd, "-Xms65536k", "-Xmx712m",
-                "-Xss122880", "-XshowSettings", "-jar", testJar.getAbsolutePath());
+                "-Xss256000", "-XshowSettings", "-jar", testJar.getAbsolutePath());
         containsAllOptions(tr);
         if (!tr.isOK()) {
             System.out.println(tr.status);
                                     
2012-02-28
EVALUATION

This is a test failure, the launcher is fine, please see suggested fix,
the stack size needs to be increased as the requirements have gone up.
The reason the stack size is used to ensure the parsing, scaling is right
when displayed via -XshowSettings.
                                     
2012-02-28



Hardware and Software, Engineered to Work Together