-
Notifications
You must be signed in to change notification settings - Fork 19
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
Capture core files from GHA #129
Comments
The Ubuntu default is not systemd-coredump, it is apport.
There might be some value in working with it. It probably can automatically generate stacktrace without having to fetch the file... On the other hand, we can run gdb ourselves as a step in pipeline, so it is no great deal. |
Useful testing command
|
…archive backtraces
…archive backtraces
…printing stacktrace)
…archive backtraces
…archive backtraces
Easiest solution to get traces would be to run all executables under gdb, the way @ssorj once recommended
The difficulty is in Leak Sanitizer being unable to work when there is another program ptracing the process. That can be workarounded by a gdb script that breaks when lsan is starting and detaches gdb. See https://stackoverflow.com/questions/71366407/can-addresssanitizer-be-induced-to-dump-a-stracktrace-upon-abort-or-general/71369893#71369893 for the idea of this solution. It is possible to get Address Sanitizer itself to handle SIGABRT and produce a stacktrace, but it is apparently not reliable. In the one instance where I hoped it would help (crash in c-benchmarks in #2) the sanitizer reported internal error and produced no stacktrace. One advantage of coredumping is that it automatically gets stacktrace of a child process; with gdb, only the parent (or only the forked child, depending on gdb settings) will be traced). This is not really relevant for dispatch tests as a whole, though. The linked PR takes the coredumping route. For completeness, it should probably also locate and archive all shared libraries the binary uses... I am not going to do that, because hopefully the stacktrace will be enough, and if not, the libraries can be recovered by recreating the environment in docker. See openthread/openthread#5861 for a project which implemented the libraries archival. |
…archive backtraces
…archive backtraces
…printing stacktrace)
There is a feeble attempt to upload files with
core
in their name, but that does not actually ever get any core files.https://github.com/skupperproject/skupper-router/runs/5428604821?check_suite_focus=true#step:9:2719
It is likely that
coredumpctl
has to be used. That might interact with Docker in some way... Also, ASAN and TSAN binaries reserve massive amounts of virtual memory (20 TB or so) which may end up disabling core file dumping.Would be best to create a branch, on the branch intentionally create a crashing binary that produces coredump quickly and then investigate methods of getting the coredump uploaded.
The text was updated successfully, but these errors were encountered: