RFR: 8072701: resume001 failed due to ERROR: timeout for waiting for a BreakpintEvent
Chris Plummer
cjplummer at openjdk.org
Wed Jul 10 23:11:54 UTC 2024
On Wed, 10 Jul 2024 22:29:08 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Removing log() statements to fix the problem can be risky because someone could re-add them in the future. What about my idea of doing a short sleep before the vm.suspend() to make sure the main thread has advanced to the pipe.readln(), and won't be doing any more log calls until it gets the next command from the debugger (which should be "quit").
>
> Adding a `sleep()` between two statements does not scale when the test in
> question is under different loads or run with different options. All it will do
> is make a hang more rare (and frustrating to analyze).
>
> We do use short sleeps when we are in a while-loop checking on a condition
> of some sort that indicates that the "thing" for which we are waiting to happen
> has happened.
I believe we've done quite a few short sleeps like this in the past. Scaling is not really an issue. It should only require at most a few ms, even with -Xcomp, so we wait 1000ms and then never have to think about the timing again. This test is ugly. Sometimes you have to fight ugly with ugly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20088#discussion_r1673154099
More information about the serviceability-dev
mailing list