uwsgi
uwsgi copied to clipboard
backtraces are not printed when running under Alpine Linux
Alpine: 3.5.2 uWSGI 2.0.14
I'm experiencing a segfault issue with uwsgi running inside of Alpine, and no matter what I do I can't get ANY backtrace to be printed. I've tested this by installing the same uwsgi configuration into unbuntu and forcing a segfault (kill -SIGSEGV
Poking around in the code, I think it's related to this line: https://github.com/unbit/uwsgi/blob/bc536ee62b34fe01f3a8ef2c9e9a502c78d18c06/core/uwsgi.c#L1886
I'm guessing the lack of GLIBC is the root cause. Not knowing a lot about c, would it be possible to update this to support musl libc as well for printing backtraces?
Thx
It looks like musl doesn't provide execinfo.h which is a requirement for that code.
Doing a little googling it appears that other projects have implemented "libunwind" as an alternative for backtrace functionality when running under Alpine/musl.
http://www.nongnu.org/libunwind/
@jbehrends you are very welcome to open a PR or sponsor someone to do the work :)
Any solution to this problem? uWSGI raises segmentation error while using Apline but It's impossible to find the root of the problem without the backtrace.
I took a look at the aformentioned libunwind, but I couldn't find any description how that can help.
So do you have any exact solution to catch the backtrace or write it into a log file under Alpine?