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 Wrap
be drive by spawn-fcgi , Of course this is off topic .
- My c application . (be called
crash_demo
) .
3. Step to reproduce exception
crash_demo
insert 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.run
byspawn-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_demo
http request , got5xx
response .- The directory where
crash_demo.run
is located does not see thecore
file
- The directory where
My guess
core
file not generate .core
file is generated , but i don't the file path .
Does anyone know what happened?
Myself update
My question is flawed .
Thanks @sehe , my step :
- I read two webpage
- update my
/proc/sys/kernel/core_pattern
core
->core_%e_%p_%t
ulimit -c unlimited
spawn-fcgi -a 127.0.0.1 -p 9000 -f /path/crash_demo.run
sudo 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 .
CodePudding user response:
This question is probably more for askubuntu.com or serverfault.stackexchange.com.
You likely need to configure core dump. Since we don't know the platform, I'm assuming likely a Linux. See e.g. core(5):
There are various circumstances in which a core dump file is not produced
In my experience what's required is setting a core pattern (/proc/sys/kernel/core_pattern
)