Re: Events, Destruction and Locking

2009-07-07 Thread Paul Querna
On Mon, Jul 6, 2009 at 10:50 PM, Justin Erenkrantzjus...@erenkrantz.com wrote: On Mon, Jul 6, 2009 at 10:20 PM, Paul Quernap...@querna.org wrote: I am looking for an alternative that doesn't expose all this crazyness of when to free, destruct, or lock things.  The best idea I can come up with

Re: Events, Destruction and Locking

2009-07-07 Thread Paul Querna
On Mon, Jul 6, 2009 at 10:56 PM, Mladen Turkmt...@apache.org wrote: Paul Querna wrote: Can't sleep, so finally writing this email I've been meaning to write for about 7 months now :D Pools don't help, but don't really make it worse, and are good enough for the actual cleanup part -- the

Moving set_worker_param to modules/proxy/proxy_util.c

2009-07-07 Thread jean-frederic clere
Hi, Now with the changes that have been made in the mod_proxy logic it is possible to create workers dynamically in balancer modules (I need that for mod_cluster and I have been experimenting with modules/proxy/balancers/mod_lbmethod_heartbeat.c). set_worker_param is needed to create a

Re: Events, Destruction and Locking

2009-07-07 Thread Mladen Turk
Paul Querna wrote: This deals with removing an event from the pollset, but what about an event that had already fired, as I gave in the original example of a timeout event firing the same time a socket close event happened? In that case I suppose the only solution is to make the operations

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread ricardo13
Hi, Sorry, I didn't know that was in wrong forum. What's the best list to write this doubt ?? I want to modify MPM Worker (worker.c) to develop some scheduling algorithms. A first scheduling algorithm would be implement priority. Two queues (worker_queue1 and worker_queue2) of sockets where

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread Graham Dumpleton
2009/7/7 ricardo13 ricardoogra...@gmail.com: Hi, Sorry, I didn't know that was in wrong forum. What's the best list to write this doubt ?? You may well be on the right list, but right now it isn't too clear that you really need to be modifying the actual MPM code. I want to modify MPM

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread Mladen Turk
ricardo13 wrote: I want to modify MPM Worker (worker.c) to develop some scheduling algorithms. A first scheduling algorithm would be implement priority. Two queues (worker_queue1 and worker_queue2) of sockets where threads (workers) get all requests from worker_queue1 first, afterget all

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread ricardo13
Graham Dumpleton-2 wrote: 2009/7/7 ricardo13 ricardoogra...@gmail.com: Hi, Sorry, I didn't know that was in wrong forum. What's the best list to write this doubt ?? You may well be on the right list, but right now it isn't too clear that you really need to be modifying the actual

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread Graham Dumpleton
2009/7/7 ricardo13 ricardoogra...@gmail.com: Graham Dumpleton-2 wrote: 2009/7/7 ricardo13 ricardoogra...@gmail.com: Hi, Sorry, I didn't know that was in wrong forum. What's the best list to write this doubt ?? You may well be on the right list, but right now it isn't too clear that

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread ricardo13
Mladen Turk-3 wrote: ricardo13 wrote: I want to modify MPM Worker (worker.c) to develop some scheduling algorithms. A first scheduling algorithm would be implement priority. Two queues (worker_queue1 and worker_queue2) of sockets where threads (workers) get all requests from

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread ricardo13
Graham Dumpleton-2 wrote: 2009/7/7 ricardo13 ricardoogra...@gmail.com: Graham Dumpleton-2 wrote: 2009/7/7 ricardo13 ricardoogra...@gmail.com: Hi, Sorry, I didn't know that was in wrong forum. What's the best list to write this doubt ?? You may well be on the right list, but

Re: Where Do I Create Queues in MPM Worker

2009-07-07 Thread ricardo13
Mladen Turk-3 wrote: ricardo13 wrote: I want to modify MPM Worker (worker.c) to develop some scheduling algorithms. A first scheduling algorithm would be implement priority. Two queues (worker_queue1 and worker_queue2) of sockets where threads (workers) get all requests from

Re: Events, Destruction and Locking

2009-07-07 Thread Graham Leggett
Paul Querna wrote: Can't sleep, so finally writing this email I've been meaning to write for about 7 months now :D One of the challenges in the Simple MPM, and to a smaller degree in the Event MPM, is how to manage memory allocation, destruction, and thread safety. A 'simple' example:

Re: Events, Destruction and Locking

2009-07-07 Thread Paul Querna
On Tue, Jul 7, 2009 at 7:34 AM, Graham Leggettminf...@sharp.fm wrote: Paul Querna wrote: I think it is possible to write a complete server that deals with all these intricacies and gets everything just 'right', but as soon as you introduce 3rd party module writers, no matter how 'smart' we

Re: Events, Destruction and Locking

2009-07-07 Thread Graham Leggett
Paul Querna wrote: Nah, 90% of what is done in moduels today should be out of process aka in FastCGI or another method, but out of process. (regardless of MPM) You're just moving the problem from one server to another, the problem remains unsolved. Whether the code runs within httpd

Re: Events, Destruction and Locking

2009-07-07 Thread Paul Querna
On Tue, Jul 7, 2009 at 8:39 AM, Graham Leggettminf...@sharp.fm wrote: Paul Querna wrote: Nah, 90% of what is done in moduels today should be out of process aka in FastCGI or another method, but out of process. (regardless of MPM) You're just moving the problem from one server to

