Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Cancelling a 'rogue' make

No.

However, if I don't wait that long (only for about 100 subprocesses
created), no make process remains after cancellation has finished. So it
seems to be a certain limit on the number of subprocesses, where the
problem really begins.

Generally not reading in the output during normal termination seems to
be an overkill to me anyway.

This might be hard to debug, but I would rather like to see the root
process being killed, if "normal" termination does not work within a
certain time frame.

Ideas?

Walter

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Tim.Kelly@xxxxxxxxx
> Sent: Mittwoch, 4. April 2007 17:15
> To: cdt-dev@xxxxxxxxxxx
> Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> 
> I think the way this works is that Process.destroy() gets called and
> this does kill child processes (at least starting with WinNT, Win2K:
> i.e. not Win98). The problem is the deadlock while waiting to read
> streams streams, which I don't think is necessary. Did you try my
> suggested fix?
> 
> Tim
> 
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of ext Brunauer, Walter
> Sent: Wednesday, April 04, 2007 10:03 AM
> To: CDT General developers list.
> Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> 
> Ok, now I see.
> 
> If I just waited long enough, killing the process tree in my case
> stopped at the 372nd make subprocess and then my machine got 
> locked up.
> Seems, the Spawner has problems to terminate deep process trees. Maybe
> killing them instead would help?
> 
> Sorry, I never waited that long before:-)
> 
> Walter
> 
> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of 
> Tim.Kelly@xxxxxxxxx
> > Sent: Mittwoch, 4. April 2007 16:11
> > To: cdt-dev@xxxxxxxxxxx
> > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > 
> > Hi Walter -
> > 
> > I did this:
> > 
> > 1) File > New > Project > C++ > Standard Make C++ Project 
> (and called 
> > the project "TestMake")
> > 2) Added "makefile" to the project root and added your test contents
> > 3) Set the "Build command" under the Make Builder tab to "make 
> > makefile"
> > and the Build Directory to "\TestMake"
> > 4) Build Project and get infinite loop and try to Cancel.
> > 
> > Tim
> > 
> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> > On Behalf Of ext Brunauer, Walter
> > Sent: Wednesday, April 04, 2007 8:55 AM
> > To: CDT General developers list.
> > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > 
> > And you are using CDT builder? In a standard CDT project?
> > 
> > Maybe its because I use my own make then, which is not 
> cygwin, why it 
> > works for me...
> > 
> > Hm,
> > 
> > Walter
> > 
> > > -----Original Message-----
> > > From: cdt-dev-bounces@xxxxxxxxxxx
> > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of
> > Tim.Kelly@xxxxxxxxx
> > > Sent: Mittwoch, 4. April 2007 15:29
> > > To: cdt-dev@xxxxxxxxxxx
> > > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > > 
> > > Sorry, I was too. We're on CDT 4.0. I was thinking about eclipse 
> > > platform.
> > > 
> > > Tim
> > > 
> > > -----Original Message-----
> > > From: cdt-dev-bounces@xxxxxxxxxxx
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> > > On Behalf Of ext Brunauer, Walter
> > > Sent: Wednesday, April 04, 2007 8:20 AM
> > > To: CDT General developers list.
> > > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > > 
> > > JFYI: I was talking about CDT 4.0.
> > > 
> > > :-)
> > > 
> > > Walter
> > > 
> > > > -----Original Message-----
> > > > From: cdt-dev-bounces@xxxxxxxxxxx
> > > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of
> > > Tim.Kelly@xxxxxxxxx
> > > > Sent: Mittwoch, 4. April 2007 15:13
> > > > To: cdt-dev@xxxxxxxxxxx
> > > > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > > > 
> > > > Hi - I ran this test on a standard make project (CDT 3.1.1)
> > > > --
> > > > ALL : loop
> > > > 
> > > > loop :
> > > > 	make loop
> > > > --
> > > > If I remove these lines in ProcessClosure#terminate() it
> > > doesn't hang.
> > > > 
> > > > fOutputReader.waitFor();
> > > >    and
> > > > fErrorReader.waitFor();
> > > > 
> > > > If they are there the last make process must be killed from
> > > the task
> > > > manager.
> > > > 
> > > > Tim
> > > > 
> > > > -----Original Message-----
> > > > From: cdt-dev-bounces@xxxxxxxxxxx
> > > [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> > > > On Behalf Of ext Brunauer, Walter
> > > > Sent: Wednesday, April 04, 2007 5:19 AM
> > > > To: CDT General developers list.
> > > > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > > > 
> > > > Hi Pete,
> > > > 
> > > > for our builder, we use the ProcessFactory (Spawner) of CDT
> > > to execute
> > > 
> > > > a make process, and it supports destroying whole subprocess
> > > trees, if
> > > > you cancel the build from within the dialog. I don't know
> > > about which
> > > > builder is used below, but in case it's CDT, I assume CDT
> > > itself would
> > > 
> > > > use this API as well...
> > > > 
> > > > Simple test Makefile:
> > > > 
> > > > loop :
> > > > 	make loop
> > > > 
> > > > I guess the actual problem here is, that simply the whole
> > > machine gets
> > > 
> > > > so unresponsive, that its not possible any longer to even
> > > press cancel
> > > 
> > > > (or it takes forever until the event makes it through to
> > > the service
> > > > to eventually destroy the process)...
> > > > 
> > > > So you could check, if CDT uses ProcessFactory, and unless
> > > you are not
> > > 
> > > > on Win98, it should basically work (above test did). Other
> > > than that,
> > > > not much you can do on this one IMHO, Derek,
> > > > 
> > > > Walter
> > > > 
> > > > > -----Original Message-----
> > > > > From: cdt-dev-bounces@xxxxxxxxxxx 
> > > > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of 
> Pete MacLiesh
> > > > > Sent: Mittwoch, 4. April 2007 01:52
> > > > > To: 'CDT General developers list.'
> > > > > Subject: RE: [cdt-dev] Cancelling a 'rogue' make
> > > > > 
> > > > > 
> > > > > Windows does have a few job apis for collecting processes (and
> > > > > children) together (I think since win2k). It seems to 
> have been 
> > > > > designed for quota management and the like, but can also be
> > > > used much
> > > > > like unix process groups to kill a whole process family. I
> > > > suspect the
> > > > 
> > > > > spawner doesn't use it now, but it might be an
> > > interesting addition
> > > > > there (maybe in conjunction with process priority control).
> > > > > 
> > > > > APIs like CreateJobObject and AssignProcessToJobObject
> > > are a useful
> > > > > starting point.
> > > > > 
> > > > > Ciao,
> > > > > 
> > > > > PMac
> > > > >  
> > > > > 
> > > > > >-----Original Message-----
> > > > > >From: cdt-dev-bounces@xxxxxxxxxxx
> > > > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
> > > > > >Behalf Of kesselhaus
> > > > > >Sent: Tuesday, April 03, 2007 4:38 PM
> > > > > >To: CDT General developers list.
> > > > > >Subject: Re: [cdt-dev] Cancelling a 'rogue' make
> > > > > >
> > > > > >Well, I don't think you 'll have different behaviour when
> > > > calling the
> > > > 
> > > > > >recursive make from cmd-line. I had this too, but
> > > > > terminating the right
> > > > > >shell/make process in the taskmanager is really hard. make
> > > > and shell
> > > > > >will just spawn new childs and slow down windows to no
> > > usage. The
> > > > > >quiestion is, if you could get the Eclipse process into
> > > > > foreground focus
> > > > > >to kill the process.
> > > > > >
> > > > > >Derek Morris schrieb:
> > > > > >> Hi,
> > > > > >>
> > > > > >> I managed to create a makefile that called itself
> > > > > recursively and so
> > > > > >> entered an infinite loop. Doh.
> > > > > >>
> > > > > >> However, I couldn't find a way through the Eclipse UI to
> > > > kill the
> > > > > >> make. Cancel does nothing... In fact I had to switch the
> > > > > whole machine
> > > > > >> off to recover (machine became so unresponsive that
> > > even Windows
> > > > > >> taskmgr wouldn't start).
> > > > > >>
> > > > > >> So, my questions:
> > > > > >> - Is there a way to 'kill' a rogue process when cancelling
> > > > > a progress
> > > > > >> monitor?
> > > > > >> - If not, shouldn't there be?
> > > > > >>
> > > > > >> p.s. I know this is user error in creating a bad makefile,
> > > > > but it does
> > > > > >> happen. I was investigating a user complaint where the
> > > > compiler got
> > > > 
> > > > > >> itself into an infinite loop, with similar
> > > consequences to above.
> > > > > >>
> > > > > >> Thanks,
> > > > > >>
> > > > > >
> > > > > >_______________________________________________
> > > > > >cdt-dev mailing list
> > > > > >cdt-dev@xxxxxxxxxxx
> > > > > >https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > > 
> > > > > _______________________________________________
> > > > > cdt-dev mailing list
> > > > > cdt-dev@xxxxxxxxxxx
> > > > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > > 
> > > > _______________________________________________
> > > > cdt-dev mailing list
> > > > cdt-dev@xxxxxxxxxxx
> > > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > _______________________________________________
> > > > cdt-dev mailing list
> > > > cdt-dev@xxxxxxxxxxx
> > > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > 
> > > _______________________________________________
> > > cdt-dev mailing list
> > > cdt-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > _______________________________________________
> > > cdt-dev mailing list
> > > cdt-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > 
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 


Back to the top