public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Resource Temporarily Unavailable
@ 2006-09-07 23:28 Chris McIntosh
  2006-09-07 23:31 ` Christopher Faylor
  0 siblings, 1 reply; 8+ messages in thread
From: Chris McIntosh @ 2006-09-07 23:28 UTC (permalink / raw)
  To: cygwin

Christopher, thanks for the quick response.

Unfortunately it didn't change anything except we got a different error message.

Do you have any suggestions or pointers on how I can debug this further.

Thanks
Chris McIntosh

On Thu, Sep 07, 2006 at 01:04:49PM -0700, Chris McIntosh wrote:
>Hello, I work at a company where we have a complicated Linux build. We
>use cygwin to mimic this build on windows for some of our windows
>centric people.
>
>At different times when cygwin forks it will throw a Resource
>temporarily Unavailble error. I am tempted to call this "Random"
>because it doesn't manifest itself until a random time, but once
>manifested it will continue to fail at the exact same spot. This spot
>is different for all users but once it does happen it continues to
>fail.
>
>This is typically in our make flow when it is forking or spawning
>another process to execute a command.
>
>Here is a snip
>
>../../../../..//class/mfs/engine/disp/gf100_engine.mfs
>/usr/bin/env: ../../../../..//bin/Win32/cfp: Resource temporarily
>unavailable
>makepp: Failed to build target gf100.xml
>
>One thing to note, the command that it fails on is different for all
>users. It actually fails when forking. Another example is
>
>/usr/bin/bash: fork: Resource temporarily unavailable
>make[4]: *** [ObjWin32/.PTreeVisitor.d] Error 128
>
>After looking at the cygwin source I found that EAGAIN which produces
>this message is mapped to many windows errors. So after more
>investigation I found it to be Win32 error 234 which is
>ERROR_MORE_DATA. I then traced this down to when cygwin calls
>CreateProcessAsUser in spawn.cc
>
>So my question, has anyone seen this before. I don't think it is a
>cygwin bug since it the win api returning this error, but maybe it is
>something to do with the call.
>
>Any pointers or tips would be helpful.

A google search for CreateProcess and ERROR_MORE_DATA shows a patch for
make which avoids putting empty environment variables in the environment
block sent to CreateProcess.

So, I've added a check for that to cygwin and generated a new snapshot at:

http://cygwin.com/snapshots/

Be advised that the snapshot version of Cygwin has been built with
debugging turned on, which means that it will be slower and noisier than
a normal cygwin release.  In particular, there is a false positive but
inconsequential report about handle closing which can be generated
fairly easily.

cgf

--

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

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

* Re: Resource Temporarily Unavailable
  2006-09-07 23:28 Resource Temporarily Unavailable Chris McIntosh
@ 2006-09-07 23:31 ` Christopher Faylor
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2006-09-07 23:31 UTC (permalink / raw)
  To: cygwin

On Thu, Sep 07, 2006 at 04:28:13PM -0700, Chris McIntosh wrote:
>Christopher, thanks for the quick response.
>
>Unfortunately it didn't change anything except we got a different error 
>message.

Details are important.  What was the actual error message?

>Do you have any suggestions or pointers on how I can debug this further.

http://sources.redhat.com/ml/cygwin/2005-09/msg00945.html

is the only other suggestion I can offer unless you can find something
which mentions the cause for this Windows error.

cgf

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

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

* Re: Resource Temporarily Unavailable
  2006-09-11 15:56 ` Nick Deubert
@ 2006-10-02 19:51   ` Chris McIntosh
  0 siblings, 0 replies; 8+ messages in thread
From: Chris McIntosh @ 2006-10-02 19:51 UTC (permalink / raw)
  To: cygwin


Nick Deubert <ndeubert <at> gmail.com> writes:

