RFR: 8366659: ObjectMonitor::wait() can deadlock with a suspension request [v17]

Anton Artemov aartemov at openjdk.org
Fri Nov 21 09:15:40 UTC 2025


On Fri, 21 Nov 2025 07:56:29 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8366659: Fixed whitespace error.
>
> I'm looking at the  two new tests scenarios. They look non-real and very artificial because the application plays a role of the debugger at the same time and constructs the artificial deadlocks. The threads sync on an application lock, one of them suspends and another resumes the target thread. These deadlocks are impossible to have with any normal debugger which is decoupled from application it is debugging.
> Sorry for saying it but it feels like there is no sense to fix this artificial issue.

Thanks @sspitsyn for diving into the issue. 

With that definition of the deadlock and suspension logic I agree that it might not be a problem at all. With this being said, is the existing test `SuspendWithObjectMonitorWait` demonstrating a real-world scenario? @dcubed-ojdk, what do you think?

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

PR Comment: https://git.openjdk.org/jdk/pull/27040#issuecomment-3562088599


More information about the serviceability-dev mailing list