Skip to content

Conversation

@OCHyams
Copy link
Contributor

@OCHyams OCHyams commented Sep 9, 2025

Note the first commit in this PR includes a revert which I'll push before landing this.


Buildbot cross-project-tests-sie-ubuntu has been unstable recently
(https://lab.llvm.org/buildbot/#/builders/181).

Dexter uses lldb-dap in these tests. Occasionally a one will fail with a
KeyError because of a missing "stackFrames" "source" "path".

I can't reproduce the failure locally, but with #157130 and #157145 I've got DAP
logs from a pass and fail.

In a failure, "path" is missing for a step out of main (off the final brace),
and the passing test has one additional "module" event for libc.so.6.

<- {
  "body": {
    "module": {
      "addressRange": "0x7ffff7dd1000",
      "debugInfoSize": "4.9MB",
      "id": "5792732F-7831-58C6-6FB4-F3756458CA24-E46E827D",
      "name": "libc.so.6",
      "path": "/lib/x86_64-linux-gnu/libc.so.6",
      "symbolFilePath": "/usr/lib/debug/.build-id/57/92732f783158c66fb4f3756458ca24e46e827d.debug",
      "symbolStatus": "Symbols loaded."
    },
    "reason": "new"
  },
  "event": "module",
  "seq": 0,
  "type": "event"
}

That explains why we get a step that is missing a "path" component in the
failure. I don't understand why LLDB (or LLDB-DAP) is sometimes unable to load
the module (in time?). But "path" is an optional field anyway, so I think it's
worth handling in dexter even if LLDB's behaviour here is confusing.

This commit should stabilize the bot if the only time a module goes missing
is for steps outside main. (Ideally none would go missing, but those shouldn't
interfere with the tests).

@OCHyams OCHyams requested review from SLTozer, dyung and jmorse September 9, 2025 12:49
@github-actions
Copy link

github-actions bot commented Sep 9, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@OCHyams OCHyams requested a review from JDevlieghere September 9, 2025 13:10
@OCHyams
Copy link
Contributor Author

OCHyams commented Sep 9, 2025

@JDevlieghere do you know if there is someone that might be able to help me understand why we're seeing this output from lldb-dap?

To clarify, the KeyError I mentioned is in dexter, but the important question and part I don't understand is why lldb-dap occasionally (1 in 15 buildbot runs) doesn't give us a "module" event (for libc.so.6) that it otherwise usually does.

Copy link
Contributor

@SLTozer SLTozer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to fix the buildbots and remove the temp code, though a clearer idea of why we don't have the modules available (and more importantly whether Dexter can fix that) would be good in the longer term.

Buildbot cross-project-tests-sie-ubuntu has been unstable recently
(https://lab.llvm.org/buildbot/#/builders/181).

Dexter uses lldb-dap in these tests. Occasionally a one will fail with a
KeyError because of a missing "stackFrames" "source" "path".

I can't reproduce the failure locally, but with llvm#157130 and llvm#157130 I've got DAP
logs from a pass and fail.

In a failure, "path" is missing for a step out of main (off the final brace),
and the passing test has one additional "module" event for libc.so.6.

```
<- {
  "body": {
    "module": {
      "addressRange": "0x7ffff7dd1000",
      "debugInfoSize": "4.9MB",
      "id": "5792732F-7831-58C6-6FB4-F3756458CA24-E46E827D",
      "name": "libc.so.6",
      "path": "/lib/x86_64-linux-gnu/libc.so.6",
      "symbolFilePath": "/usr/lib/debug/.build-id/57/92732f783158c66fb4f3756458ca24e46e827d.debug",
      "symbolStatus": "Symbols loaded."
    },
    "reason": "new"
  },
  "event": "module",
  "seq": 0,
  "type": "event"
}
```

That explains why we get a step that is missing a "path" component in the
failure. I don't understand why LLDB (or LLDB-DAP) is sometimes unable to load
the module (in time?). But "path" is an optional field anyway, so I think it's
worth handling in dexter even if LLDB's behaviour here is confusing.
@OCHyams OCHyams enabled auto-merge (squash) September 9, 2025 14:34
@OCHyams OCHyams merged commit 97820be into llvm:main Sep 9, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants