X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=.travis.yml;h=0228fdc994dd769b5512c55a074dafd2dcffddd1;hb=f2b5583f6084c68cf1f46a1554db7ee3f0252ec1;hp=ba8a39f355c4ba0544643f7dd9900471bd98f81e;hpb=185fb7b77c4188dc882df8a15471d84f0ae74e57;p=rust.git diff --git a/.travis.yml b/.travis.yml index ba8a39f355c..0228fdc994d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,10 @@ sudo: required dist: trusty services: - docker +addons: + apt: + packages: + - gdb git: depth: 2 @@ -12,7 +16,7 @@ matrix: fast_finish: true include: # Images used in testing PR and try-build should be run first. - - env: IMAGE=x86_64-gnu-llvm-3.9 RUST_BACKTRACE=1 + - env: IMAGE=x86_64-gnu-llvm-5.0 RUST_BACKTRACE=1 if: type = pull_request OR branch = auto - env: IMAGE=dist-x86_64-linux DEPLOY=1 @@ -249,6 +253,8 @@ before_script: export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh"; else export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE"; + # Enable core dump on Linux. + sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'; fi # Log time information from this machine and an external machine for insight into possible @@ -274,6 +280,8 @@ after_failure: # Random attempt at debugging currently. Just poking around in here to see if # anything shows up. + + # Dump backtrace for macOS - ls -lat $HOME/Library/Logs/DiagnosticReports/ - find $HOME/Library/Logs/DiagnosticReports -type f @@ -284,8 +292,24 @@ after_failure: -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true + # Dump backtrace for Linux + - ln -s . checkout && + for CORE in obj/cores/core.*; do + EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); + if [ -f "$EXE" ]; then + printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; + gdb -q -c "$CORE" "$EXE" + -iex 'set auto-load off' + -iex 'dir src/' + -iex 'set sysroot .' + -ex bt + -ex q; + echo travis_fold":"end:crashlog; + fi; + done || true + # see #50887 - - head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true + - cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true # attempt to debug anything killed by the oom killer on linux, just to see if # it happened