Open Kemel91 opened 1 week ago
Are you getting coredumps? (might not be enabled)
I would really like to see a backtrace from one
$ gdb /path/to/unitd /path/to/coredump
(gdb) bt full
Or if your running systemd then it may be intercepting the core dumps,
$ coredumpctl
If that shows a list, good stuff
$ coredumpctl gdb
Will launch gdb on the most recent coredump...
Are you getting coredumps? (might not be enabled)
I would really like to see a backtrace from one
$ gdb /path/to/unitd /path/to/coredump (gdb) bt full
Or if your running systemd then it may be intercepting the core dumps,
$ coredumpctl
If that shows a list, good stuff
$ coredumpctl gdb
Will launch gdb on the most recent coredump...
How I can enable coredumps in unitd processes? I can't find anything in doc this info, about enabling coredumps in unitd. How i can do this in docker container?
Not really a Unit specific thing...
In the container what does
$ cat /proc/sys/kernel/core_pattern
return?
When unit is running what does
$ cat /proc/`pidof -s unitd`/limits
show?
Not really a Unit specific thing...
In the container what does
$ cat /proc/sys/kernel/core_pattern
return?
When unit is running what does
$ cat /proc/`pidof -s unitd`/limits
show?
cat /proc/sys/kernel/core_pattern /tmp/core
cat /proc/pidof -s unitd
/limits:|
Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size unlimited unlimited bytes Max resident set unlimited unlimited bytes Max processes 1048576 1048576 processes Max open files 1048576 1048576 files Max locked memory 8388608 8388608 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 1030780 1030780 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us
OK, so according to that you should be betting core dumps in /tmp/ named core
or possibly core.pid
(depending on the setting of /proc/sys/kernel/core_uses_pid). See anything there?
If you find a core file. You can do
$ gdb /path/to/uniid /path/to/corefile
(gdb) bt full
"Might need to press 'c' to get the full thing"
Alternatively if you are able to create a minimal reproducer...
If you find a core file. You can do
$ gdb /path/to/uniid /path/to/corefile (gdb) bt full "Might need to press 'c' to get the full thing"
Alternatively if you are able to create a minimal reproducer...
Thanks for the answer. Another question, are dumps uploaded only when a unitd crashes or can they be uploaded when some process crashes?
Coredumps are a standard UNIX (and other OS's) feature and will generally be generated for any processes that crash, or when receiving a signal whose default action is to coredump, (SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGQUIT, SIGSEGV, SIGSYS, SIGTRAP, SIGXCPU, SIGXFSZ).
You can also force a running process to coredump via gcore(1)
For some reason, error 503 appears periodically, and after that it does not go away until the next restart of the container, what could be the problem? Logs:
There is more than 100 GB of free RAM on the server, there are no restrictions in the container. Unit config:
PHP 8.3 unit version: 1.32.1 PHP ini memory limit increased to 10 GB.