What do other people do to cancel a build? Right now I kill -9 the builder but it seems pretty brutal. Is there a nicer way? Matt Wynne http://blog.mattwynne.net http://www.songkick.com
On Wed, Apr 1, 2009 at 10:24 AM, Matt Wynne <matt at mattwynne.net> wrote:> What do other people do to cancel a build? > > Right now I kill -9 the builder but it seems pretty brutal. Is there a nicer > way?Not that I know of. Plus, that still isn''t good enough if there are subprocesses - they can be orphaned,. I just checked in some changes to the daemon/daemon_helper.rb init script which does have logic to kill all child processes. It would be great to integrate this into the app, but I didn''t have the energy to tackle that in a cross-platform way.
On 1 Apr 2009, at 20:04, Chad Woolley wrote:> On Wed, Apr 1, 2009 at 10:24 AM, Matt Wynne <matt at mattwynne.net> > wrote: >> What do other people do to cancel a build? >> >> Right now I kill -9 the builder but it seems pretty brutal. Is >> there a nicer >> way? > > Not that I know of. Plus, that still isn''t good enough if there are > subprocesses - they can be orphaned,. > > I just checked in some changes to the daemon/daemon_helper.rb init > script which does have logic to kill all child processes.So would that mean if I did sudo /etc/init.d/cruise stop it would cancel the build immediately rather than waiting for the builders to finish? Matt Wynne http://beta.songkick.com http://blog.mattwynne.net
On Thu, Apr 2, 2009 at 12:45 PM, Matt Wynne <matt at mattwynne.net> wrote:> So would that mean if I did sudo /etc/init.d/cruise stop it would cancel the > build immediately rather than waiting for the builders to finish?Yes. That is the desired behavior, in my opinion (when I want to restart, I want to restart NOW). You can start the build again after you restart. -- Chad
On 2 Apr 2009, at 22:30, Chad Woolley wrote:> On Thu, Apr 2, 2009 at 12:45 PM, Matt Wynne <matt at mattwynne.net> > wrote: >> So would that mean if I did sudo /etc/init.d/cruise stop it would >> cancel the >> build immediately rather than waiting for the builders to finish? > > Yes. That is the desired behavior, in my opinion (when I want to > restart, I want to restart NOW). You can start the build again after > you restart.Great, I''ll take a look at that, it should be a real boon for us. Are you saying it won''t kill processes that are spawned by the build though? Matt Wynne http://beta.songkick.com http://blog.mattwynne.net
On Thu, Apr 2, 2009 at 2:59 PM, Matt Wynne <matt at mattwynne.net> wrote:> Great, I''ll take a look at that, it should be a real boon for us. Are you > saying it won''t kill processes that are spawned by the build though?It WILL kill all child processes of the builders. That''s the point, otherwise you have orphaned processes that block subsequent builds (e.g. selenium server, jsunit server, test app server instances, any other processes that the build starts). Why would you want to keep child processes and builders alive when you restart ccrb?
On 3 Apr 2009, at 02:23, Chad Woolley wrote:> On Thu, Apr 2, 2009 at 2:59 PM, Matt Wynne <matt at mattwynne.net> wrote: >> Great, I''ll take a look at that, it should be a real boon for us. >> Are you >> saying it won''t kill processes that are spawned by the build though? > > It WILL kill all child processes of the builders. That''s the point, > otherwise you have orphaned processes that block subsequent builds > (e.g. selenium server, jsunit server, test app server instances, any > other processes that the build starts). > > Why would you want to keep child processes and builders alive when you > restart ccrb?On the contrary, I want them to die, but I just wasn''t sure whether they would, from something you''d said earlier in the thread. That''s great, I''ll check it out. Thanks Chad. Matt Wynne http://blog.mattwynne.net http://www.songkick.com
Chad Woolley <thewoolleyman at gmail.com> writes:> On Thu, Apr 2, 2009 at 12:45 PM, Matt Wynne <matt at mattwynne.net> wrote: >> So would that mean if I did sudo /etc/init.d/cruise stop it would cancel the >> build immediately rather than waiting for the builders to finish?Where is this fabled initscript? I couldn''t find it in the latest git checkout. I''ve got a build running for 39hours now and need to kill it off, would be nice if I could cancel the build via the UI! micah
On Wed, Apr 29, 2009 at 4:40 AM, Micah Anderson <micah at riseup.net> wrote:> Where is this fabled initscript? I couldn''t find it in the latest git > checkout.in the /daemon dir. An init script and helper which it references. Nonstandard, but in ruby and works cross-platform.> I''ve got a build running for 39hours now and need to kill it off, would > be nice if I could cancel the build via the UI!Yes it would. I''ll wait on your patch :) -- Chad
Chad Woolley <thewoolleyman at gmail.com> writes:> On Wed, Apr 29, 2009 at 4:40 AM, Micah Anderson <micah at riseup.net> wrote: >> Where is this fabled initscript? I couldn''t find it in the latest git >> checkout. > > in the /daemon dir. An init script and helper which it references. > Nonstandard, but in ruby and works cross-platform.Great, thanks!>> I''ve got a build running for 39hours now and need to kill it off, would >> be nice if I could cancel the build via the UI!Actually it seems like when I kill the builders, the next time a build starts it too goes on for infinity. How can I track this down? I tried running every rake task that is setup for the build for this project, they all return like normal.> Yes it would. I''ll wait on your patch :)dont wait long, i''ve got to learn the language first :P micah
On Thu, Apr 30, 2009 at 12:57 PM, Micah Anderson <micah at riseup.net> wrote:> Actually it seems like when I kill the builders, the next time a build > starts it too goes on for infinity. > > How can I track this down? I tried running every rake task that is setup > for the build for this project, they all return like normal.Add logging at every step of your build, and try to narrow down what is hanging. Once it stops getting to a log step, dig deeper and add more logging. Also check your processes. Learn the ''ps'' command, and how to view process groups and display parent/child process ids. Find all child processes of your builder/build (I think the daemon may give you some hints here, that''s what it does). It may just be "ruby", in which case you''ll still need to keep logging debug statements to find out what is going on, but you may find something that give you a hint. Good luck, -- Chad