> 
> Chris McIntosh wrote:
> > Hello, I work at a company where we have a complicated Linux build. We
> > use cygwin to mimic this build on windows for some of our windows
> > centric people.
> >
> > At different times when cygwin forks it will throw a Resource
> > temporarily Unavailble error. I am tempted to call this "Random"
> > because it doesn't manifest itself until a random time, but once
> > manifested it will continue to fail at the exact same spot. This spot
> > is different for all users but once it does happen it continues to
> > fail.
> >
> > This is typically in our make flow when it is forking or spawning
> > another process to execute a command.
> >
> > Here is a snip
> >
> > ../../../../..//class/mfs/engine/disp/gf100_engine.mfs
> > /usr/bin/env: ../../../../..//bin/Win32/cfp: Resource temporarily 
> > unavailable
> > makepp: Failed to build target gf100.xml
> >
> > One thing to note, the command that it fails on is different for all
> > users. It actually fails when forking. Another example is
> >
> > /usr/bin/bash: fork: Resource temporarily unavailable
> > make[4]: *** [ObjWin32/.PTreeVisitor.d] Error 128
> >
> > After looking at the cygwin source I found that EAGAIN which produces
> > this message is mapped to many windows errors. So after more
> > investigation I found it to be Win32 error 234 which is
> > ERROR_MORE_DATA. I then traced this down to when cygwin calls
> > CreateProcessAsUser in spawn.cc
> >
> > So my question, has anyone seen this before. I don't think it is a
> > cygwin bug since it the win api returning this error, but maybe it is
> > something to do with the call.
> >
> > Any pointers or tips would be helpful.
> Hi all,
> I also have this problem. I use xfce as my desktop and window manager 
> and after a totally arbitrary amount of time (sometimes 10 mins, 
> sometimes days) I start getting this error "Failed to fork (Resource 
> temporarily unavailable)" from the xfce4-panel and it refuses to launch 
> anything. Xfdesktop usually goes shortly after as well. I also noticed 
> by the time this starts happening the process stops showing up when I do 
> a "ps -ef", It doesn't even show up when I pass it a -W either, I have 
> to kill it from Task Manager and start a new one. About this time I also 
> start repeatedly getting this exact error as well: 
> http://www.cygwin.com/ml/cygwin/2006-07/msg00239.html when I build my 
> companies tool in cygwin (with make-3.80).
> 
> I've reinstalled cygwin several times, tried doing a rebaseall, tried 
> changing the heap size, and none of that made any difference for me. 
> (Have not tried the new dll posted in this thread but it was reported 
> that did not solve his problem). I tried downgrading bash from 3.1-6 to 
> 3.0-14 and it seemed like it had fixed both problems but then a week 
> later it returned. I tried setting 
> "CYGWIN=error_start=c:\cygwin\bin\gdb.exe codepage:oem" and verifyed it 
> worked but it does not catch the sh.exe crash.
> 
> I use the xfce4 ports from: http://www.amazepc.com/bamanzi/cygwin/xfce4/ 
> (several versions, it happened with all of them) and have also tried the 
> pkgs in ftp://sunsite.dk/projects/cygwinports. I had everything working 
> perfectly for over a year with the xfce ports mentioned, then something 
> happened to my cygwin install in a power outage so I did a clean 
> reinstall. Ever since I have had all these nightmare problems. Any 
> suggestions for what to try/check/install/log/debug would be greatly 
> appreciated.
> Thanks,
> Nick
> 
> 

In my case I tracked the problem down to a large environment block. 
In windows CreateProcessAsUser you can only pass in an environment string less
than 32000 characters. Unless you use Unicode which cygwin does not.

A simple fix for this in our build environment was to append a env -i 
to the front of our command. This removed the user's environment and only
allowed our build to use the environment. Our build in this case was adding 
29000 worth of characters.

I have since changed our build to not add all of these variables.

Unfortunately you might not be getting the same error. If you look at the 
cygwin source there are many errors that get mapped to "Resource Temporarily 
Unavailable."

The way I tracked this down was by using a debug release of cygwin I changed 
the error messages to the actual windows numbers. That way when my process 
errored I could see it. 

Another option is to use strace and look through the log, it lists the Win32
error there. 

Hope that helps,
Chris McIntosh




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

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

