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.

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted yesterday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

49 views 2 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot