RFR: 8345181: (ch) Windows asynchronous channels may return temporary direct buffers to the buffer cache twice (win)
Brian Burkhalter
bpb at openjdk.org
Wed Dec 4 19:28:41 UTC 2024
On Wed, 4 Dec 2024 18:36:40 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Due to operations on different threads, the Windows asynchronous channels might try to return the same buffer to the temporary direct buffer cache twice resulting in an attempt to free the same address more than once. This was not a problem before #22339 was integrated, as previously a cleaner had been used to free temporary buffers, and the cleaner did not permit duplicative freeing of the same memory. This change introduces checks in the Windows asynchronous channels to prevent duplicative returns of a buffer to the cache.
In further testing, with this change, CI test tiers 1-3 and 300 repeats of the subset of tests where the failure was observed passed on Windows.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22554#issuecomment-2518379243
More information about the nio-dev
mailing list