1. Question
I run "crash_demo.run" by spawn-fcgi .
How to collect core file .
2. Background & Environment
I'm exolore C++ Web Programming .
- web-server : nginx
- CGI(FastCGI) : fastcgipp 3.0
- CGI Wrapper : spawn-fcgi
- I didn't use FCGI Wrap which ngifix supplied .
- I understand
FCGI Wrapbe drive by spawn-fcgi , Of course this is off topic .
- My c++ application . (be called
crash_demo) .
3. Step to reproduce exception
crash_demoinsert codethrow "test exception str, check _core_ file", build gotcrash_demo.run- run nginx :
sudo nginx -c my_nginx_custom.config ulimit -c unlimited- run
crash_demo.runbyspawn-fcgi:spawn-fcgi -a 127.0.0.1 -p 9000 -f /path/crash_demo.run - test the normal http request , and http request can be completed normally .
- test the
crash_demohttp request , got5xxresponse .- The directory where
crash_demo.runis located does not see thecorefile
- The directory where
My guess
corefile not generate .corefile is generated , but i don't the file path .
Does anyone know what happened?
Solution update
My question is flawed .
Thanks @sehe , my step :
- I read two webpage
- update my
/proc/sys/kernel/core_patterncore->core_%e_%p_%t
ulimit -c unlimitedspawn-fcgi -a 127.0.0.1 -p 9000 -f /path/crash_demo.runsudo find / core_ | grep core_crash_demo- result
/path/core_crash_demo._5080_1652169152
- result
So , my guess on my question is failed .
The fact is , I don't generate core file , when my question.
When my generated core file successed , the core file path is crash_demo.run parent directory .