From: Peter Rabbitson Date: Sun, 5 Oct 2014 14:51:47 +0000 (+0200) Subject: (travis) Better diagnostics on *why* a build failed, reduce parellelism X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac4e80df;hp=afeb40d23677e897d27b843b8d976d7c8945e6ce;p=dbsrgits%2FDBIx-Class.git (travis) Better diagnostics on *why* a build failed, reduce parellelism This commit resulted in https://github.com/travis-ci/travis-ci/issues/2904 To mitigate run everything under 10 (not 32, not even 16) threads, hope things will be allright. Although the real fix would be to 1) get the above mentioned issue on travis fixed and 2) tuning the rdbms daemons to eat less memory (both of these options are problematic). The diags are *indispensable* when travis wakes up the OOMKiller As a bonus add getstatus to all subshells for even better idea wtf just went wrong --- diff --git a/.travis.yml b/.travis.yml index cc065f1..d68a13d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -254,24 +254,27 @@ install: before_script: # Preinstall/install deps based on envvars/CLEANTEST # - - maint/travis-ci_scripts/30_before_script.bash + # need to invoke the after_failure script manually + # because 'after_failure' runs only after 'script' fails + # + - maint/getstatus maint/travis-ci_scripts/30_before_script.bash || ( maint/travis-ci_scripts/50_after_failure.bash && /bin/false ) script: # Run actual tests # - - maint/travis-ci_scripts/40_script.bash + - maint/getstatus maint/travis-ci_scripts/40_script.bash after_success: # Check if we can assemble a dist properly if not in CLEANTEST # - - maint/travis-ci_scripts/50_after_success.bash + - maint/getstatus maint/travis-ci_scripts/50_after_success.bash after_failure: - # No tasks yet + # Final sysinfo printout on fail # - #- maint/travis-ci_scripts/50_after_failure.bash + - maint/getstatus maint/travis-ci_scripts/50_after_failure.bash after_script: # No tasks yet # - #- maint/travis-ci_scripts/60_after_script.bash + #- maint/getstatus maint/travis-ci_scripts/60_after_script.bash diff --git a/maint/travis-ci_scripts/10_before_install.bash b/maint/travis-ci_scripts/10_before_install.bash index ddc2589..da10ee4 100755 --- a/maint/travis-ci_scripts/10_before_install.bash +++ b/maint/travis-ci_scripts/10_before_install.bash @@ -38,10 +38,9 @@ if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi # slurp the entire file and get the index off the last # `processor : XX` line # -# We also divide the result by two, otherwise the travis VM -# gets overloaded (the amount of available swap is just TOOOO -# damn small) -export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 2 ))" +# We also divide the result by a factor, otherwise the travis VM gets +# overloaded (the amount of available swap is just TOOOO damn small) +export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 ))" export CACHE_DIR="/tmp/poormanscache" diff --git a/maint/travis-ci_scripts/50_after_failure.bash b/maint/travis-ci_scripts/50_after_failure.bash index fb5b5fb..f087d6f 100755 --- a/maint/travis-ci_scripts/50_after_failure.bash +++ b/maint/travis-ci_scripts/50_after_failure.bash @@ -1,11 +1,12 @@ #!/bin/bash -# !!! Nothing here will be executed !!! -# The source-line calling this script is commented out in .travis.yml - # this file is executed in a subshell - set up the common stuff source maint/travis-ci_scripts/common.bash if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi -echo_err "Nothing to do" +echo_err " +$(ci_vm_state_text) + +=== dmesg ringbuffer +$(sudo dmesg)"