[Mongrel] Problem with daemonize

Josh Moore lists at ruby-forum.com
Thu Aug 14 00:18:59 EDT 2008


Hi,

Sorry it took so long have been called way to other projects.  Now that
I am back I have been doing some looking and it seams whenever I try to
access the file system (even to run an 'ls' or 'pwd' command) it spawns
another mongrel and hangs.  The last line in the strace log:

20558 select(4, [3], [2], [], {0, 871586}) = -1 EBADF (Bad file
descriptor)

This line prints a huge number of times in a very very short period of
time (I shortend the log so that it would be smaller.  But it printed
this line in the order of 100,000 times in a couple of minutes).  Even
when I run as the root user this same thing happens.

I have attached the strace log because I have looked at it but cannot
really make heads or tails of what it means.  Thanks, for all ideas.

Josh

P.S. Sorry, the strace file is about 400k and is to big to attach.  If 
anybody is willing to look at it please just email me 
joshua.moore at armorize.com and I will be happy to send it to you.

unknown wrote:
>>>>>> "Josh" == Josh Moore <lists at ruby-forum.com> writes:
>     >> When daemonized, does it run as you, or as another user?
>     Josh> The deamonized process runs as me.
> 
>     >> When it hangs, do you see "svn" processes waiting in the ps 
> listing?
>     Josh> There is no svn process in the ps listing ("ps afx | grep 
> svn")
> 
>     >> Do you get errors from the popen calls that you are doing?
>     Josh> It actually hangs on the call and I do not get any output.
> 
>   I would run "strace -f -p XXXX" on the mongrel process(es), and try
> things.  I would suspect either that the exec part of the popen() fails
> due to $PATH issues.  Since there is no "svn" process around, then it
> should not be an issue with the underlying ssh that might be invoked.
>   You might also replace the call to svn with echo/cat/env.
> 
>   instead of:
>   foo = IO.popen("svn stuff", "r")
> 
>   do:
>   foo = IO.popen("sh -c 'env >/tmp/env$$; cat /tmp/canned-svn-reply'", 
> "r")
> 
>   and if that helps diag things.
> 
> --
> Michael Richardson <mcr at simtone.net>
> Director -- Consumer Desktop Development, Simtone Corporation, Ottawa, 
> Canada
> Personal: http://www.sandelman.ca/mcr/
> 
> SIMtone Corporation fundamentally transforms computing into simple,
> secure, and very low-cost network-provisioned services pervasively
> accessible by everyone.  Learn more at www.simtone.net and 
> www.SIMtoneVDU.com
-- 
Posted via http://www.ruby-forum.com/.


More information about the Mongrel-users mailing list