RFR: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

Andrew Haley-2
Temporary fix for race condition.

There's a narrow race condition in the code which generates LSE Atomic stubs and enables them for use by the runtime. DIsable LSE stub generation for now.

-------------

Commit messages:
 - Committed

Changes: https://git.openjdk.java.net/jdk/pull/2553/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2553&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261660
  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2553.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2553/head:pull/2553

PR: https://git.openjdk.java.net/jdk/pull/2553
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

Daniel D.Daugherty
On Fri, 12 Feb 2021 16:27:09 GMT, Andrew Haley <[hidden email]> wrote:

> Temporary fix for race condition.
>
> There's a narrow race condition in the code which generates LSE Atomic stubs and enables them for use by the runtime. DIsable LSE stub generation for now.

Looks okay, but I have to wonder if the rest of the template changes
in src/hotspot/os_cpu/linux_aarch64/atomic_linux_aarch64.hpp
that were made by https://bugs.openjdk.java.net/browse/JDK-8261027
also need to be backed out? Please clarify.

-------------

Changes requested by dcubed (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2553
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

Andrew Dinn-2
In reply to this post by Andrew Haley-2
On Fri, 12 Feb 2021 16:27:09 GMT, Andrew Haley <[hidden email]> wrote:

> Temporary fix for race condition.
>
> There's a narrow race condition in the code which generates LSE Atomic stubs and enables them for use by the runtime. DIsable LSE stub generation for now.

Yes, this will be fine for now until the code generation and update of the code pointers can be corrected to happen in the right order.

-------------

Marked as reviewed by adinn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2553
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

Daniel D.Daugherty
In reply to this post by Andrew Haley-2
On Fri, 12 Feb 2021 16:27:09 GMT, Andrew Haley <[hidden email]> wrote:

> Temporary fix for race condition.
>
> There's a narrow race condition in the code which generates LSE Atomic stubs and enables them for use by the runtime. DIsable LSE stub generation for now.

Thanks for the explanation. Thumbs up.

This is a trivial fix and does not have to wait for 24 hours.

-------------

Marked as reviewed by dcubed (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2553
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

Andrew Dinn-2
On Fri, 12 Feb 2021 16:55:01 GMT, Daniel D. Daugherty <[hidden email]> wrote:

>> Temporary fix for race condition.
>>
>> There's a narrow race condition in the code which generates LSE Atomic stubs and enables them for use by the runtime. DIsable LSE stub generation for now.
>
> Thanks for the explanation. Thumbs up.
>
> This is a trivial fix and does not have to wait for 24 hours.

@dcubed-ojdk A complete fix merely requires writing the generated stub code before updating the stub function pointers. With this change all that happens is that those pointers continue pointing to the default routines. There is no point backing out the rest of the code given that it will almost all be needed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2553
Reply | Threaded
Open this post in threaded view
|

Integrated: 8261660: AArch64: Race condition in stub code generation for LSE Atomics

Andrew Haley-2
In reply to this post by Andrew Haley-2
On Fri, 12 Feb 2021 16:27:09 GMT, Andrew Haley <[hidden email]> wrote:

> Temporary fix for race condition.
>
> There's a narrow race condition in the code which generates LSE Atomic stubs and enables them for use by the runtime. DIsable LSE stub generation for now.

This pull request has now been integrated.

Changeset: a305743c
Author:    Andrew Haley <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/a305743c
Stats:     2 lines in 1 file changed: 2 ins; 0 del; 0 mod

8261660: AArch64: Race condition in stub code generation for LSE Atomics

Reviewed-by: dcubed, adinn

-------------

PR: https://git.openjdk.java.net/jdk/pull/2553