A recent update of Hudson, a great continuous integration engine, has fixed one bug, only to introduce a new one. On February 19th, 2009, Hudson bug #2729 (an issue about Hudson not cleaning up run-away processes after the build is complete) was fixed by Hudson now killing off all processes created by the build task, including intentionally spawned daemons or tasks you wanted to keep alive.
If, like me, you use an Ant task to start your application server using an exec task with the spawn set to true at the end of a Hudson build, this means that when you upgrade Hudson, your application server will stop starting, but the rest of your build will continue to work as expected.
The issue is captured in Hudson bug # 3105 . The work around is to set the BUILD_ID environment variable to "dontKillMe" for the process you wish to not be killed. The Hudson bug mentions solving this through setting the BUILD_ID via a build parameter, however that requires that you enter or accept the default parameter each time you want to run the build. Instead I simply added the environment variable to my exec task, like this:
[fusion_builder_container hundred_percent="yes" overflow="visible"][fusion_builder_row][fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][xml]
[/xml]
----------EDIT----------
You can now disable this process killing behavior globally by adding this to your JAVA_OPTS:
[/fusion_builder_column][fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][plain]
-Dhudson.util.ProcessTreeKiller.disable=true
[/plain]
[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
Ant Exec Spawn Jobs Broke Under Hudson?
Hudson's February 2009 update fixed one bug but broke ant spawn tasks - upgraded builds stop starting application servers.
No comments yet