- changed status to open
PowerShell Task Hangs in Bamboo both with either inline/file options selected
Hi Guys, I'm running into a very odd issue. My script is hanging and doesn't return control back to Bamboo. I can get it to intermittently work by resaving the bamboo task or rerunning the failed build. Do I need to add a parameter when calling my script from Bamboo?
Notice Timestamp:
30-Jan-2020 08:40:30 BUILD SUCCESSFUL in 2m 4s
30-Jan-2020 08:40:30 50 actionable tasks: 47 executed, 3 up-to-date
30-Jan-2020 08:40:30 Wrapping Up Targeted APK Script...
30-Jan-2020 08:40:30
30-Jan-2020 08:58:07 Force Stop build feature is enabled for current plan. Either Bamboo has detected the build has hung or it has been manually stopped.
PowerShell Task v1.2.0
Bamboo v6.10.3 build 61008
Windows Server 2012 R2 Standard x64
Powershell 4.0
Let me know if you need any log files, etc..
Kindest Regards,
Terrence
Comments (11)
-
-
Hi Terrence! It looks the build hangs in gradle. Try adding debug logging:
.\gradlew --debug clean assemble...
and see where does it stuck. -
Also does it help if you just rerun the build without resaving the task?
-
Account Deactivated reporter Hi Sergey, I will add --debug flag to gradle, but from my logs it looks like the build hangs on the very last ‘Write-Host’ statement in the buildAndroidTargetedAPK.ps1 script. If i rerun a failed build w/out resaving the task it typically succeeds as well.
Thanks for your help!
Kindest Regards,
Terrence
-
We’ll investigate it.
-
Account Deactivated reporter Doubled Java Heap Size in Conf file. Seeing if that helps with Gradle.
T
-
We replicated the same environment (PowerShell Task v1.2.0, Bamboo v6.10.3, Windows Server 2012 R2 Standard x64, Powershell 4.0) and built several android projects - but couldn’t reproduce the issue.
Here are some ideas:
- check bamboo log for errors/warnings
- run process explorer when a build hangs and check powershell process tree
- replace
return
with[Environment]::Exit(0)
in the script
-
Account Deactivated reporter Thanks Sergey, still seeing the issue, i will try some of your suggestions.
T
-
Account Deactivated reporter Sergey, you were right from the beginning. Gradle is holding onto Java process. Added ‘.\gradlew --stop’ to end of script and build is completing successfully. Thanks for your help on this!
Kindest Regards,
Terrence
-
I’m happy to help!
-
- changed status to resolved
- Log in to comment