gcore is a gdb command, that internally uses gdb to dump the core.
However with proper configuration of limits (core_dump.size_limit) it
should not be required, althought some issues is possible:
- non standard kernel.core_pattern
- sanitizers
So yes, gcore is more "universal" (you don't need to configure any
`kernel_pattern`), but it is ad-hoc, and it has drawbacks -
**it does not work when gdb fails**. For example gdb may fail with
`Dwarf Error: DW_FORM_strx1 found in non-DWO CU` in case of DWARF-5 [1].
[1]: https://github.com/ClickHouse/ClickHouse/pull/40772#issuecomment-1236331323.
Let's try to switch to more native way.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
After #39939 there is still an error:
+ dmesg -T
dmesg: read kernel buffer failed: Operation not permitted
[1]: https://s3.amazonaws.com/clickhouse-test-reports/39939/a1981f21a153810f072af67bb6007dc1f4367c22/stress_test__debug_.html
Since it is not allowed to access dmesg by default,
one of the following is required:
- --cap-add syslog
- --cap-add cap_sys_admin
- --privileged
I decided to use as little capabilities as possible, even though it is
not that important on CI, but it is a rule of thumb.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>