Skip to content

8352392: AIX: implement attach API v2 and streaming output #24177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from

Conversation

varada1110
Copy link
Contributor

@varada1110 varada1110 commented Mar 23, 2025

AIX changes for attach API to support arbitrary length arguments and the streaming output support.
serviceability/attach/AttachAPIv2/StreamingOutputTest.java test passes

tier1, tier2 and tier3 testing is successful with fastdebug level

JBS Issue : JDK-8352392


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8352392: AIX: implement attach API v2 and streaming output (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24177/head:pull/24177
$ git checkout pull/24177

Update a local copy of the PR:
$ git checkout pull/24177
$ git pull https://git.openjdk.org/jdk.git pull/24177/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24177

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24177.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 23, 2025

👋 Welcome back varadam! 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.

@openjdk
Copy link

openjdk bot commented Mar 23, 2025

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8352392: AIX: implement attach API v2 and streaming output

Reviewed-by: mdoerr, jkern, amenkov

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 90 new commits pushed to the master branch:

  • 70e3250: 8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail
  • 296d9d6: 8353345: C2 asserts because maskShiftAmount modifies node without deleting the hash
  • 3ceabf0: 8353359: C2: Or(I|L)Node::Ideal is missing AddNode::Ideal call
  • b263292: 8353484: JFR: Simplify EventConfiguration
  • ffca4f2: 8353264: ZGC: Windows heap unreserving is broken
  • f7a94fe: 8352585: Add special case handling for Float16.max/min x86 backend
  • 9c5ed23: 8349988: Change cgroup version detection logic to not depend on /proc/cgroups
  • 00a038e: 8353341: C2: removal of a Mod[DF]Node crashes when the node is already dead
  • bd74922: 8338675: javac shouldn't silently change .jar files on the classpath
  • 8d3d1d4: 8353058: [PPC64] Some IR framework tests are failing after JDK-8352595
  • ... and 80 more: https://git.openjdk.org/jdk/compare/ddf326b8e6e50403303b410635e4c26d7bf56aaa...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 openjdk bot changed the title 8352392 AIX: implement attach API v2 and streaming output 8352392: AIX: implement attach API v2 and streaming output Mar 23, 2025
@openjdk
Copy link

openjdk bot commented Mar 23, 2025

@varada1110 The following labels will be automatically applied to this pull request:

  • hotspot-runtime
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 23, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 23, 2025

Webrevs

@JoKern65
Copy link
Contributor

Hi Varada, it looks to me that with your change you've brought the AIX code closer to the POSIX implementation, but not completely. Could you please explain your changes in detail so I can review the PR? I'm not that familiar with this.

@varada1110
Copy link
Contributor Author

test/hotspot/jtreg/serviceability/attach/AttachAPIv2/StreamingOutputTest.java

Initial failure
Execution failed: `main' threw exception: java.lang.Exception: VM did not logged expected 'executing command setflag, streaming output: 1'

AIX hasn’t adopted changes to support the new protocol version v2

. Additionally aix doesn’t have the changes to support streaming output. The "getversion” command supports an "options" argument which currently takes option "streaming"which allows client to control streaming/buffered output mode.
On aix, this process uses unix sockets for communications like posix had more similar implementation. Is there anything additional changes I should take care of?

#20782 (comment)
#23405 (comment)

@varada1110 varada1110 closed this Mar 27, 2025
@varada1110 varada1110 deleted the test-fix branch March 27, 2025 16:51
@varada1110 varada1110 restored the test-fix branch March 27, 2025 18:19
@varada1110 varada1110 reopened this Mar 27, 2025
@alexmenkov
Copy link

The change looks good.
Couple notes:

  • need to update copyright year in VirtualMachineImpl.java
  • need to remove StreamingOutputTest.java from problem list (revert JDK-8352393)

@varada1110
Copy link
Contributor Author

Thank you @alexmenkov, I have updated copyright year and reverted the changes from JDK-8352393.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 28, 2025
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good. @JoKern65: Do you also want to review it?

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Apr 1, 2025
@JoKern65
Copy link
Contributor

JoKern65 commented Apr 2, 2025

Hi Varada, I see that you've largely adapted the code to the POSIX version. Essentially, only the shutdown special handling remains. But the AIX special handling that you removed was introduced for some reason.
Do you know why? Does this reasoning no longer apply?
I have no idea and can't judge whether the different semantics have created holes in the code that could reappear under certain circumstances.
Therefore, I would like an explanation from you as to why you can make this change now.

@varada1110
Copy link
Contributor Author

With the Attach API protocol update to version 2, now support arbitrary-length arguments, and shared code has been added in attachListener.cpp (read_request, write_fully) to handle this across platforms. As a result, the AIX code is no longer required. I also compared the older changes in the POSIX implementation and found them to be the same as AIX

Copy link
Contributor

@JoKern65 JoKern65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable change.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 3, 2025
@varada1110
Copy link
Contributor Author

Thanks all,
/integrate

@openjdk
Copy link

openjdk bot commented Apr 4, 2025

Going to push as commit 41d4a0d.
Since your change was applied there have been 99 commits pushed to the master branch:

  • 1c2a553: 8327858: Improve spliterator and forEach for single-element immutable collections
  • a449aee: 8350704: Create tests to ensure the failure behavior of core reflection APIs
  • 57df89c: 8353684: [BACKOUT] j.u.l.Handler classes create deadlock risk via synchronized publish() method
  • ebcb9a8: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method
  • d894b78: 8353588: [REDO] DaCapo xalan performance with -XX:+UseObjectMonitorTable
  • db08726: 8352966: Opensource Several Font related tests - Batch 2
  • 6b7b324: 8351431: Type annotations on new class creation expressions can't be retrieved
  • 64b691a: 8271870: G1: Add objArray splitting when scanning object with evacuation failure
  • b428cda: 8349686: [s390x] C1: Improve Class.isInstance intrinsic
  • 70e3250: 8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail
  • ... and 89 more: https://git.openjdk.org/jdk/compare/ddf326b8e6e50403303b410635e4c26d7bf56aaa...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 4, 2025
@openjdk openjdk bot closed this Apr 4, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 4, 2025
@openjdk
Copy link

openjdk bot commented Apr 4, 2025

@varada1110 Pushed as commit 41d4a0d.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants