Pipeline shuts down prematurely without any log on maven

Hi guys!

I'm trying out the Bitbucket Pipeline to build our project after every commit and I ran into a problem that I cant figure out what it might be.

After running a maven clean install, at a certain point of the process, maven log stops and build fails. On maven, no error is displayed that would indicate a problem (even with Debug mode on). My guess is something related to the environment resources or some limitation that I could not figure out.

The only thing i saw on the log that was weird was this:

 

+ docker pull "atlassian/agent-setup-git:latest"
latest: Pulling from atlassian/agent-setup-git
Digest: sha256:e1d2f19b296912e43eed9ea814dcfddbe68a23256791663e53316a0127ddf375
Status: Image is up to date for atlassian/agent-setup-git:latest
+ docker run -t --entrypoint=/bin/bash --memory=2048m -e BUILD_DIR=/opt/atlassian/bitbucketci/agent/build -v /tmp/bashScript7561527712408367767.sh:/tmp/bashScript7561527712408367767.sh:ro -v build-volume-b59a46b5-d01b-4bc1-beb8-26506f30c490:/opt/atlassian/bitbucketci:rw -w /opt/atlassian/bitbucketci/agent/build --label com.atlassian.pipelines.agent="b3043332ebb7" "atlassian/agent-setup-git:latest" -i /tmp/bashScript7561527712408367767.sh
WARNING: Your kernel does not support swap limit capabilities, memory limited without swap.

 

+ docker pull "maven:3.3.3-jdk-7"
3.3.3-jdk-7: Pulling from library/maven
Digest: sha256:84562811a48e63f90e711d46434cff42506335240ab06ad6321557868a31fa51
Status: Image is up to date for maven:3.3.3-jdk-7
+ docker run -t --rm=true --cidfile=/tmp/1470983055275-0/{f4cbb419-f26b-44bc-94a0-fc62e53a9951} --entrypoint=/bin/bash --memory=2048m --env-file=/tmp/dockerEnvironment3370515131426133908.env -v /tmp/bashScript1597470459772169067.sh:/tmp/bashScript1597470459772169067.sh:ro -v build-volume-b59a46b5-d01b-4bc1-beb8-26506f30c490:/opt/atlassian/bitbucketci:rw -w /opt/atlassian/bitbucketci/agent/build --label com.atlassian.pipelines.agent="b3043332ebb7" "maven:3.3.3-jdk-7" -i /tmp/bashScript1597470459772169067.sh
WARNING: Your kernel does not support swap limit capabilities, memory limited without swap.

Our application is pretty robust and uses a lot of memory to run tests, and thats exactly when the build fails with no log. 2048 memory does not seem to be enough. Wondering if theres a possibility to have more.

Sorry for this ticket being so vague. I just have no other clues of what can be causing this.

Thanks for the help!

 

 

2 answers

This widget could not be displayed.

Hi Thiago,

It sounds like your build is hitting our resource limits (currently 2GB memory, 2 hour execution, or CPU limits, see https://confluence.atlassian.com/pages/viewpage.action?pageId=827106051).

Unfortunately these limits aren't configurable at the moment but most users can build within these limits by reducing the resource requirements of their builds. This usually involves reducing the max heap size and test fork settings in your build tool. This page describes the test fork options for the maven surefire plugin: http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html

This widget could not be displayed.

Hey Thiago, feel free to contact support.atlassian.com to get specific help if you don't get your answer here.

What you describe does sound like the memory limits of the system are being hit. You could attempt to replicate this behaviour locally with "docker run -ti -v $(pwd):/opt/app w /opt/app  –memory=2048 maven:3.3.3jdk7 /bin/bash"

I'll see if I can find the current open enhancement tickets for more memory. 

Thanks for the help sebastian! I will try to run this on a local docker instance and see if i get the same issue.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

246 views 14 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you