RFR: 8268773: Improvements related to: Failed to start thread - pthread_create failed (EAGAIN) [v2]
David Holmes
dholmes at openjdk.java.net
Tue Jul 6 22:42:12 UTC 2021
> Please review this simple enhancement that:
>
> 1. Retries OS thread creation of it fails due to EAGAIN
>
> This is potentially of limited use as you would need some resources to be released for subsequent calls to succeed.
>
> 2. Prints the name of the thread being started in the warning/log messages
>
> This is also of limited use as JavaThread's do not have their correct name at this stage, nor do some system threads. But others do, so it can be informative.
>
> I looked at trying to (separately) unify this code into a Posix version, but the platform differences are such that it makes it very difficult to try and share code. So this simply updates each the existing code in place.
>
> Testing:
> - builds from tiers 1-3 and GHA
> - manual inspection of output from a simple thread exhaustion test (runtime/Thread/ThreadCountLimit.java)
> - manual inspection of os+thread logging on java -version
>
> Thanks,
> David
David Holmes has updated the pull request incrementally with one additional commit since the last revision:
Update expected output now that thread name is included
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4648/files
- new: https://git.openjdk.java.net/jdk/pull/4648/files/330deff1..f30a3e63
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4648&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4648&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/4648.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4648/head:pull/4648
PR: https://git.openjdk.java.net/jdk/pull/4648
More information about the hotspot-runtime-dev
mailing list