Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to capture panics with GDB #690

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Attempt to capture panics with GDB #690

merged 1 commit into from
Dec 4, 2024

Conversation

rslawson
Copy link
Collaborator

@rslawson rslawson commented Dec 3, 2024

There's still some issues here, e.g. it seems like the maximum stack trace depth on a panic is 2 no matter what I try, but otherwise it seems to have reduced the number of times the TCP test fails (likely by replacing start with continue in the GDB script). Otherwise, this PR:

  • Introduces a new crate to firmware-support that provides a method that GDB can break on (though it should preferentially break on core::panicking::panic or rust_begin_unwind for the time being) in order to grab a backtrace of the program and exit.
  • Changes how the TCP test is started.
  • Attempts to force Rust to build the TCP test with frame pointers preserved and unwind tables (unsure if this is actually working).

Comment on lines 8 to 11
"-C", "target-feature=+f",
"-C", "force-frame-pointers=yes",
"-C", "force-unwind-tables=yes"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add an XXX: Seem to be ignored?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, can do.

Copy link
Contributor

@martijnbastiaan martijnbastiaan Dec 3, 2024

Choose a reason for hiding this comment

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

Wait the other flags also seem to be ignored right? When we add gooblygook there, we don't get any warnings or errors.

@rslawson rslawson merged commit 587bf58 into staging Dec 4, 2024
28 checks passed
@rslawson rslawson deleted the rs/gdbTrace branch December 4, 2024 08:17
@rslawson rslawson mentioned this pull request Dec 4, 2024
martijnbastiaan added a commit that referenced this pull request Dec 4, 2024
We think #690 fixed our
nightly issues. At the very least, we cannot reproduce it locally
anymore. However, we've also seen that nightly fails more often than
local runs, so we'll run nightly a bunch of times in the coming days to
see if we've actually fixed things.
martijnbastiaan added a commit that referenced this pull request Dec 4, 2024
We think #690 fixed our
nightly issues. At the very least, we cannot reproduce it locally
anymore. However, we've also seen that nightly fails more often than
local runs, so we'll run nightly a bunch of times in the coming days to
see if we've actually fixed things.
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