* Re: Resource Temporarily Unavailable
  2006-09-07 20:04 Chris McIntosh
  2006-09-07 20:51 ` Christopher Faylor
@ 2006-09-11 15:56 ` Nick Deubert
  2006-10-02 19:51   ` Chris McIntosh
  1 sibling, 1 reply; 8+ messages in thread
From: Nick Deubert @ 2006-09-11 15:56 UTC (permalink / raw)
  To: cygwin

Chris McIntosh wrote:
> Hello, I work at a company where we have a complicated Linux build. We
> use cygwin to mimic this build on windows for some of our windows
> centric people.
>
> At different times when cygwin forks it will throw a Resource
> temporarily Unavailble error. I am tempted to call this "Random"
> because it doesn't manifest itself until a random time, but once
> manifested it will continue to fail at the exact same spot. This spot
> is different for all users but once it does happen it continues to
> fail.
>
> This is typically in our make flow when it is forking or spawning
> another process to execute a command.
>
> Here is a snip
>
> ../../../../..//class/mfs/engine/disp/gf100_engine.mfs
> /usr/bin/env: ../../../../..//bin/Win32/cfp: Resource temporarily 
> unavailable
> makepp: Failed to build target gf100.xml
>
> One thing to note, the command that it fails on is different for all
> users. It actually fails when forking. Another example is
>
> /usr/bin/bash: fork: Resource temporarily unavailable
> make[4]: *** [ObjWin32/.PTreeVisitor.d] Error 128
>
> After looking at the cygwin source I found that EAGAIN which produces
> this message is mapped to many windows errors. So after more
> investigation I found it to be Win32 error 234 which is
> ERROR_MORE_DATA. I then traced this down to when cygwin calls
> CreateProcessAsUser in spawn.cc
>
> So my question, has anyone seen this before. I don't think it is a
> cygwin bug since it the win api returning this error, but maybe it is
> something to do with the call.
>
> Any pointers or tips would be helpful.
Hi all,
I also have this problem. I use xfce as my desktop and window manager 
and after a totally arbitrary amount of time (sometimes 10 mins, 
sometimes days) I start getting this error "Failed to fork (Resource 
temporarily unavailable)" from the xfce4-panel and it refuses to launch 
anything. Xfdesktop usually goes shortly after as well. I also noticed 
by the time this starts happening the process stops showing up when I do 
a "ps -ef", It doesn't even show up when I pass it a -W either, I have 
to kill it from Task Manager and start a new one. About this time I also 
start repeatedly getting this exact error as well: 
http://www.cygwin.com/ml/cygwin/2006-07/msg00239.html when I build my 
companies tool in cygwin (with make-3.80).

I've reinstalled cygwin several times, tried doing a rebaseall, tried 
changing the heap size, and none of that made any difference for me. 
(Have not tried the new dll posted in this thread but it was reported 
that did not solve his problem). I tried downgrading bash from 3.1-6 to 
3.0-14 and it seemed like it had fixed both problems but then a week 
later it returned. I tried setting 
"CYGWIN=error_start=c:\cygwin\bin\gdb.exe codepage:oem" and verifyed it 
worked but it does not catch the sh.exe crash.

I use the xfce4 ports from: http://www.amazepc.com/bamanzi/cygwin/xfce4/ 
(several versions, it happened with all of them) and have also tried the 
pkgs in ftp://sunsite.dk/projects/cygwinports. I had everything working 
perfectly for over a year with the xfce ports mentioned, then something 
happened to my cygwin install in a power outage so I did a clean 
reinstall. Ever since I have had all these nightmare problems. Any 
suggestions for what to try/check/install/log/debug would be greatly 
appreciated.
Thanks,
Nick

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

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

* RE: Resource Temporarily Unavailable
  2006-09-07 23:55 Chris McIntosh
@ 2006-09-08  0:20 ` Dave Korn
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Korn @ 2006-09-08  0:20 UTC (permalink / raw)
  To: cygwin

On 08 September 2006 00:56, Chris McIntosh wrote:

> I have ran out of debugging ideas. 

  Disable the "Logitech Process Monitor" service?

  (That's a huuge WAG btw. but it's been known to help before...)

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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

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

* Re: Resource Temporarily Unavailable
@ 2006-09-07 23:55 Chris McIntosh
  2006-09-08  0:20 ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Chris McIntosh @ 2006-09-07 23:55 UTC (permalink / raw)
  To: cygwin

The actual error message was Message too long, which is the new
mappnig you set for error 234 (ERROR_MORE_DATA) being returned from
CreateProcess.

I made a support call to microsoft and the reason this error is
created is because any sub dll that CreateProcess might need will
return its error through CreateProcess. They also recommended the heap
settings, but after some investigation and using desktop heap I have
found that not to be my issue.

I have ran out of debugging ideas. According to Microsoft some dll
that CreateProcess is loading is probably throwing the ERROR_MORE_DATA
error, but I don't understand why a CreateProcess under cygwin is any
different than a CreateProcess run outside of the cygwin environment.


On Thu, Sep 07, 2006 at 04:28:13PM -0700, Chris McIntosh wrote:
>Christopher, thanks for the quick response.
>
>Unfortunately it didn't change anything except we got a different error
>message.

Details are important.  What was the actual error message?

>Do you have any suggestions or pointers on how I can debug this further.

http://sources.redhat.com/ml/cygwin/2005-09/msg00945.html

is the only other suggestion I can offer unless you can find something
which mentions the cause for this Windows error.

cgf

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

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

* Re: Resource Temporarily Unavailable
  2006-09-07 20:04 Chris McIntosh
