public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 20120523: bug in fork/exec
@ 2012-05-25  9:38 Yaakov (Cygwin/X)
  2012-05-25  9:42 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-05-25  9:38 UTC (permalink / raw)
  To: cygwin

With the 20120523 snapshot, if a process attempts to fork/exec another 
program which depends on a DLL which is missing, the PID created by 
fork() spins:

* in taskmgr, the forked process is listed as an instance of the program 
which called fork() (as usual);

* this PID ties up one CPU core (e.g. 25% CPU usage on a quad-core machine);

* in ps(1), the same PID is displayed as the program which was attempted 
to be execed;

* /bin/kill does not work on this PID, even with -f.

This is on Win7 x64.


Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 20120523: bug in fork/exec
  2012-05-25  9:38 20120523: bug in fork/exec Yaakov (Cygwin/X)
@ 2012-05-25  9:42 ` Corinna Vinschen
  2012-05-25 20:30   ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2012-05-25  9:42 UTC (permalink / raw)
  To: cygwin

On May 25 03:26, Yaakov (Cygwin/X) wrote:
> With the 20120523 snapshot, if a process attempts to fork/exec

Which snapshot shows this effect first?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 20120523: bug in fork/exec
  2012-05-25  9:42 ` Corinna Vinschen
@ 2012-05-25 20:30   ` Yaakov (Cygwin/X)
  2012-05-29 12:18     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-05-25 20:30 UTC (permalink / raw)
  To: cygwin

On 2012-05-25 04:40, Corinna Vinschen wrote:
> On May 25 03:26, Yaakov (Cygwin/X) wrote:
>> With the 20120523 snapshot, if a process attempts to fork/exec
>
> Which snapshot shows this effect first?

Ouch, it starts with 20120309.

FWIW, here is the fork() code I discovered this with:

http://git.gnome.org/browse/glib/tree/glib/gspawn.c?id=2.32.3


Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 20120523: bug in fork/exec
  2012-05-25 20:30   ` Yaakov (Cygwin/X)
@ 2012-05-29 12:18     ` Corinna Vinschen
  2012-05-30 15:53       ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2012-05-29 12:18 UTC (permalink / raw)
  To: cygwin

On May 25 15:10, Yaakov (Cygwin/X) wrote:
> On 2012-05-25 04:40, Corinna Vinschen wrote:
> >On May 25 03:26, Yaakov (Cygwin/X) wrote:
> >>With the 20120523 snapshot, if a process attempts to fork/exec
> >
> >Which snapshot shows this effect first?
> 
> Ouch, it starts with 20120309.

Thanks.  That would mean a single change is the culprit, but I need
a way to reproduce the problem to be able to fix it (other than just
reverting the patch).

> FWIW, here is the fork() code I discovered this with:
> 
> http://git.gnome.org/browse/glib/tree/glib/gspawn.c?id=2.32.3

That's a bit heavy as far as testcases go.  Thing is, I can't reproduce
it.  If that's a generic problem, shouldn't this also occur when trying
to start a program from bash or tcsh?  I deliberately removed a DLL from
my system, but there is no hang at all when trying to start an affected
application.

Can you please provide a simple testcase?  If you can reproduce it with
given binaries from the distro, I don't need source code, just the steps
and the names of the binaries to reproduce.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 20120523: bug in fork/exec
  2012-05-29 12:18     ` Corinna Vinschen
@ 2012-05-30 15:53       ` Corinna Vinschen
  2012-06-04  0:30         ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2012-05-30 15:53 UTC (permalink / raw)
  To: cygwin

On May 29 11:40, Corinna Vinschen wrote:
> On May 25 15:10, Yaakov (Cygwin/X) wrote:
> > On 2012-05-25 04:40, Corinna Vinschen wrote:
> > >On May 25 03:26, Yaakov (Cygwin/X) wrote:
> > >>With the 20120523 snapshot, if a process attempts to fork/exec
> > >
> > >Which snapshot shows this effect first?
> > 
> > Ouch, it starts with 20120309.
> 
> Thanks.  That would mean a single change is the culprit, but I need
> a way to reproduce the problem to be able to fix it (other than just
> reverting the patch).
> 
> > FWIW, here is the fork() code I discovered this with:
> > 
> > http://git.gnome.org/browse/glib/tree/glib/gspawn.c?id=2.32.3
> 
> That's a bit heavy as far as testcases go.  Thing is, I can't reproduce
> it.  If that's a generic problem, shouldn't this also occur when trying
> to start a program from bash or tcsh?  I deliberately removed a DLL from
> my system, but there is no hang at all when trying to start an affected
> application.
> 
> Can you please provide a simple testcase?  If you can reproduce it with
> given binaries from the distro, I don't need source code, just the steps
> and the names of the binaries to reproduce.

Never mind.  I found the problem and just checked in a patch.  I'll
create a new snapshot shortly.  Please test.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 20120523: bug in fork/exec
  2012-05-30 15:53       ` Corinna Vinschen
@ 2012-06-04  0:30         ` Yaakov (Cygwin/X)
  0 siblings, 0 replies; 6+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-06-04  0:30 UTC (permalink / raw)
  To: cygwin

On 2012-05-30 09:38, Corinna Vinschen wrote:
> Never mind.  I found the problem and just checked in a patch.  I'll
> create a new snapshot shortly.  Please test.

Looks fixed in 20120530.  Thanks,


Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-04  0:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-25  9:38 20120523: bug in fork/exec Yaakov (Cygwin/X)
2012-05-25  9:42 ` Corinna Vinschen
2012-05-25 20:30   ` Yaakov (Cygwin/X)
2012-05-29 12:18     ` Corinna Vinschen
2012-05-30 15:53       ` Corinna Vinschen
2012-06-04  0:30         ` Yaakov (Cygwin/X)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).