This is an archive of the discontinued LLVM Phabricator instance.

Add an llvm::report_fatal_error for when the darwin kernel says we've finished an insn-step but the thread doesn't think it was insn-stepping
ClosedPublic

Authored by jasonmolenda on Jun 15 2023, 2:51 PM.

Details

Summary

We have some failures on an arm64 CI bot where the kernel has told us that we've completed an instruction step, but when lldb checks to confirm that the thread was performing an instruction step, it is not. The debugger doesn't know how this could happen, so it stops at that point and notifies the user that there has been an anomalous occurrence (calls it an "EXC_ARM_BREAKPOINT"). Fine, but under the testsuite this will cause a testsuite failure.

This adds an llvm::report_fatal_error when not built NDEBUG if this state happens, and include two additional pieces of information in the error message to help debug what the CI bot is hitting. I'll change this to an assert without the additional information later, so it's more assertively erroring in development builds if this combination of events happens again. But I can't dynamically construct a string for an assert and have it dumped, so I'm using fatal error to debug the CI bot.

Diff Detail

Event Timeline

jasonmolenda created this revision.Jun 15 2023, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 2:51 PM
jasonmolenda requested review of this revision.Jun 15 2023, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 2:51 PM
jingham accepted this revision.Jun 15 2023, 3:26 PM

LGTM. Let's see if we can get this to actually trap the concurrent test failures.

This revision is now accepted and ready to land.Jun 15 2023, 3:26 PM