I run "crash_demo.run"
by spawn-fcgi
.
How to collect core
file .
I'm exolore C++ Web Programming .
FCGI Wrap
be drive by spawn-fcgi , Of course this is off topic .crash_demo
) .crash_demo
insert code throw "test exception str, check _core_ file"
, build got crash_demo.run
sudo nginx -c my_nginx_custom.config
ulimit -c unlimited
crash_demo.run
by spawn-fcgi
: spawn-fcgi -a 127.0.0.1 -p 9000 -f /path/crash_demo.run
crash_demo
http request , got 5xx
response .
crash_demo.run
is located does not see the core
fileMy guess
core
file not generate .core
file is generated , but i don't the file path .Does anyone know what happened?
My question is flawed .
Thanks @sehe , my step :
/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
/path/core_crash_demo._5080_1652169152
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 .
we whant to know two point :
Reference the file : core manual
core manual write many point , I just list the point i care :
ulimit -a
check limit / ulimit -c unlimited
cancel limit/proc/sys/kernel/core_pattern
core
core_%e_%p_%t
mean core_your_execute_file_name_pid_timestemp
sudo bash -c 'echo core_%e_%p_%t > /proc/sys/kernel/core_pattern'
now run your exception , you can got core file .
sudo find / core_ | grep core_
launch.json
, add coreDumpPath
, refrence : https://code.visualstudio.com/docs/cpp/cpp-debug#_memory-dump-debuggingThis 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
)