-
Notifications
You must be signed in to change notification settings - Fork 40
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
set GOTRACEBACK=crash when running cockroach #2088
Conversation
Should we priority boost #1597 ? Is this ultimately the sled agent's job? |
I do think this is critical for MVP. It's valuable as soon as it can be done. I'm not sure whether it's urgent enough to displace other work.
Will move this to #1597. |
Also just to be clear this PR is not in any way blocked on #1597. |
let mut env_overrides = BTreeMap::new(); | ||
env_overrides.insert("GOTRACEBACK", "bogus"); | ||
env_overrides.insert("OMICRON_DUMMY", "dummy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, can we declare this first, and use it to call builder.env
? Just to "set the values once"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e71b56b.
By default, when Go encounters a fatal runtime error, it dumps some state (some Goroutine stack traces) and exits the process with a non-zero status code. It'd be nice to get core files for these fatal failures. Such core files proved invaluable for debugging #1146 and friends. Go provides a mechanism to dump core on fatal failures by setting
GOTRACEBACK=crash
in the environment. This causes it to dump its state like normal and then raiseSIGABRT
. This is how I generated most of the core files that I used to debug those issues.Getting a core file also requires having configured
coreadm
properly and potentially updatingulimit -c
. These are properties of the developer's environment and I think we should not take ownership of these. In production, I assume we have already configured them or will do so.There are two places where this needs to be changed:
omicron-dev db-run
developer toolThis change:
cockroach
process-- I'm using
pargs -e PID
to get the environment of the child process)cockroach version