JDK-8235738 : [macos] tools/jpackage tests timeout on macOS
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: 14
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2019-12-11
  • Updated: 2024-04-09
  • Resolved: 2019-12-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14 JDK 15
14 b29Fixed 15Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The following test failed in the JDK14 CI:

tools/jpackage/macosx/NameWithSpaceTest.java

Here's a snippet from the log file:

Running [/usr/bin/hdiutil, attach, /var/folders/z1/tww9scd14fs1_p135p45rr0c000_dc/T/jdk.incubator.jpackage14772483475271715162/images/Name With Space-tmp.dmg, -verbose, -mountroot, /var/folders/z1/tww9scd14fs1_p135p45rr0c000_dc/T/jdk.incubator.jpackage14772483475271715162/images]
Timeout refired 1440 times
TRACE: Done. Exit code: 134
ERROR: Expected [0]. Actual [134]: Check command [/scratch/mesos/jib-master/install/jdk-14+27-1279/macosx-x64.jdk/jdk-14.jdk/Contents/Home/bin/jpackage --input ./test/input --dest ./test/output --name "Name With Space" --type dmg --main-jar hello.jar --main-class Hello --verbose](14) exited with 0 code
[  FAILED  ] NameWithSpaceTest.test; checks=3
[==========] 1 tests ran
[  PASSED  ] 0 tests
[  FAILED  ] 1 test, listed below
[  FAILED  ] NameWithSpaceTest.test; workDir=[./test]
1 FAILED TEST
----------System.err:(58/4223)----------
WARNING: Using incubator modules: jdk.incubator.jpackage
WARNING: Using incubator modules: jdk.incubator.jpackage
java.lang.AssertionError: Expected [0]. Actual [134]: Check command [/scratch/mesos/jib-master/install/jdk-14+27-1279/macosx-x64.jdk/jdk-14.jdk/Contents/Home/bin/jpackage --input ./test/input --dest ./test/output --name "Name With Space" --type dmg --main-jar hello.jar --main-class Hello --verbose](14) exited with 0 code
	at jdk.jpackage.test.TKit.error(TKit.java:238)
	at jdk.jpackage.test.TKit.assertEquals(TKit.java:533)
	at jdk.jpackage.test.Executor$Result.assertExitCodeIs(Executor.java:159)
	at jdk.jpackage.test.PackageTest$Handler.accept(PackageTest.java:354)
	at jdk.jpackage.test.PackageTest.lambda$run$19(PackageTest.java:298)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
	at jdk.jpackage.test.PackageTest.run(PackageTest.java:298)
	at NameWithSpaceTest.test(NameWithSpaceTest.java:60)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.jpackage.test.MethodCall.accept(MethodCall.java:145)
	at jdk.jpackage.test.TestInstance.run(TestInstance.java:224)
	at jdk.jpackage.test.TKit.lambda$ignoreExceptions$5(TKit.java:131)
	at jdk.jpackage.test.TKit.lambda$runTests$3(TKit.java:116)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1624)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at jdk.jpackage.test.TKit.lambda$runTests$4(TKit.java:113)
	at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:89)
	at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:99)
	at jdk.jpackage.test.TKit.runTests(TKit.java:112)
	at jdk.jpackage.test.Main.runTests(Main.java:79)
	at jdk.jpackage.test.Main.lambda$main$2(Main.java:75)
	at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:89)
	at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:99)
	at jdk.jpackage.test.Main.main(Main.java:75)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)
jdk.jpackage.test.Functional$ExceptionBox: java.lang.RuntimeException: 1 FAILED TEST
	at jdk.jpackage.test.Functional.rethrowUnchecked(Functional.java:141)
	at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:91)
	at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:99)
	at jdk.jpackage.test.Main.main(Main.java:75)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: 1 FAILED TEST
	at jdk.jpackage.test.Main.reportSummary(Main.java:130)
	at jdk.jpackage.test.Main.runTests(Main.java:90)
	at jdk.jpackage.test.Main.lambda$main$2(Main.java:75)
	at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:89)
	... 8 more

JavaTest Message: Test threw exception: jdk.jpackage.test.Functional$ExceptionBox: java.lang.RuntimeException: 1 FAILED TEST
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: jdk.jpackage.test.Functional$ExceptionBox: java.lang.RuntimeException: 1 FAILED TEST
----------rerun:(37/5722)*----------

According to Mach5's artifacts drop down menu, there is
a core file for this failure. There is no hs_err_pid file for
this failure so it looks like the core came from somewhere
other than libjvm.

Starting this failure as a P3 since it is a Tier2 test failure.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk14/rev/fb606350b732 User: herrick Date: 2019-12-19 20:57:53 +0000
19-12-2019

the number of affected tests is too big, must to fix in 14
19-12-2019

http://cr.openjdk.java.net/~almatvee/8235738/webrev.01/ Fixed testForPresenceOnly spelling.
14-12-2019

http://cr.openjdk.java.net/~almatvee/8235738/webrev.00/ Not sure why it happens, but reading output from "hdiutil attach" was not exiting immediately after process terminated with delays upto 20 seconds always and in some case upto 10 minutes and thus test was timeout. Only possible workaround found is to wait for "hdiutil attach" process to exit before reading output. In this case call to "hdiutil attach" and reading output happens very fast and does not hang for long time. Generating simple DMG image went from ~40 seconds to ~20 seconds after fix. Test was done with verbose output enabled.
13-12-2019

I took a look at core dump. It is for jpackage process. I do no think we crashed, so not much help from core dump.
12-12-2019

> According to Mach5's artifacts drop down menu, there is a core file for this failure This is just "FYI" : Mach5 installs a jtreg failure handler which generates core files on timed out tests. This probably was done for hotspot and in the task definition for client test we disable it. You have no such option here. And the macos JRE core files are big even for short tests.
12-12-2019

[~almatvee] do we need to problem list this test? looks like it is better to fix in 14
12-12-2019

intermittent timeout errors running jpackage from tests on macosx. seems to be the same as JDK-8232835. There seems to be no path by which jpackage itself can return 134. The 134 return indicates that the processed timed-out.
11-12-2019