Skip to content

test: DAPReverseDebuggingSessionTest.testAStopWhichTheDAPServerSendsBeforeItAnswersReverseContinueShowsTheThreadStopped failed once on Windows #2320

Done

Description

@lagergren

What happened

DAPReverseDebuggingSessionTest.testAStopWhichTheDAPServerSendsBeforeItAnswersReverseContinueShowsTheThreadStopped
failed once, on Windows, in CI of #2319 (job,
IntelliJ IDEA Community 2024.2), after 2 minutes:

java.lang.AssertionError: the session is suspended where the program stopped running backwards, in the frame 2
    at com.redhat.devtools.lsp4ij.dap.stepping.DAPReverseDebuggingSessionTest.waitUntilStoppedAt(DAPReverseDebuggingSessionTest.java:299)

The DAP server sends its stopped event before it answers reverseContinue. The test then waits for the session to be
suspended in frame 2, and it never was.

Context:

Next

Find which order of events leaves the session not suspended in frame 2:

  • the stop that arrives before the answer to reverseContinue;
  • the end of the execution epoch;
  • the refresh of the frames.

Then decide whether LSP4IJ or the test is wrong.

Activity

  1. added
    dap
    on Nov 27, 2026
  2. lagergren commented on Nov 27, 2026

    @lagergren
    CollaboratorAuthor

    Cause, from the investigation in the fix's PR: Reverse Continue, Step Back and Reset Frame resume the session themselves once the debug adapter answers. That answer is handled on the EDT, not on LSP4J's thread, whenever it arrives before the EDT has chained its handler to the request. With the test's adapter, which sends stopped before its answer, the EDT could find the session still at the old stop and resume it, just as the stopped event suspended it at the new stop on a pool thread. That undid the stop, so the session showed the program running and never suspended again. The fix leaves the session alone once the adapter has said the program stopped or continued since the request, which the execution epoch tells. A new test forces that order, and fails without the fix.

  3. added this to the 0.30.2 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dapjunit-test

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions