@@ -3,6 +3,10 @@ sudo: required
3
3
dist : trusty
4
4
services :
5
5
- docker
6
+ addons :
7
+ apt :
8
+ packages :
9
+ - gdb
6
10
7
11
git :
8
12
depth : 2
@@ -249,6 +253,8 @@ before_script:
249
253
export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
250
254
else
251
255
export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
256
+ # Enable core dump on Linux.
257
+ sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
252
258
fi
253
259
254
260
# Log time information from this machine and an external machine for insight into possible
@@ -274,6 +280,8 @@ after_failure:
274
280
275
281
# Random attempt at debugging currently. Just poking around in here to see if
276
282
# anything shows up.
283
+
284
+ # Dump backtrace for macOS
277
285
- ls -lat $HOME/Library/Logs/DiagnosticReports/
278
286
- find $HOME/Library/Logs/DiagnosticReports
279
287
-type f
@@ -284,8 +292,24 @@ after_failure:
284
292
-exec head -750 {} \;
285
293
-exec echo travis_fold":"end:crashlog \; || true
286
294
295
+ # Dump backtrace for Linux
296
+ - ln -s . checkout &&
297
+ for CORE in obj/cores/core.*; do
298
+ EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|');
299
+ if [ -f "$EXE" ]; then
300
+ printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE";
301
+ gdb -q -c "$CORE" "$EXE"
302
+ -iex 'set auto-load off'
303
+ -iex 'dir src/'
304
+ -iex 'set sysroot .'
305
+ -ex bt
306
+ -ex q;
307
+ echo travis_fold":"end:crashlog;
308
+ fi;
309
+ done || true
310
+
287
311
# see #50887
288
- - head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
312
+ - cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
289
313
290
314
# attempt to debug anything killed by the oom killer on linux, just to see if
291
315
# it happened
0 commit comments