@ 2006-09-07 20:51 ` Christopher Faylor
  2006-09-11 15:56 ` Nick Deubert
  1 sibling, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2006-09-07 20:51 UTC (permalink / raw)
  To: cygwin

On Thu, Sep 07, 2006 at 01:04:49PM -0700, Chris McIntosh wrote:
>Hello, I work at a company where we have a complicated Linux build. We
>use cygwin to mimic this build on windows for some of our windows
>centric people.
>
>At different times when cygwin forks it will throw a Resource
>temporarily Unavailble error. I am tempted to call this "Random"
>because it doesn't manifest itself until a random time, but once
>manifested it will continue to fail at the exact same spot. This spot
>is different for all users but once it does happen it continues to
>fail.
>
>This is typically in our make flow when it is forking or spawning
>another process to execute a command.
>
>Here is a snip
>
>../../../../..//class/mfs/engine/disp/gf100_engine.mfs
>/usr/bin/env: ../../../../..//bin/Win32/cfp: Resource temporarily 
>unavailable
>makepp: Failed to build target gf100.xml
>
>One thing to note, the command that it fails on is different for all
>users. It actually fails when forking. Another example is
>
>/usr/bin/bash: fork: Resource temporarily unavailable
>make[4]: *** [ObjWin32/.PTreeVisitor.d] Error 128
>
>After looking at the cygwin source I found that EAGAIN which produces
>this message is mapped to many windows errors. So after more
>investigation I found it to be Win32 error 234 which is
>ERROR_MORE_DATA. I then traced this down to when cygwin calls
>CreateProcessAsUser in spawn.cc
>
>So my question, has anyone seen this before. I don't think it is a
>cygwin bug since it the win api returning this error, but maybe it is
>something to do with the call.
>
>Any pointers or tips would be helpful.

A google search for CreateProcess and ERROR_MORE_DATA shows a patch for
make which avoids putting empty environment variables in the environment
block sent to CreateProcess.

So, I've added a check for that to cygwin and generated a new snapshot at:

http://cygwin.com/snapshots/

Be advised that the snapshot version of Cygwin has been built with
debugging turned on, which means that it will be slower and noisier than
a normal cygwin release.  In particular, there is a false positive but
inconsequential report about handle closing which can be generated
fairly easily.

cgf

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

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

* Resource Temporarily Unavailable
@ 2006-09-07 20:04 Chris McIntosh
  2006-09-07 20:51 ` Christopher Faylor
  2006-09-11 15:56 ` Nick Deubert
  0 siblings, 2 replies; 8+ messages in thread
From: Chris McIntosh @ 2006-09-07 20:04 UTC (permalink / raw)
  To: cygwin

Hello, I work at a company where we have a complicated Linux build. We
use cygwin to mimic this build on windows for some of our windows
centric people.

At different times when cygwin forks it will throw a Resource
temporarily Unavailble error. I am tempted to call this "Random"
because it doesn't manifest itself until a random time, but once
manifested it will continue to fail at the exact same spot. This spot
is different for all users but once it does happen it continues to
fail.

This is typically in our make flow when it is forking or spawning
another process to execute a command.

Here is a snip

../../../../..//class/mfs/engine/disp/gf100_engine.mfs
/usr/bin/env: ../../../../..//bin/Win32/cfp: Resource temporarily unavailable
makepp: Failed to build target gf100.xml

One thing to note, the command that it fails on is different for all
users. It actually fails when forking. Another example is

/usr/bin/bash: fork: Resource temporarily unavailable
make[4]: *** [ObjWin32/.PTreeVisitor.d] Error 128

After looking at the cygwin source I found that EAGAIN which produces
this message is mapped to many windows errors. So after more
investigation I found it to be Win32 error 234 which is
ERROR_MORE_DATA. I then traced this down to when cygwin calls
CreateProcessAsUser in spawn.cc

So my question, has anyone seen this before. I don't think it is a
cygwin bug since it the win api returning this error, but maybe it is
something to do with the call.

Any pointers or tips would be helpful.

Thanks,
Chris McIntosh

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

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

end of thread, other threads:[~2006-10-02 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-07 23:28 Resource Temporarily Unavailable Chris McIntosh
2006-09-07 23:31 ` Christopher Faylor
  -- strict thread matches above, loose matches on Subject: below --
2006-09-07 23:55 Chris McIntosh
2006-09-08  0:20 ` Dave Korn
2006-09-07 20:04 Chris McIntosh
2006-09-07 20:51 ` Christopher Faylor
2006-09-11 15:56 ` Nick Deubert
2006-10-02 19:51   ` Chris McIntosh

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).