Skip to content

Log ulimit and related values for test failures #46511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion eng/testing/RunnerTemplate.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like you're changing the file permissions, is that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged with other PR


usage()
{
Expand Down Expand Up @@ -134,6 +134,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
if [[ ! -d "/cores" || ! "$(ls -A /cores)" ]]; then
ulimit -c unlimited
fi

elif [ "$(uname -s)" == "Linux" ]; then
# On Linux, we'll enable core file generation unconditionally, and if a dump
# is generated, we will print some useful information from it and delete the
Expand Down Expand Up @@ -169,6 +170,11 @@ fi

# ======================= BEGIN Core File Inspection =========================
pushd $EXECUTION_DIR >/dev/null

if [[ $test_exitcode -ne 0 ]]; then
echo ulimit -c value: $(ulimit -c)
fi

if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then
have_sleep=$(which sleep)
Expand All @@ -177,7 +183,13 @@ if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
sleep 10s
fi
fi

echo cat /proc/sys/kernel/core_pattern: $(cat /proc/sys/kernel/core_pattern)
echo cat /proc/sys/kernel/core_uses_pid: $(cat /proc/sys/kernel/core_uses_pid)
echo cat /proc/sys/kernel/coredump_filter: $(cat /proc/sys/kernel/coredump_filter)

echo Looking around for any Linux dump..

# Depending on distro/configuration, the core files may either be named "core"
# or "core.<PID>" by default. We read /proc/sys/kernel/core_uses_pid to
# determine which it is.
Expand Down Expand Up @@ -211,3 +223,4 @@ if [ "$test_exitcode" == "1" ]; then
else
exit $test_exitcode
fi