[jdk19] RFR: 8289709: fatal error: stuck in JvmtiVTMSTransitionDisabler::disable_VTMS_transitions

2022-07-08 Thread Serguei Spitsyn
This is a test bug. The test should filter out non-tested threads to avoid generating such kind of deadlocks. In short, the deadlock dependencies are: - The `Common-Cleaner` thread is executing the JVM TI agent `MethodEntry` event callback which grabbed the `agent_lock` raw monitor and calls J

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Sat, 9 Jul 2022 05:19:08 GMT, Ioi Lam wrote: >> src/hotspot/os/posix/perfMemory_posix.cpp line 796: >> >>> 794: if (!is_locked_by_another_process) { >>> 795: if ((pid == os::current_process_id()) || >>> 796: (kill(pid, 0) == OS_ERR && (errno == ESRCH || errno == >>> EPERM

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v5]

2022-07-08 Thread Ioi Lam
> Some Kubernetes setups share the /tmp directory across multiple containers. > On rare occasions, the JVM may crash when it tries to write to > `/tmp/hsperfdata_/` when a process in a separate container decides > to do the same thing (because they happen to have the same namespaced pid). > > T

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v4]

2022-07-08 Thread Ioi Lam
> Some Kubernetes setups share the /tmp directory across multiple containers. > On rare occasions, the JVM may crash when it tries to write to > `/tmp/hsperfdata_/` when a process in a separate container decides > to do the same thing (because they happen to have the same namespaced pid). > > T

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v3]

2022-07-08 Thread Ioi Lam
> Some Kubernetes setups share the /tmp directory across multiple containers. > On rare occasions, the JVM may crash when it tries to write to > `/tmp/hsperfdata_/` when a process in a separate container decides > to do the same thing (because they happen to have the same namespaced pid). > > T

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Fri, 8 Jul 2022 07:08:27 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @tstuefe comments > > src/hotspot/os/posix/perfMemory_posix.cpp line 796: > >> 794: if (!is_locked_by_another_process)

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Fri, 8 Jul 2022 06:54:33 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @tstuefe comments > > src/hotspot/os/posix/perfMemory_posix.cpp line 743: > >> 741: >> 742: // We now have a file name

Integrated: 8289780: Avoid formatting stub names when Forte is not enabled

2022-07-08 Thread Ioi Lam
On Wed, 6 Jul 2022 00:38:14 GMT, Ioi Lam wrote: > `Forte::register_stub()` should be called only when the JVm is being > instrumented by Forte (aka "Oracle Developer Studio") > > https://www.oracle.com/tools/developerstudio/downloads/developer-studio-jsp.html > > We currently always format the

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Ioi Lam
On Wed, 6 Jul 2022 01:24:09 GMT, David Holmes wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Do not remove Forte::register_stub as it is used on Linux as well > > Cleanup looks good! Thanks. Thanks @dholmes-ora, @sspi

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Leonid Mesnik
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Serguei Spitsyn
On Fri, 8 Jul 2022 23:06:03 GMT, Ioi Lam wrote: >> src/hotspot/share/runtime/sharedRuntime.cpp line 2700: >> >>> 2698: if (JvmtiExport::should_post_dynamic_code_generated()) { >>> 2699: JvmtiExport::post_dynamic_code_generated(blob_id, >>> new_adapter->content_begin(), new_adapter->co

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Ioi Lam
On Fri, 8 Jul 2022 22:53:49 GMT, Serguei Spitsyn wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Do not remove Forte::register_stub as it is used on Linux as well > > src/hotspot/share/runtime/sharedRuntime.cpp line 270

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Serguei Spitsyn
On Wed, 6 Jul 2022 17:50:54 GMT, Ioi Lam wrote: >> `Forte::register_stub()` should be called only when the JVm is being >> instrumented by Forte (aka "Oracle Developer Studio") >> >> https://www.oracle.com/tools/developerstudio/downloads/developer-studio-jsp.html >> >> We currently always form

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Serguei Spitsyn
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Coleen Phillimore
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Mikhailo Seledtsov
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Coleen Phillimore
This change removes the last remnants of sun/hotspot/WhiteBox.java and other classes, and uses the versions in jdk/test/whitebox. I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and deleted the old files and some references to sun.hotspot. Tested with tier1-4. ---

[jdk19] Integrated: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode

2022-07-08 Thread Daniel D . Daugherty
On Fri, 8 Jul 2022 19:39:24 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java > on windows-x64 in -Xcomp mode. This pull request has now been integrated. Changeset: 9981c85d Author:Daniel D. Daugherty URL

Re: [jdk19] Integrated: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode

2022-07-08 Thread Daniel D . Daugherty
On Fri, 8 Jul 2022 19:41:40 GMT, Thomas Schatzl wrote: >> A trivial fix to ProblemList >> serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java >> on windows-x64 in -Xcomp mode. > > Marked as reviewed by tschatzl (Reviewer). @tschatzl - Thanks for the fast review! -

Re: [jdk19] Integrated: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode

2022-07-08 Thread Daniel D . Daugherty
On Fri, 8 Jul 2022 19:40:34 GMT, Alexander Zvegintsev wrote: >> A trivial fix to ProblemList >> serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java >> on windows-x64 in -Xcomp mode. > > Marked as reviewed by azvegint (Reviewer). @azvegint - Thanks for the lightning fast revie

Re: [jdk19] Integrated: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode

2022-07-08 Thread Thomas Schatzl
On Fri, 8 Jul 2022 19:39:24 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java > on windows-x64 in -Xcomp mode. Marked as reviewed by tschatzl (Reviewer). - PR: https://git.openjdk.org/jdk19/pull/1

[jdk19] Integrated: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode

2022-07-08 Thread Daniel D . Daugherty
A trivial fix to ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode. - Commit messages: - 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode Changes:

Re: [jdk19] Integrated: 8290033: ProblemList serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java on windows-x64 in -Xcomp mode

2022-07-08 Thread Alexander Zvegintsev
On Fri, 8 Jul 2022 19:39:24 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList > serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java > on windows-x64 in -Xcomp mode. Marked as reviewed by azvegint (Reviewer). - PR: https://git.openjdk.org/jdk19/pull/1

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Coleen Phillimore
On Fri, 8 Jul 2022 18:35:38 GMT, Ioi Lam wrote: >> If the answer to whether it's enabled is something you want to be fast, and >> doesn't change, maybe make it check a variable? > > The code in the `Forte` class, as well as the non-trivial of > `AsyncGetCallTrace()` in forte.cpp, are inside `#i

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Coleen Phillimore
On Wed, 6 Jul 2022 17:50:54 GMT, Ioi Lam wrote: >> `Forte::register_stub()` should be called only when the JVm is being >> instrumented by Forte (aka "Oracle Developer Studio") >> >> https://www.oracle.com/tools/developerstudio/downloads/developer-studio-jsp.html >> >> We currently always form

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Ioi Lam
On Thu, 7 Jul 2022 15:12:49 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/forte.hpp line 32: >> >>> 30: class Forte : AllStatic { >>> 31: public: >>> 32:static bool is_enabled() NOT_JVMTI_RETURN_(false); >> >> I don't think the rest of this forte code is disabled by JVMTI. > > I

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Daniel Jeliński
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Chris Plummer
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Daniel Jeliński
> This patch removes many unused variables and one unused label reported by the > compilers when relevant warnings are enabled. > > The unused code was found by compiling after removing `unused` from the list > of disabled warnings for > [gcc](https://github.com/openjdk/jdk/blob/master/make/au

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Alan Bateman
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Integrated: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-08 Thread Daniel Jeliński
On Thu, 7 Jul 2022 19:06:52 GMT, Chris Plummer wrote: >> Daniel Jeliński has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional >> comm

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
On Fri, 8 Jul 2022 06:12:18 GMT, David Holmes wrote: >> This change uses sed to change sun.hotspot.WhiteBox to >> jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to >> indirect inclusions of some of the test libraries, changing a few wasn't a >> reliable option, and I need

[jdk19] Integrated: 8289951: ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64

2022-07-08 Thread Daniel D . Daugherty
On Thu, 7 Jul 2022 22:59:11 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java > on linux-x64 and macosx-x64. This pull request has now been integrated. Changeset: 1304390b Author:Daniel D. Daugherty URL: https://git.open

Re: [jdk19] RFR: 8289951: ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64

2022-07-08 Thread Paul Sandoz
On Thu, 7 Jul 2022 22:59:11 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java > on linux-x64 and macosx-x64. Marked as reviewed by psandoz (Reviewer). - PR: https://git.openjdk.org/jdk19/pull/123

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Thomas Stuefe
On Thu, 7 Jul 2022 21:21:27 GMT, Ioi Lam wrote: >> Some Kubernetes setups share the /tmp directory across multiple containers. >> On rare occasions, the JVM may crash when it tries to write to >> `/tmp/hsperfdata_/` when a process in a separate container >> decides to do the same thing (becaus

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread David Holmes
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

Re: [jdk19] RFR: 8289951: ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64

2022-07-08 Thread Daniel D . Daugherty
On Thu, 7 Jul 2022 23:07:17 GMT, Paul Sandoz wrote: >> A trivial fix to ProblemList >> jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64. > > Marked as reviewed by psandoz (Reviewer). @PaulSandoz - Thanks for the review! - PR: https://git.openjdk.org/jdk

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Thomas Stuefe
On Thu, 7 Jul 2022 21:58:55 GMT, Ioi Lam wrote: >> src/hotspot/os/posix/perfMemory_posix.cpp line 781: >> >>> 779: // signal the process, then the file is assumed to >>> 780: // be stale and is removed because the files for such a >>> 781: // process should be in a different user spe

RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
This change uses sed to change sun.hotspot.WhiteBox to jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to indirect inclusions of some of the test libraries, changing a few wasn't a reliable option, and I need the new one for a different change I was looking at. The non-sed c

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Leonid Mesnik
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-08 Thread Weijun Wang
Add null-checks in all `LoginModule` implementations. It's possible that an application calls `logout` after a login failure, where most internal variables for principals and credentials are null and removing a null from the `Subject`'s principals and credentials sets will trigger a `NullPointe

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-08 Thread Weijun Wang
On Fri, 1 Jul 2022 17:31:06 GMT, Weijun Wang wrote: > Add null-checks in all `LoginModule` implementations. It's possible that an > application calls `logout` after a login failure, where most internal > variables for principals and credentials are null and removing a null from > the `Subject`

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
> Some Kubernetes setups share the /tmp directory across multiple containers. > On rare occasions, the JVM may crash when it tries to write to > `/tmp/hsperfdata_/` when a process in a separate container decides > to do the same thing (because they happen to have the same namespaced pid). > > T

[jdk19] RFR: 8289951: ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64

2022-07-08 Thread Daniel D . Daugherty
A trivial fix to ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64. - Commit messages: - 8289951: ProblemList jdk/jfr/api/consumer/TestRecordingFileWrite.java on linux-x64 and macosx-x64 Changes: https://git.openjdk.org/jdk19/pull/123/files

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Thu, 7 Jul 2022 14:17:19 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @tstuefe comments > > src/hotspot/os/posix/perfMemory_posix.cpp line 708: > >> 706: fd = ::open(filename, O_RDONLY); >> 7

Re: RFR: 8289780: Avoid formatting stub names when Forte is not enabled [v2]

2022-07-08 Thread Coleen Phillimore
On Wed, 6 Jul 2022 19:09:09 GMT, Coleen Phillimore wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Do not remove Forte::register_stub as it is used on Linux as well > > src/hotspot/share/prims/forte.hpp line 32: > >> 3