Skip to content

Commit f640d32

Browse files
authored
log ulimit (#46511)
1 parent 0e951b1 commit f640d32

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

eng/testing/RunnerTemplate.sh

100755100644
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash
22

33
usage()
44
{
@@ -134,6 +134,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
134134
if [[ ! -d "/cores" || ! "$(ls -A /cores)" ]]; then
135135
ulimit -c unlimited
136136
fi
137+
137138
elif [ "$(uname -s)" == "Linux" ]; then
138139
# On Linux, we'll enable core file generation unconditionally, and if a dump
139140
# is generated, we will print some useful information from it and delete the
@@ -169,6 +170,11 @@ fi
169170

170171
# ======================= BEGIN Core File Inspection =========================
171172
pushd $EXECUTION_DIR >/dev/null
173+
174+
if [[ $test_exitcode -ne 0 ]]; then
175+
echo ulimit -c value: $(ulimit -c)
176+
fi
177+
172178
if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
173179
if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then
174180
have_sleep=$(which sleep)
@@ -177,7 +183,13 @@ if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
177183
sleep 10s
178184
fi
179185
fi
186+
187+
echo cat /proc/sys/kernel/core_pattern: $(cat /proc/sys/kernel/core_pattern)
188+
echo cat /proc/sys/kernel/core_uses_pid: $(cat /proc/sys/kernel/core_uses_pid)
189+
echo cat /proc/sys/kernel/coredump_filter: $(cat /proc/sys/kernel/coredump_filter)
190+
180191
echo Looking around for any Linux dump..
192+
181193
# Depending on distro/configuration, the core files may either be named "core"
182194
# or "core.<PID>" by default. We read /proc/sys/kernel/core_uses_pid to
183195
# determine which it is.
@@ -211,3 +223,4 @@ if [ "$test_exitcode" == "1" ]; then
211223
else
212224
exit $test_exitcode
213225
fi
226+

0 commit comments

Comments
 (0)