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

JDK-8323964: runtime/Thread/ThreadCountLimit.java fails intermittently on AIX #17512

Closed
wants to merge 3 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jan 22, 2024

Every 1-2 months we run into into such kind of failures on AIX:

[2.498s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (11=EAGAIN) for attributes: stacksize: 2112k, guardsize: 0k, detached.
[2.498s][warning][os,thread] Number of threads approx. running in the VM: 4223
[2.498s][warning][os,thread] Checking JVM parameter MaxExpectedDataSegmentSize (currently 8388608k) might be helpful
[2.498s][warning][os,thread] Failed to start the native thread for java.lang.Thread "Thread-4213"

[error occurred during error reporting (), id 0xe0000000, Internal Error (/workspace/openjdk-jdk-dev-aix_ppc64-dbg/jdk/src/hotspot/os/aix/os_aix.cpp:2971)]
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 56 bytes. Error detail: AllocateHeap
[thread 3856 also had an error]
# An error report file with more information is saved as:
# /tmp/hs_err_pid13959464.log
[thread 76331 also had an error]

Seems the MaxExpectedDataSegmentSize (Maximum expected size of the data segment, AIX specific flag)
settings in in some cases too low for the test.
We experienced this a few times in scenarios where a lot of threads are created (and even warn about this, see os_aix.cpp).
So we should better run with a higher than default value of MaxExpectedDataSegmentSize for this test.


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-8323964: runtime/Thread/ThreadCountLimit.java fails intermittently on AIX (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17512

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 22, 2024

👋 Welcome back mbaesken! 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 Pull request is ready for review label Jan 22, 2024
@openjdk
Copy link

openjdk bot commented Jan 22, 2024

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

  • hotspot-runtime

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 hotspot-runtime hotspot-runtime-dev@openjdk.org label Jan 22, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 22, 2024

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks

/* We need to leave "breathing space" for the data segment when */ \
/* placing the java heap. If the MaxExpectedDataSegmentSize setting */ \
/* is too small, we might run into resource issues creating many native */ \
/* threads, if it is too large, we reduce our chance of getting a low hea */ \
Copy link
Member

Choose a reason for hiding this comment

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

typo: hea -> heap

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for correcting the comment; it made no sense before

@openjdk
Copy link

openjdk bot commented Jan 23, 2024

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

8323964: runtime/Thread/ThreadCountLimit.java fails intermittently on AIX

Reviewed-by: dholmes, stuefe

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

  • 5a74c2a: 8323438: Enhance assertions for Windows sync API failures
  • 52523d3: 8324050: Issue store-store barrier after re-materializing objects during deoptimization
  • df370d7: 8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot
  • 0d8543d: 8324065: Daylight saving information for Africa/Casablanca are incorrect
  • c9cacfb: 8323657: Compilation of snippet results in VerifyError at runtime with --release 9 (and above)
  • bde650f: 8322282: Incorrect LoaderConstraintTable::add_entry after JDK-8298468
  • be943a9: 8321984: IGV: Upgrade to Netbeans Platform 20
  • d3b2ac1: 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"
  • 72f1990: 8323057: Recoverable errors may be reported before unrecoverable errors when annotation processing is skipped
  • c84af49: 8324129: C2: Remove some ttyLocker usages in preparation for JDK-8306767
  • ... and 47 more: https://git.openjdk.org/jdk/compare/b89172149d6a900d11630a95be7278870421b435...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 Pull request is ready to be integrated label Jan 23, 2024
Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

Good.

/* We need to leave "breathing space" for the data segment when */ \
/* placing the java heap. If the MaxExpectedDataSegmentSize setting */ \
/* is too small, we might run into resource issues creating many native */ \
/* threads, if it is too large, we reduce our chance of getting a low hea */ \
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for correcting the comment; it made no sense before

@MBaesken
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 23, 2024

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

  • 5a74c2a: 8323438: Enhance assertions for Windows sync API failures
  • 52523d3: 8324050: Issue store-store barrier after re-materializing objects during deoptimization
  • df370d7: 8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot
  • 0d8543d: 8324065: Daylight saving information for Africa/Casablanca are incorrect
  • c9cacfb: 8323657: Compilation of snippet results in VerifyError at runtime with --release 9 (and above)
  • bde650f: 8322282: Incorrect LoaderConstraintTable::add_entry after JDK-8298468
  • be943a9: 8321984: IGV: Upgrade to Netbeans Platform 20
  • d3b2ac1: 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"
  • 72f1990: 8323057: Recoverable errors may be reported before unrecoverable errors when annotation processing is skipped
  • c84af49: 8324129: C2: Remove some ttyLocker usages in preparation for JDK-8306767
  • ... and 47 more: https://git.openjdk.org/jdk/compare/b89172149d6a900d11630a95be7278870421b435...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 23, 2024

@MBaesken Pushed as commit 3696765.

💡 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
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants