Skip to content

Commit

Permalink
scripts/core-collector: Don't limit core dump collection
Browse files Browse the repository at this point in the history
We should gather the core regardless of the RLIMIT_CORE setting.
Also, don't limit number of parallel executions of the collector
in case more than 2 processes crashed (unlikely to happen anyway,
but just in case make sure we cover it). Lastly, wait a bit longer
for the potential cores.

Signed-off-by: Michal Berger <[email protected]>
Change-Id: Ic7de8f8000676122282469b729f45b235ab6f9ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10852
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Tomasz Zawadzki <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
  • Loading branch information
Michal Berger authored and tomzawadzki committed Jan 5, 2022
1 parent 5d49965 commit 89df50b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ if [ $(uname -s) = Linux ]; then
mkdir -p "$output_dir/coredumps"
# set core_pattern to a known value to avoid ABRT, systemd-coredump, etc.
echo "|$rootdir/scripts/core-collector.sh %P %s %t %c $output_dir/coredumps" > /proc/sys/kernel/core_pattern
echo 2 > /proc/sys/kernel/core_pipe_limit

# make sure nbd (network block device) driver is loaded if it is available
# this ensures that when tests need to use nbd, it will be fully initialized
Expand Down
3 changes: 0 additions & 3 deletions scripts/core-collector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ if ((rlimit == 0xffffffffffffffff || rlimit > max_core)); then
rlimit=$max_core
fi

# Nothing to do
((rlimit == 0)) && exit 0

# Clear path for lz
rm -f "$core"{,.{bin,bt,gz,json}}

Expand Down
4 changes: 2 additions & 2 deletions test/common/autotest_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,11 @@ function process_core() {
# to see if there's any core queued up for writing. We could check if
# collector is running and wait for it explicitly, but it doesn't seem
# to be worth the effort. So assume that if we are being called via
# trap, as in, when some error has occurred, wait up to 5s for any
# trap, as in, when some error has occurred, wait up to 10s for any
# potential cores. If we are called just for cleanup at the very end,
# don't wait since all the tests ended successfully, hence having any
# critical cores lying around is unlikely.
((autotest_es != 0)) && sleep 5
((autotest_es != 0)) && sleep 10

local coredumps core

Expand Down

0 comments on commit 89df50b

Please sign in to comment.