+7
−6
+59
−121
Loading
Instead of telling kernel to pipe cores through it, pick them from a location saved as a pattern at the very end. This is done for couple of reasons: - containers: when kernel is told to pipe cores to a helper, it executes it from the main namespace, rather than the namespace of the crashing process (i.e. container's namespace). This means that unless our core-collector is set on the host's side + there's extra logic of rerouting cores to the target container, (e.g. https://review.spdk.io/c/spdk/spdk/+/24919 ) we are not able to catch these cores at all in tests. Using simple core pattern fixes this since in this case kernel will always write core inside the namespace of the crashing process. - selinux: current spdk-ci uses fedora imaging with selinux running in enforcing mode. Default set of policies under fedora restricts binaries from running as a kernel helper (i.e. bash which execute our collector) rendering our collector useless. The disadvantages to this change are minimal and resolve mainly around lack of access to procfs entry of the crashing process at the time of writing the core - this info was not that useful in a first place and it wasn't something that can't be extracted from the actual core. Change-Id: Ib2de14407add1f74450d294ba2ec329d0c6fe6fb Signed-off-by:Michal Berger <michal.berger@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26084 Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Tomasz Zawadzki <tomasz@tzawadzki.com> Reviewed-by:
Jacek Kalwas <jacek.kalwas@nutanix.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>