jdk8u-dev icon indicating copy to clipboard operation
jdk8u-dev copied to clipboard

8340660: [8u] Test com/sun/jdi/PrivateTransportTest.sh fails on MacOS

Open zzambers opened this issue 1 year ago • 3 comments

Turns out there is still one failing jdi test on MacOS (after DNS issue with macos-13 image was fixed): com/sun/jdi/PrivateTransportTest.sh

Error:

STDOUT:
JDK under test is: /Users/runner/jdk-macos-x64/jdk-1.8.0-internal+0_osx-x64_bin/j2sdk-image
Setup private transport library by copying an existing one and renaming
cp /Users/runner/jdk-macos-x64/jdk-1.8.0-internal+0_osx-x64_bin/j2sdk-image/jre/lib/libdt_socket.dylib /Users/runner/work/jdk8u-dev/jdk8u-dev/test-results/testoutput/jdk_tier1/JTwork/classes/com/sun/jdi/libprivate_dt_socket.dylib
LD_LIBRARY_PATH=/Users/runner/work/jdk8u-dev/jdk8u-dev/test-results/testoutput/jdk_tier1/JTwork/classes/com/sun/jdi
/Users/runner/jdk-macos-x64/jdk-1.8.0-internal+0_osx-x64_bin/j2sdk-image/bin/java -agentlib:jdwp=transport=private_dt_socket,server=y,suspend=n -classpath "/Users/runner/work/jdk8u-dev/jdk8u-dev/test-results/testoutput/jdk_tier1/JTwork/classes/com/sun/jdi" HelloWorld
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
test status for  was: 134
The test failed :-(
exit status was 134
STDERR:
ERROR: transport library not found: private_dt_socket
ERROR: JDWP Transport private_dt_socket failed to initialize, TRANSPORT_LOAD(509)
JDWP exit error AGENT_ERROR_TRANSPORT_LOAD(196): No transports initialized [debugInit.c:750]
/Users/runner/work/jdk8u-dev/jdk8u-dev/jdk/test/com/sun/jdi/PrivateTransportTest.sh: line 203: 16866 Abort trap: 6           /Users/runner/jdk-macos-x64/jdk-1.8.0-internal+0_osx-x64_bin/j2sdk-image/bin/java -agentlib:jdwp=transport=private_dt_socket,server=y,suspend=n -classpath "/Users/runner/work/jdk8u-dev/jdk8u-dev/test-results/testoutput/jdk_tier1/JTwork/classes/com/sun/jdi" HelloWorld
unspecified test failure

Details: Test fails to load native library. Issue is, that LD_LIBRARY_PATH env. var is no longer supported by newer versions MacOS. Fix is to use DYLD_LIBRARY_PATH env. var instead. Fix is specific to 8u, because jdi tests were rewritten to java in later JDKs in series of changes. I believe, in rewritten test , issue was then fixed as part of JDK-8216265. Backporting all of that just to fix this, seems like overkill, so I made fix to shell test.

Testing: Tier1: OK (test passes, other failures unrelated)


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [ ] JDK-8340660 needs maintainer approval
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8340660: [8u] Test com/sun/jdi/PrivateTransportTest.sh fails on MacOS (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/580/head:pull/580
$ git checkout pull/580

Update a local copy of the PR:
$ git checkout pull/580
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/580/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 580

View PR using the GUI difftool:
$ git pr show -t 580

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/580.diff

Webrev

Link to Webrev Comment

zzambers avatar Sep 23 '24 15:09 zzambers

:wave: Welcome back zzambers! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Sep 23 '24 15:09 bridgekeeper[bot]

@zzambers This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8340660: [8u] Test com/sun/jdi/PrivateTransportTest.sh fails on MacOS

Reviewed-by: serb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 53 new commits pushed to the master branch:

  • 85fb26b22a28714a5f45fc2130e913da0285745b: 8244966: Add .vscode to .hgignore and .gitignore
  • 5ccff2c63f39ddf3aa7ee5a3270e78fee8f86311: 8348211: [8u] sun/management/jmxremote/startstop/JMXStartStopTest.java fails after backport of JDK-8066708
  • f5e9a25f32439e89d3ca03addaf2ea31075d1726: 8349166: Bad indentation in backport of JDK-8250825
  • fc88d515109947e0643782f38cab616af84df4b5: 8255466: C2 crashes at ciObject::get_oop() const+0x0
  • 88a7829f254415bbc0a2079e2828de1a0758a6a8: 8339644: Improve parsing of Day/Month in tzdata rules
  • 4c5094095fade410e23e6a071c93c7e4fdc1dade: 8316193: jdk/jfr/event/oldobject/TestListenerLeak.java java.lang.Exception: Could not find leak
  • 8b08668b22c3d0eb52e3b27b2aecd725d670a345: 8250825: C2 crashes with assert(field != __null) failed: missing field
  • bfd4d8ba52ee6126adcd8f3e1e09373ca2e699c4: 8048215: [TESTBUG] java/lang/management/ManagementFactory/ThreadMXBeanProxy.java Expected non-null LockInfo
  • f89c26f592a739ae146d44ff295b1c5afb719af4: 8266881: Enable debug log for SSLEngineExplorerMatchedSNI.java
  • 492acd3ac4b4fbd4bfe90a00d8f5cd48ffbe372c: 8265019: Update tests for additional TestNG test permissions
  • ... and 43 more: https://git.openjdk.org/jdk8u-dev/compare/ec2bb45e246f6c223a3e44b74a51128fe1563e74...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

openjdk[bot] avatar Sep 23 '24 16:09 openjdk[bot]

Webrevs

mlbridge[bot] avatar Sep 23 '24 16:09 mlbridge[bot]

@zzambers This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Oct 21 '24 21:10 bridgekeeper[bot]

@zzambers This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

bridgekeeper[bot] avatar Nov 19 '24 02:11 bridgekeeper[bot]

/open

zzambers avatar Jan 28 '25 12:01 zzambers

@zzambers This pull request is now open

openjdk[bot] avatar Jan 28 '25 12:01 openjdk[bot]

⚠️ @zzambers This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

openjdk[bot] avatar Feb 25 '25 03:02 openjdk[bot]

/approval request Fixes com/sun/jdi/PrivateTransportTest.sh on Mac, safe, only affects test code

zzambers avatar Feb 25 '25 11:02 zzambers

@zzambers 8340660: The approval request has been created successfully.

openjdk[bot] avatar Feb 25 '25 11:02 openjdk[bot]

/integrate

zzambers avatar Feb 25 '25 14:02 zzambers

Going to push as commit 8eccf896169b568c70a188d085b0673d225e1f8f. Since your change was applied there have been 53 commits pushed to the master branch:

  • 85fb26b22a28714a5f45fc2130e913da0285745b: 8244966: Add .vscode to .hgignore and .gitignore
  • 5ccff2c63f39ddf3aa7ee5a3270e78fee8f86311: 8348211: [8u] sun/management/jmxremote/startstop/JMXStartStopTest.java fails after backport of JDK-8066708
  • f5e9a25f32439e89d3ca03addaf2ea31075d1726: 8349166: Bad indentation in backport of JDK-8250825
  • fc88d515109947e0643782f38cab616af84df4b5: 8255466: C2 crashes at ciObject::get_oop() const+0x0
  • 88a7829f254415bbc0a2079e2828de1a0758a6a8: 8339644: Improve parsing of Day/Month in tzdata rules
  • 4c5094095fade410e23e6a071c93c7e4fdc1dade: 8316193: jdk/jfr/event/oldobject/TestListenerLeak.java java.lang.Exception: Could not find leak
  • 8b08668b22c3d0eb52e3b27b2aecd725d670a345: 8250825: C2 crashes with assert(field != __null) failed: missing field
  • bfd4d8ba52ee6126adcd8f3e1e09373ca2e699c4: 8048215: [TESTBUG] java/lang/management/ManagementFactory/ThreadMXBeanProxy.java Expected non-null LockInfo
  • f89c26f592a739ae146d44ff295b1c5afb719af4: 8266881: Enable debug log for SSLEngineExplorerMatchedSNI.java
  • 492acd3ac4b4fbd4bfe90a00d8f5cd48ffbe372c: 8265019: Update tests for additional TestNG test permissions
  • ... and 43 more: https://git.openjdk.org/jdk8u-dev/compare/ec2bb45e246f6c223a3e44b74a51128fe1563e74...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Feb 25 '25 14:02 openjdk[bot]

@zzambers Pushed as commit 8eccf896169b568c70a188d085b0673d225e1f8f.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Feb 25 '25 14:02 openjdk[bot]