Thanks for the feedback guys.

        I'm looking into the issue, and I am bringing the needed parties in
on this.

        Basically, Justin is right in the fact that it does seem that the
forks/threads are butting heads. Meanwhile, Rob, what distribution are you
running on at the moment?

        The reason I ask this is the fact that alot of the threading
libraries were significantly changed from the 6.x series to the 7.x series.

-Jesse
Linux Systems Lead
Macromedia, Inc
[EMAIL PROTECTED]

        

-----Original Message-----
From: Justin Buist [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 8:48 PM
To: CF-Linux
Subject: Re: Cfexecute and CF5


waitpid() is a C system call that waits for a given process to finish it's
job.  What the CFserver process is doing is most likely:

fork()ing itself a new process
exec() into the new one that you want to run
..... then the parent will sit there with a waitpid() waiting for it's child
to die.  If you don't wait() for the child to die it'll become a
zombie.  The pid of the child is obtained at the time of the fork() call
fyi.

Now, if I had to guess at what Allaire did wrong it would be this:

the fork() call could have failed -- there are a few different things that
could cause this... and they still wait() for a non-exsitant child to die
off.

there could be a threading issue... and when two cfexecute's happen close
enough together the 2nd fork() call overwrites a variable in memory that's
not properly protected and both waitpid() calls sit there looking for the
same child.  the first will succeed, the second will fail.  In the
meantime there's a zombie child process running around now.  If the box
has zombie processes runnging around I'd bet this is the case.  This would
also account for the "sometimes it works sometimes it doesn't" that you're
getting.

I'd highly doubt that the error is being caused by anything you're
doing.  If it is they certainly should have trapped the error (IMHO) and
given you a much better error message.  I'd chalk it up to an error in CF5
(which should be fixed)... 

I'd really love to see Allaire come up with a good way of seperating the
commands from their main engine (like a cfx_ tag works...) and open
sourcing all their tags.  I once pondered actually trying to reimplement
all the tags and open them up but this seemed like way too much work for
somebody that's not a huge fan of CF to begin with. :)

Dunno if this helps you at all or not.  I'd just file a bug report with
Allaire or something.  See what they know about it.

Justin Buist





On Thu, 31 May 2001, CF-LINUX wrote:

> This script used to work flawlessly when I was running CF 4.5. Now
> approximately 30% of the time I receive this error. Any idea what
waitpid()
> is or any fixes
> 
> Error Diagnostic Information
> waitpid() returned the error: No child processes (10).
> The error occurred while processing an element with a general identifier
of
> (CFEXECUTE), occupying document position (43:1) to (43:198).
> 
> 
> Script
> 
> <cfexecute name="/usr/bin/html2ps.sh"
>
arguments="/home/httpd/html/HTML2PostScript/workdata/#Local_TempFile_String#
> /home/httpd/html/HTML2PostScript/workdata/#Local_OutputFile_String#"
> timeout="250"></cfexecute>
> 
> Thanks
> Rob
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-linux%40houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_linux or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to