-
Notifications
You must be signed in to change notification settings - Fork 271
Description
I've posted this question in the internals forum, but I'm opening an issue here to help you track it directly.
backtrace-rs
may try to load debug symbols from an external file, which is usually very nice, but it causes problems in more complex deployments:
-
It tries to open and mmap the files, which doesn't work when the program is sandboxed. I can make the sandboxed program ask for the right file, but I can't just make
open
work. For example, seccomp can't deny/allow access based on paths, but can allow pre-opening a file descriptor before denying all other filesystem access. It also means that I need to configure seccomp to be softer and gracefully deny access withEPERM
rather than kill the process immediately when it tries to callopen
, as otherwise panics would get the process killed before it had a chance to print the backtrace. -
The debug symbols can be large. I have servers that intentionally don't have any local disks, and only run off a RAM-based filesystem, but this means that disk space is precious. Keeping debug symbol files on disk just in case a server panics is wasteful. I have a debug symbol server which allows fetching symbols on demand over HTTP, so I'd prefer to fetch them lazily.
Would it be possible to add some sort of hook to give control over obtaining of the debug symbols?