Bamboo build hangs on script that spawns subprocess


I have a bamboo build in which one of the tasks is a python script which spawns a subprocess (using subprocess.Popen) to launch a database server which needs to stay alive throughout the rest of the build while tests run.

The script completes successfully, however the build does not proceed to the next task and just hangs. My theory is that bamboo is waiting for the subprocesses to complete as well, before continuing.

Is that what's most likely happening? Is there a way to get bamboo to recognize a script as having completed, even if a subprocess that it's spawned is still running?

Thanks in advance.

2 answers

Can you try to redirect the output streams and use nohup, e.g.

nohup /tmp/ > foo.out 2> foo.err < /dev/null &


I have what I believe is the same problem. One of the tasks starts jetty, which returns the correct exit code, but then after the application starts it writes a few more lines to the console. Bamboo hangs at this point. The solution above solved the problem.

Has this been solved for launching a Windows program?

I've tried this

@echo off
start cmd /c myprogram.exe > nul

But that doesn't quite seem to cut it, Bamboo keeps grabbing the sub-process that is launched and won't progress.

I am struggling with the same issue. I have a simulator for a driver that i want to start as the first build job but it just hangs.

Like 1 person likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Friday in United States

Confluence Security Advisory

Good morning Members, Not sure if you are aware. Please read the following: More details: https://co...

57 views 1 0
View post

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