Re: Events, Destruction and Locking

2009-07-07 Thread Paul Querna
On Tue, Jul 7, 2009 at 10:01 AM, Graham Leggettminf...@sharp.fm wrote: Paul Querna wrote: Yes, but in a separate process it has fault isolation.. and we can restart it when it fails, neither of which are true for modules using the in-process API directly -- look at the reliability of QMail,

Re: Events, Destruction and Locking

2009-07-07 Thread Graham Leggett
Paul Querna wrote: Yes, but in a separate process it has fault isolation.. and we can restart it when it fails, neither of which are true for modules using the in-process API directly -- look at the reliability of QMail, or the newer architecture of Google's Chrome, they are both great

Re: Events, Destruction and Locking

2009-07-07 Thread Graham Leggett
Paul Querna wrote: It breaks the 1:1: connection mapping to thread (or process) model which is critical to low memory footprint, with thousands of connections, maybe I'm just insane, but all of the servers taking market share, like lighttpd, nginx, etc, all use this model. It also prevents

Re: Events, Destruction and Locking

2009-07-07 Thread Jeff Trawick
On Tue, Jul 7, 2009 at 9:39 AM, Paul Querna p...@querna.org wrote: On Tue, Jul 7, 2009 at 8:39 AM, Graham Leggettminf...@sharp.fm wrote: Paul Querna wrote: Nah, 90% of what is done in moduels today should be out of process aka in FastCGI or another method, but out of process.

Re: Events, Destruction and Locking

2009-07-07 Thread Akins, Brian
This is how I envisioned the async stuff working. -Async event thread is used only for input/output of httpd to/from network* -After we read the headers, we pass the request/connection to the worker threads. Each request is sticky to a thread. Request stuff may block, etc, so this thread pool

Re: Events, Destruction and Locking

2009-07-07 Thread Paul Querna
On Tue, Jul 7, 2009 at 12:54 PM, Akins, Brianbrian.ak...@turner.com wrote: This is how I envisioned the async stuff working. -Async event thread is used only for input/output of httpd to/from network* -After we read the headers, we pass the request/connection to the worker threads.  Each

Re: Events, Destruction and Locking

2009-07-07 Thread Graham Leggett
Akins, Brian wrote: This is how I envisioned the async stuff working. -Async event thread is used only for input/output of httpd to/from network* -After we read the headers, we pass the request/connection to the worker threads. Each request is sticky to a thread. Request stuff may block,

Re: Events, Destruction and Locking

2009-07-07 Thread Akins, Brian
On 7/7/09 1:02 PM, Graham Leggett minf...@sharp.fm wrote: Ideally any async implementation should be 100% async end to end. I don't believe that its necessary though for a single request to be handled by more than one thread. True. However, what about things that may be process intensive.

Re: svn commit: r791454 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/core_filters.c

2009-07-07 Thread Dan Poirier
traw...@apache.org writes: Author: trawick Date: Mon Jul 6 12:03:20 2009 New Revision: 791454 URL: http://svn.apache.org/viewvc?rev=791454view=rev Log: SECURITY: CVE-2009-1891 (cve.mitre.org) Fix a potential Denial-of-Service attack against mod_deflate or other modules, by forcing the

Re: svn commit: r791617 - in /httpd/httpd/trunk/modules: cluster/mod_heartmonitor.c proxy/balancers/mod_lbmethod_heartbeat.c

2009-07-07 Thread Ruediger Pluem
On 07/06/2009 11:14 PM, jfcl...@apache.org wrote: Author: jfclere Date: Mon Jul 6 21:14:21 2009 New Revision: 791617 URL: http://svn.apache.org/viewvc?rev=791617view=rev Log: Add use slotmem. Directive HeartbeatMaxServers 10 to activate the logic. Otherwise it uses the file logic to

Re: Events, Destruction and Locking

2009-07-07 Thread Ruediger Pluem
On 07/07/2009 07:02 PM, Graham Leggett wrote: Ideally any async implementation should be 100% async end to end. I don't believe that its necessary though for a single request to be handled by more than one thread. I agree. I see no reason for multiple threads working on the same request at

Re: Events, Destruction and Locking

2009-07-07 Thread Bojan Smojver
On Tue, 2009-07-07 at 16:01 +0200, Graham Leggett wrote: As is httpd prefork :) Yeah, definitely my favourite MPM :-) As far as I understand this, the deal is that we need to have a complete request before we start processing it. Otherwise, we can get stuck and one of our precious resources is

need some help from an awk wizard ...

2009-07-07 Thread Guenter Knauf
All, I'm now trying for hours to get 4 symbols of mod_watchdog into an export list :( these 4 symbols are: ap_hook_watchdog_exit, ap_hook_watchdog_init, ap_hook_watchdog_need, ap_hook_watchdog_step. The problem seems to be that in the pre-preocessed file the function macro expands to one line with

segmentation fault in worker.c

2009-07-07 Thread Andrej van der Zee
Hi, I compiled httpd-2.2.11 with ./configure --with-included-apr --enable-ssl --disable-cgi --disable-cgid --with-mpm=prefork --enable-status. HTTP requests seem to be processed fine from a users point of view, but I get many segfaults in my apache log when I seriously increase the workload. Here