RFR: 8320515: assert(monitor->object_peek() != nullptr) failed: Owned monitors should not have a dead object [v8]

Stefan Karlsson stefank at openjdk.org
Tue Nov 28 07:41:13 UTC 2023


On Tue, 28 Nov 2023 05:34:39 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix indentation
>
> test/hotspot/jtreg/runtime/Monitor/MonitorWithDeadObjectTest.java line 88:
> 
>> 86:         // monitor with a dead object. The thread dumping code used to not
>> 87:         // tolerate such a monitor and would assert. Run a thread dump and make
>> 88:         // sure that it doesn't crash/assert.
> 
> The comment is not correct, the monitor will be unlocked by the time `createMonitorWithDeadObject` has returned. This post-dump is really just a sanity test.

All of these are sanity checks now that this PR fixes the bug.

This specific test was added because of the combinations of bugs I've seen and provoked by temporarily reinstating various combinations of the bugs. Specifically, if the detach code skips visiting monitors with dead objects, but the thread dumping code does. That is, the opposite of the currently proposed patch.

I'll update the comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1407339116


More information about the hotspot-dev mailing list