`dumb-init` swallows SegFault error logs from NodeJS
tchupp opened this issue · 4 comments
tchupp commented
Pretty much the title!
I haven't investigated other languages, as NodeJS has a relatively easy reproducible example. I imagine whatever is running inside dumb-init
is less important here anyways.
Minimum Small reproducible example
$ docker run --rm -it --entrypoint /bin/sh node:18-alpine3.15
> cd
> apk add python3 python2 libexecinfo libexecinfo-dev g++ make vim dumb-init
> npm install node-segfault-handler
> vim index.js
let segfaultHandler = require('node-segfault-handler');
segfaultHandler.segfault();
> echo "enough setup already!"
...
> node index.js
Segmentation fault (core dumped)
> echo $?
139
> dumb-init node index.js
> echo $?
139
> node index.js
Segmentation fault (core dumped)
> dumb-init node index.js
asottile commented
the shell is printing that, this has nothing to do with dumb-init
tchupp commented
Do you mind elaborating a little bit?
asottile commented
your shell is printing "Segmentation fault (core dumped)" -- for example try:
$ python3 -c "import subprocess; print(subprocess.call(('node', 'index.js')))"
-11
tchupp commented
Ah, interesting! So the monitor in the shell that prints "Segmentation faul (core dumped)" isn't basing that on the exit code then.
Thank you for pointing me in the right direction 😁 I found more info here that helped me understand what was going on: https://martin.uy/blog/who-prints-core-dumped-after-a-segmentation-fault/