Integrated: 8294075: gtest/AsyncLogGtest crashes with SEGV
Xin Liu
xliu at openjdk.org
Thu Sep 22 16:41:05 UTC 2022
On Wed, 21 Sep 2022 02:34:03 GMT, Xin Liu <xliu at openjdk.org> wrote:
> In order to test "drop messages scenario", I replace the serving buffers with shrunk buffers(1k).
> This is done by RAII class 'AsyncLogWriter::BufferUpdater'. There is a race condition between test and AsyncLog thread.
> The race condition exhibits when AsyncLog thread is still processing `buffer_staging` but test thread deletes it in dtor of BufferUpdater.
>
> This patch issues AsyncLogWriter::flush() before dtor of BufferUpdater. buffers are reverted only when pending messages have all been handled.
>
> I test TEST="jtreg:hotspot/jtreg/gtest/AsyncLogGtest.java" 100 times and never see race condition.
This pull request has now been integrated.
Changeset: 5285035e
Author: Xin Liu <xliu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5285035ed9bb43a40108e4d046e0de317730f193
Stats: 9 lines in 1 file changed: 4 ins; 0 del; 5 mod
8294075: gtest/AsyncLogGtest crashes with SEGV
Reviewed-by: dholmes, shade
-------------
PR: https://git.openjdk.org/jdk/pull/10367
More information about the hotspot-runtime-dev
mailing list