httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@raleigh.ibm.com>
Subject Re: fix for hybrid server problems.
Date Tue, 27 Apr 1999 20:00:05 GMT

We considered using a socket to break us out of select.  Does that have
security issues associated with it?  On UNIX, I can use Unix Domain
Sockets, do I have a similar thing on (Windows(NT|98|95) && OS/2)?  

There was also the idea that all interprocess communication could be done
using this pipe/socket between parent and child.  This means all of our
OS's would behave the same way for Interprocess Comm.  Using a socket or a
pipe breaks this ability, because then at least one thread has to be in
the select in order to receive a message from the parent.  In general a
BAD idea.

The socket also doesn't take care of the case where we get a message from
the parent process to shut-down immediately, we break out of select, and
start freeing pools, while we still have threads doing work.  

This has other concerns, not likely to happen, but it is possible.
(twenty threads out serving requests.  Each has it's own sub-pool 1-20.)

Thread 21 is in select, and it gets kicked out, and starts cleaning things
up using clean_child_exit.  We clean pool 1, and then context switch.
Thread 2 is activated, and it needs more mem, so it allocates more, oh
wait, there is space at the beginning of the pool.  It takes that space,
and writes some data from a secure web page to it.  Thread 1 is woken up,
and it reads memory from it's pool to send data out over the network.  In
a good (lucky) case, it just sends out the secure data that was written
into what it consider's it's memory area.  In the bad case, we seg-fault,
and we never do the child_exit phase of the modules.

This is why we considered doing a signal loop.  It basically tells all the
threads, either finish this request and stop or "STOP NOW!"  In either
case, we will know that all threads are going to go away and when they do,
we can call clean_child_exit safely.

Ryan

On Tue, 27 Apr 1999, Ben Laurie wrote:

> Ryan Bloom wrote:
> > 3) We could use pipes to break out of select, but as far as I can tell,
> > you can't use select with pipes on Windows NT(95|98?????)
> 
> So connect to yourself via a socket.
> 
> Cheers,
> 
> Ben.
> 
> --
> http://www.apache-ssl.org/ben.html
> 
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
>      - Indira Gandhi
> 

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	



Mime
View raw message