Skip to content
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

8287362: FieldAccessWatch testcase failed on AIX platform #8904

Closed
wants to merge 2 commits into from

Conversation

takiguc
Copy link

@takiguc takiguc commented May 26, 2022

On AIX platform, test/hotspot/jtreg/serviceability/jvmti/FieldAccessWatch/FieldAccessWatch.java testcase failed by single testcase execution.

Failure message is:

Error occurred during initialization of VM
agent library failed to init: FieldAccessWatch
Failed to set capabilities, error: 98

It seems following initialization code affects this issue

jvmtiCapabilities caps = {0};

So additionally memset() is required just for AIX platform


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-8287362: FieldAccessWatch testcase failed on AIX platform

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8904/head:pull/8904
$ git checkout pull/8904

Update a local copy of the PR:
$ git checkout pull/8904
$ git pull https://git.openjdk.java.net/jdk pull/8904/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8904

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8904.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 26, 2022

👋 Welcome back itakiguchi! 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 openjdk bot added the rfr label May 26, 2022
@openjdk
Copy link

openjdk bot commented May 26, 2022

@takiguc The following label will be automatically applied to this pull request:

  • serviceability

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

@openjdk openjdk bot added the serviceability label May 26, 2022
@mlbridge
Copy link

mlbridge bot commented May 26, 2022

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Given 99.9% of the tests don't try to initialize "caps" but instead do the memset, I would suggest it is perfectly fine to delete the initializer and remove the comments related to AIX/xlclang.

You may also need to check
hotspot/jtreg/runtime/jni/FastGetField/libFastGetField.c
hotspot/jtreg/compiler/jsr292/cr8026328/libTest8026328.c
which have a similar usage for the callbacks structure.

@TheRealMDoerr
Copy link
Contributor

TheRealMDoerr commented May 27, 2022

I agree with David.
In addition, I suggest reporting this issue to the xlclang folks.

@takiguc
Copy link
Author

takiguc commented May 27, 2022

Hello @dholmes-ora and @TheRealMDoerr .
I appreciate your suggestions.
I checked other files which were use jvmtiEventCallbacks structure initializer.
jvmtiEventCallbacks structure was initialized properly with AIX's xlclang compiler.
It seems only jvmtiCapabilities structure initializer does not work as expected with xlclang.
I tried to create small testcase for this issue.
According to jvmti.h, jvmtiCapabilities structure likes:

typedef struct {
    unsigned int can_tag_objects : 1;
    unsigned int can_generate_field_modification_events : 1;
    unsigned int can_generate_field_access_events : 1;
    unsigned int can_get_bytecodes : 1;
......
    unsigned int can_generate_sampled_object_alloc_events : 1;
    unsigned int can_support_virtual_threads : 1;
    unsigned int : 3;
    unsigned int : 16;
    unsigned int : 16;
    unsigned int : 16;
    unsigned int : 16;
    unsigned int : 16;
} jvmtiCapabilities;

This structure can handle bits and it has padding data without variable name.
It seems xlclang initializes only variable name is available by initializer.
So last part is not initialized.
If I put dummy variable name into above structure, all bytes are initialized properly.
I checked other source files which used jvmtiCapabilities structure, they used memset() instead of initializer.
I removed jvmtiCapabilities and jvmtiEventCallbacks initializer and add memset()

@openjdk
Copy link

openjdk bot commented May 27, 2022

@takiguc 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:

8287362: FieldAccessWatch testcase failed on AIX platform

Reviewed-by: cjplummer, mdoerr

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

  • d3e781d: 8287223: C1: Inlining attempt through MH::invokeBasic() with null receiver
  • 0df4748: 8287463: JFR: Disable TestDevNull.java on Windows
  • 6520843: 8287003: InputStreamReader::read() can return zero despite writing a char in the buffer
  • 63eb0b7: 8282947: JFR: Dump on shutdown live-locks in some conditions
  • f2bc447: 8271406: Kitchensink failed with "assert(early->flag() == current->flag()) failed: Should be the same"
  • be93318: 8287292: Improve TransformKey to pack more kinds of transforms efficiently
  • 777f813: 8268422: Find a better way to select releases in "New API" page
  • 22e2067: 8282182: Document algorithm used to encode aarch64 logical immediate operands.
  • 37ecbb4: 8277420: Provide a way to copy the hyperlink to a doc element to the clipboard
  • 176bb23: 8287200: Test java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java timed out after JDK-8287103
  • ... and 12 more: https://git.openjdk.java.net/jdk/compare/94811c0dc7c20b0e7cb2649fe8da5061ce3d6246...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 added the ready label May 27, 2022
@takiguc
Copy link
Author

takiguc commented May 28, 2022

/integrate

@openjdk
Copy link

openjdk bot commented May 28, 2022

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

  • 410a25d: 8286562: GCC 12 reports some compiler warnings
  • ed8e8ac: 8284400: Improve XPath exception handling
  • d3e781d: 8287223: C1: Inlining attempt through MH::invokeBasic() with null receiver
  • 0df4748: 8287463: JFR: Disable TestDevNull.java on Windows
  • 6520843: 8287003: InputStreamReader::read() can return zero despite writing a char in the buffer
  • 63eb0b7: 8282947: JFR: Dump on shutdown live-locks in some conditions
  • f2bc447: 8271406: Kitchensink failed with "assert(early->flag() == current->flag()) failed: Should be the same"
  • be93318: 8287292: Improve TransformKey to pack more kinds of transforms efficiently
  • 777f813: 8268422: Find a better way to select releases in "New API" page
  • 22e2067: 8282182: Document algorithm used to encode aarch64 logical immediate operands.
  • ... and 14 more: https://git.openjdk.java.net/jdk/compare/94811c0dc7c20b0e7cb2649fe8da5061ce3d6246...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label May 28, 2022
@openjdk openjdk bot closed this May 28, 2022
@openjdk openjdk bot removed ready rfr labels May 28, 2022
@openjdk
Copy link

openjdk bot commented May 28, 2022

@takiguc Pushed as commit 6634037.

💡 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
Labels
integrated serviceability
4 participants