Build breaks with error "tee: ‘standard output’: Resource temporarily unavailable"

Hi there

After upgrading our build config from nodejs 8 and python2 to nodejs 11 and python3, our builds fail in the middle with error:
tee: standard output.

also cache upload fails for no reported reasons.

Anyone got an idea how to fix this?

Can’t say anything without seeing the build.

What information do you need?

Just got this again:
tee: ‘standard output’: Resource temporarily unavailable

out of nowhere after roughly 16k lines

As @native-api stated,

It would really help to see more of your .travis.yml file or more of the build.

From this, I believe you’re overloading the logging system by producing too much output too fast:


In any case, I need to see the build to say for sure, this is just speculation.

Here my yml config:

os: linux
dist: xenial

env:
  global:
    - PATH=$HOME/.local/bin:$PATH
language: java
jdk:
  - openjdk11
python:
  - "3.5"

services:
  - mysql

addons:
  sonarcloud:
    organization: "tamedia-pmd"
    token: ${SONAR_TOKEN}

before_script:
  - wget https://repo.mysql.com/mysql-apt-config_0.8.10-1_all.deb
  - sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
  - sudo apt-get update -q
  - sudo apt-get install -q -y --allow-unauthenticated -o Dpkg::Options::=--force-confnew mysql-server
  - sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
  - sudo cp "$TRAVIS_BUILD_DIR/.travis_config/mysql/my.cnf" /etc/mysql/my.cnf
  - sudo systemctl restart mysql
  - sudo mysql_upgrade

before_install:
  - mysql -e 'CREATE DATABASE IF NOT EXISTS ci_tamedia;'
  - mysql -e "GRANT ALL ON ci_tamedia.* TO 'hybris'@'%' IDENTIFIED BY 'hybris';"
  - pyenv global 3.7.1
  - pip install --upgrade pip
  - pip install --user awscli
  - python3 -c 'import os,sys; os.set_blocking(sys.stdout.fileno(), True)'
  - nvm use 11

git:
  quiet: true
  depth: false

cache:
  directories:
  - $HOME/.m2
  - $HOME/.gradle

jobs:
  include:
    - stage: "deploy"
      name: "Create Deployment Package"
      if: tag IS present
      script:
        - cd build
        - export BUILD_NUMBER=$TRAVIS_BUILD_NUMBER; export JOB_NAME=$TRAVIS_JOB_NAME; export GIT_BRANCH=$TRAVIS_BRANCH; export GIT_COMMIT=$TRAVIS_COMMIT; export BUILD_ID=$TRAVIS_BUILD_ID
        - bash gradlew --quiet clean all || travis_terminate 1;
        - bash gradlew --quiet production || travis_terminate 1;
        - bash gradlew publish -Pversion=${TRAVIS_TAG}
    - stage: "build"
      name: "CI Build"
      if: branch IN (develop, master) || type = pull_request || (branch =~ support/* AND type = push)
      script:
        - cd build
        - bash build.sh || travis_terminate 1;
        - bash unittests.sh
        - bash allwebtests.sh
        - bash integrationtests.sh
        - bash checkLogs.sh unittests.log;
        - bash checkLogs.sh allwebtests.log;
        - bash checkLogs.sh integrationtests.log;
        - bash gradlew copyFilesTask;
        - bash gradlew generateJacocoReport;
        - cd ..
        - CURRENTVERSION=`git describe`
        - sonar-scanner -Dsonar.projectVersion=${CURRENTVERSION}

notifications:
  slack:
    rooms:
     - secure: ${SLACK_SECRECT}
    on_success: change
    on_failure: always
    on_pull_requests: true

The tee is in the test shell scripts:

./gradlew -Psystem="ci" -Dtestclasses.packages='com.unic.*, com.tamedia.*' -DHYBRIS_LOG_DIR=${TRAVIS_BUILD_DIR}/hybris/log/junit/integration -DHYBRIS_TEMP_DIR=${TRAVIS_BUILD_DIR}/hybris/temp/junit/integration --quiet integrationtests | tee -i integrationtests.log

So I can ready with checkLogs.sh if some tests failed. Our gradle build generates quite some output, we already have it on quiet mode to not exceed 50k lines. But I can not reduce it more. That is due to the framework we use for the project.

If anyone has an idea to improve the build process/pipeline I would be really happy. We never bothered as it was running.

The author of Build log truncated pipes the output through pv -q -L 1K to throttle output speed.

You need to install the pv Apt package to get this utility.

That does work but makes the build much slower.

You can try higher speed limits.

Imprint