swift-backtrace: Symbols missing for parts of the stack
First of all, thank you for creating this! Having stack traces on Linux would be tremendously useful.
Unfortunately, only parts of the stack trace are being currently symbolicated:
/Run(+0x497bbf) [0x556ef41d6bbf]
/Run(+0x497439) [0x556ef41d6439]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7f1b9e1c2330]
/Run(+0x7ed4b1) [0x556ef452c4b1]
/Run(+0x7fd62e) [0x556ef453c62e]
/Run(+0x7fd343) [0x556ef453c343]
/Run($S8NIOHTTP211HTTP2ParserC11channelRead3ctx4datay3NIO21ChannelHandlerContextC_AG6NIOAnyVtF+0x4e1) [0x556ef4523171]
/Run(+0x7e7af9) [0x556ef4526af9]
/Run(+0x71b95b) [0x556ef445a95b]
/Run(+0x78b878) [0x556ef44ca878]
/Run(+0x7439b7) [0x556ef44829b7]
/Run(+0x73bb96) [0x556ef447ab96]
/Run(+0x74782c) [0x556ef448682c]
/Run(+0x782c03) [0x556ef44c1c03]
/Run(+0x73b760) [0x556ef447a760]
/Run(+0x73d555) [0x556ef447c555]
/Run(+0x7477f9) [0x556ef44867f9]
/Run(+0x747814) [0x556ef4486814]
/Run(+0x79635f) [0x556ef44d535f]
/Run(+0x7963a9) [0x556ef44d53a9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8184) [0x7f1b9e1ba184]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f1b9c72a03d]
My swift build command looks like this:
RUN swift build -c $config --product Run -Xcc -g -Xswiftc -g -Xlinker --export-dynamic
(The last option was mentioned at https://github.com/nodes-vapor/stacked#exporting-symbols-for-the-stracktracesl, and I added the cc option in case the symbols were actually in a C-based library.)
I could try using https://github.com/norio-nomura/SwiftBacktrace or https://github.com/nodes-vapor/stacked instead, but first wanted to ask for ideas of what could be the culprit.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
Thank you for the elaboration. For now I need symbolicated backtraces right at the point of logging to have these parsed by my cloud provider, so I’ll need to stick with https://github.com/norio-nomura/SwiftBacktrace. I can imagine that the bash one-liner will be sufficient for many use cases, however.
Yes, totally agree. It’s a bit of a pain. Definitely something the SSWG should tackle probably.
Thanks! I guess that would work; the only problem is that my stack traces occur inside Docker containers and it would be awesome to have these print the symbolicated stack trace right after the crash instead of having to do that manually later on. Not a high priority for me, though, as it looks like I fixed my last remaining crash in production by now 😉