JDK-8298488 : [macos13] tools/jpackage tests failing with "Exit code: 137" on macOS
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: 17.0.8-oracle,20,21
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2022-12-09
  • Updated: 2023-08-08
  • Resolved: 2022-12-12
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 17 JDK 20 JDK 21
17.0.8-oracleFixed 20 b28Fixed 21Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
34 tools/jpackage tests are failing on macosx. I have not checked all
of the failures, but a random selection are failing with "Exit code: 137":

tools/jpackage/share/SimplePackageTest.java
tools/jpackage/share/PerUserCfgTest.java
tools/jpackage/share/MultiLauncherTwoPhaseTest.java
tools/jpackage/share/LicenseTest.java#id0
tools/jpackage/share/InstallDirTest.java#id0
tools/jpackage/share/EmptyFolderTest.java
tools/jpackage/share/EmptyFolderPackageTest.java
tools/jpackage/share/ArgumentsTest.java
tools/jpackage/share/AppLauncherEnvTest.java
tools/jpackage/share/AppContentTest.java
tools/jpackage/share/AddLShortcutTest.java
tools/jpackage/share/AddLauncherTest.java#id1
tools/jpackage/share/jdk/jpackage/tests/NoMPathRuntimeTest.java
tools/jpackage/share/jdk/jpackage/tests/MultipleJarAppTest.java
tools/jpackage/share/jdk/jpackage/tests/ModulePathTest3.java
tools/jpackage/share/jdk/jpackage/tests/ModulePathTest2.java
tools/jpackage/share/jdk/jpackage/tests/ModulePathTest.java
tools/jpackage/share/jdk/jpackage/tests/MainClassTest.java
tools/jpackage/share/jdk/jpackage/tests/JLinkOptionsTest.java
tools/jpackage/share/jdk/jpackage/tests/JavaOptionsTest.java
tools/jpackage/share/jdk/jpackage/tests/JavaOptionsEqualsTest.java#id0
tools/jpackage/share/jdk/jpackage/tests/JavaOptionsEqualsTest.java#id1
tools/jpackage/share/jdk/jpackage/tests/DotInNameTest.java
tools/jpackage/share/jdk/jpackage/tests/CookedRuntimeTest.java
tools/jpackage/share/jdk/jpackage/tests/BasicTest.java
tools/jpackage/share/jdk/jpackage/tests/AppVersionTest.java
tools/jpackage/macosx/NameWithSpaceTest.java
tools/jpackage/macosx/MacPropertiesTest.java
tools/jpackage/macosx/MacFileAssociationsTest.java
tools/jpackage/macosx/MacAppStoreRuntimeTest.java
tools/jpackage/macosx/MacAppStoreJlinkOptionsTest.java
tools/jpackage/macosx/HostArchPkgTest.java
tools/jpackage/macosx/DmgContentTest.java
tools/jpackage/macosx/ArgumentsFilteringTest.java


Here's a snippet from the tools/jpackage/share/SimplePackageTest.jtr file:

[13:07:57.733] TRACE: assertTrue(): Check [./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/app/SimplePackageTest.cfg] is a file
[13:07:57.734] TRACE: assertTrue(): Check [./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/runtime/Contents/MacOS/libjli.dylib] path exists
[13:07:57.734] TRACE: assertTrue(): Check [./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/runtime/Contents/MacOS/libjli.dylib] is a file
[13:07:57.740] TRACE: Clearing PATH in environment
[13:07:57.741] TRACE: exec: Execute [/System/Volumes/Data/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S30243/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c74e261c-2e66-4f55-93f3-f3d93da6e6d7/runs/4318a60a-fc2c-4ab2-940f-878c0a63ec6b/testoutput/test-support/jtreg_open_test_jdk_tier2_part2/scratch/5/./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/MacOS/SimplePackageTest](1); inherit I/O; in directory [./test]...
[13:07:58.869] TRACE: exec: Done. Exit code: 137
[13:08:04.008] TRACE: Clearing PATH in environment
[13:08:04.009] TRACE: exec: Execute [/System/Volumes/Data/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S30243/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c74e261c-2e66-4f55-93f3-f3d93da6e6d7/runs/4318a60a-fc2c-4ab2-940f-878c0a63ec6b/testoutput/test-support/jtreg_open_test_jdk_tier2_part2/scratch/5/./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/MacOS/SimplePackageTest](1); inherit I/O; in directory [./test]...
[13:08:04.025] TRACE: exec: Done. Exit code: 137
[13:08:09.153] TRACE: Clearing PATH in environment
[13:08:09.154] TRACE: exec: Execute [/System/Volumes/Data/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S30243/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c74e261c-2e66-4f55-93f3-f3d93da6e6d7/runs/4318a60a-fc2c-4ab2-940f-878c0a63ec6b/testoutput/test-support/jtreg_open_test_jdk_tier2_part2/scratch/5/./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/MacOS/SimplePackageTest](1); inherit I/O; in directory [./test]...
[13:08:09.178] TRACE: exec: Done. Exit code: 137
[13:08:14.326] ERROR: Expected [0]. Actual [137]: Check command [/System/Volumes/Data/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S30243/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c74e261c-2e66-4f55-93f3-f3d93da6e6d7/runs/4318a60a-fc2c-4ab2-940f-878c0a63ec6b/testoutput/test-support/jtreg_open_test_jdk_tier2_part2/scratch/5/./test/unpacked-dmg/Applications/SimplePackageTest.app/Contents/MacOS/SimplePackageTest](1) exited with 0 code
[13:08:14.327] [  FAILED  ] SimplePackageTest.test; checks=25
[13:08:14.329] [==========] 1 tests ran
[13:08:14.329] [  PASSED  ] 0 tests
[13:08:14.331] [  FAILED  ] 1 test, listed below
[13:08:14.331] [  FAILED  ] SimplePackageTest.test; workDir=[./test]
[13:08:14.331] 1 FAILED TEST
----------System.err:(62/4624)----------
Comments
Fix request [17u] I backport this for parity with 17.0.8-oracle. Low risk, simple fix. Clean backport except for patch of a test not in 17. SAP nightly testing passed.
19-04-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1258 Date: 2023-04-18 08:13:06 +0000
18-04-2023

Changeset: 8962c723 Author: Alexander Matveev <almatvee@openjdk.org> Date: 2022-12-12 22:51:02 +0000 URL: https://git.openjdk.org/jdk20/commit/8962c723a8ae62a8638e9e0a89c20001aea1549a
12-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk20/pull/20 Date: 2022-12-12 21:23:50 +0000
12-12-2022

There seems to be a pattern that the first failing test is tools/jpackage/macosx/MacAppStoreJlinkOptionsTest.java which can either show the Exit code 137 or simply timeout - and then all subsequent tests seem to fail the same way.
11-12-2022

Alexander, please look at this failures affecting JDK 20 stabilization
09-12-2022

please evaluate
09-12-2022