Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Add Timeout to CHECKING_BUILD_CONDITION #4379

tung.nh1 ·

Hello@robinshen
Currently, we have some builds are stuck in CHECKING_BUILD_CONDITION.
I checked it when I start process a build request, the configuration will be locked and process CheckConditionTask:

GridTaskFuture<Boolean> taskFuture = Grid.instance.execute(
    					new CheckConditionTask(build), build);
    			
    			boolean buildNecessary = taskFuture.get(configuration.findTimeout() * 60 * 1000L);

I think we need change reduce time out of it (Ex: minimum is 1 mins and maximum would be configuration.findTimeout() * 1000L).
How do you think ?

  • replies 5
  • views 812
  • stars 0
robinshen ADMIN ·

I am not sure what do you mean "reduce timeout" here. If timeout is specified when calling Grid.instance.execute, QB should be able to send SIG_TERM to forked processes. If it hangs forever, please check if forked process can be killed by SIG_TERM.

tung.nh1 ·

I mean we need to separate the build time out and the time CHECKING_BUILD_CONDITION.
I think we need reduce the time out of CHECKING_BUILD_CONDITION because currently time out of CHECKING_BUILD_CONDITION
according to the configuration of the build (6 hours) so when we trigger the next build it will wait 6 hours.

robinshen ADMIN ·
kienbui1995 ·

As we know, if a build is hung at CHECK_BUILD_CONDITION, it will make configuration was locked at that time.
Do you have any solution to prevent this?

robinshen ADMIN ·

Unfortunately the only way is to wait for the build to timeout, as the check build condition has to put in a synchronization block in order to make safe changes to configuration in a concurrent environment.