History log of /httpd/server/mpm/event/event.c
Revision Date Author Comments Expand
b781fc8ee2aa43fc981ee05bfc3eae4af6fbbbd8 1674697 19-Apr-2015 ylavic

mpm_event: follow up to r1666468 and r1666618. We don't need to return 0 in the compare function, but for debugging purpose which we could implement later if necessary (in a separate function). For now, keep the function simple as in 2.4.x to ease backport, and add a comment about why we never return 0 here.

727389c57ce709be2156f7a134c9f87867e06ac3 1666618 14-Mar-2015 ylavic

mpm_event: follow up to r1666468. We only need one compare function for add semantic with apr_skiplist_insert() and unique timers (pointers). It also should work with apr_skiplist_remove() and apr_skiplist_find(), be they used some day.

4f29b65ab4b547ad5dbe506e2d0ff5d12ead9247 1666468 13-Mar-2015 ylavic

mpm_event: Allow for timer events duplicates. Meanwhile ap[r]_skiplist_add()...

78ae177952e97903c19115e0f1b0383a5ca22eb4 1664071 04-Mar-2015 ylavic

core: If explicitly configured, use the KeepaliveTimeout value of the virtual host which handled the latest request on the connection, or by default the one of the first virtual host bound to the same IP:port. For non-async MPMs, use either r->server's or c->base_server's value in ap_process_http_sync_connection() depending on a new server_rec's flag called keep_alive_timeout_set and determined at config time. For event MPM, use a queue per timeout value, chaining the queues per type (keepalive wrt KeepAliveTimeout, write completion wrt to Timeout) so that maintenance can be done on all the queues from the head, and such that insertions/maintenance remain in O(1). A server config is created and pointing to the queue of each vhost at post_config time, hence the config can be associated to the connection state (cs) at post_read_request time (keep_alive_timeout_set is used to determine r->server vs c->base_server here), and we can simply insert with TO_QUEUE_INSERT(cs->sc->q, cs). PR56226. While at it, since each queue now embeds it own timeout and hence the expiration_time of the cs has changed to a queue_timestamp (the time it was queued), we can detect clock skews and expire entries immediatly if the system is set (eg. far) in the past during runtime and we want to avoid waiting for (eg.) centuries before the current logic kills them. Any entry which is registered above now + q->timeout is concerned, and is now cleaned from the queue when encountered. PR57374.

e967299113e51f926d3884b6cf422c3ae1523c42 1663017 01-Mar-2015 ylavic

mpm_event: follow up to r1538490, r1545736, r1604350, r1639614 and r1642868. Clear and restore sbh in notify_suspend() and notify_resume() respectively.

a066753919fc4164f75a1f7716e4b01eacbac4e7 1662441 26-Feb-2015 ylavic

mpm_event: follow up to r1493741 and r1662440. Really fix style by not introducing tabs...

6bfadf9b364675725402f93971f836a3e51b9507 1662440 26-Feb-2015 ylavic

mpm_event: follow up to r1493741. Fix typo (and style) for event_unregister_socket_callback()'s final result.

e762b0928f057bd4c5c85ac841c08b5c6410f67e 1651088 12-Jan-2015 covener

Update conn_rec.id when a new thread begins working on a connection, because the old thread may work on a new connection and assign the same ID in parallel. Submitted By: Michael Thorpe Committed By: covener

9bd5881436f0874cd4db0db36bc6da5e4162be79 1643279 05-Dec-2014 ylavic

mpm_event(opt): avoid casts/comparisons from unsigned to signed (atomics).

7101bba7dc78a87dc5ca25ccbbacd3579b83de03 1642868 02-Dec-2014 ylavic

mpm_event: follow up to r1639614 (trunk) and r1642858 (2.4.x). Notify suspend in any case when starting lingering close (blocking), and outside the lingering queue's critical section.

5022bc317781314105104f6881f823e5d6d64e66 1640763 20-Nov-2014 ylavic

mpm_event(opt), mpm_worker, mpm_prefork: follow up to r1635521, r1640161. Retain num_buckets and max_buckets accross restarts so that we can determine whether new buckets were allocated and set their idle_spawn_rate at the same level as the existing ones (max). Also, adjust ap_daemons_limit and ap_daemons_to_start lower bounds at mpm_run() time, once num_buckets is available for the current generation (previously done at check_config time, hence before num_buckets is computed, and then with the previous generation's value).

b9fcb4dd4b14369c068443f93b13671d56ad1588 1640161 17-Nov-2014 ylavic

mpm_event(opt), mpm_worker: follow up to r1635521. Allocate retained idle_spawn_rate vector on the process pool.

28db166abbb1fd04d658bb9f221c47fc7b166c77 1640031 16-Nov-2014 ylavic

event, eventopt: follow up to r1638879 and r1639960. Clear the pool in ap_push_pool() before recycling.

c5a33c481a231db52b3df60df17ea985db2c56c4 1639614 14-Nov-2014 covener

don't call notify_suspend() in a worker thread after start_lingering_close_common may have put the socket back into the pollset. If it becomes readable too quickly, cs can be free'ed or accessed concurrently.

48a37fca6df45c14a1510c52dc8062d3b4e177d6 1639564 14-Nov-2014 covener

revert r1638691, more comprehensive followup planned shortly.

cd4bcc4a63294eaab3cb5434a61ff2aa1a757278 1638879 12-Nov-2014 covener

avoid dereferencing a recently apr_pool_clear()'ed event_conn_state_t *cs in several paths where ptrans is being recycled at the end of a request.

f4d965ae26bc0c8c1c20cb5109507159e91313e8 1638691 12-Nov-2014 covener

Fix a bug in r1604350 that can lead to crashes in the event MPM under load. if start_lingering_close_blocking() returns 0, notify_suspend() will write a 1 into some potentially recently free'd memory from ptrans (cs->suspended).

a742cbb3e85669473b3233f30e3978bb6a20083c 1635521 30-Oct-2014 ylavic

MPMs, core: make duplicated listeners (SO_REUSEPORT) introduced in r1599531 less intrusive. Submitted by: Yingqi Lu <yingqi.lu@intel.com> Modified/Committed by: ylavic Add ListenCoresBucketsRatio which is a configurable ratio between the number of CPU cores (online) and the number of listeners buckets to create, defaulting to zero (so that listeners buckets become an opt-in, ie. ncpus / ratio > 1). This could also be made an opt-out by using the previous hardcoded value (8) as default. Make ap_close_listeners() act on all the listeners (including duplicated ones), since the function is also called externally (eg. mod_cgid, mod_ssl_ct and possibly any third party module) to cleanup opened descriptors when a process is forked (the duplicated listeners are kept in a scoped/static variable). Add ap_close_listeners_ex() to close a single bucket of listeners, used by the children to close unused duplicates and internally by ap_close_listeners(). Make ap_duplicate_listeners() compute the number of buckets to be used, instead of each MPM. This number is now based on the above ratio and will not change unless asked to (given *num_buckets < 1, that is when the MPM does not run in one-process mode nor after a graceful restart). Remove some global variables (mpm_listen, enable_default_listeners) previously used to communicate between MPMs and ap_listen, since ap_duplicate_listeners() API can now be used to do so. Also rename num_buckets as ap_num_listen_buckets, and prefix have_so_reuseport with ap_ (both printed by ap_log_common(), hence kept global). Detect ap_have_so_reuseport once only at startup. Restore dummy_connection() as before r1599531 since sending POD signals should not depend on the number of listeners buckets (there is still one single socket receiving the connections). For each MPM (concerned), move the bucket data (pod, listeners and eventually accept mutex) into a struct and instanciate an array of them (sized by the number of buckets), for each child to use its own data according to its bucket index, and the parent to maintain the whole.

8e96fb3f467d3ac42d06316ced4edc705ba30127 1629990 07-Oct-2014 ylavic

core: follow up to r1629909: fix min_spare_threads lower bound and check wrt num_buckets.

6f2b40c28d377deb94c65a9787d8a1bf0de43078 1629925 07-Oct-2014 ylavic

core: ensure that MPMs return an error on runtime failure and hence that httpd's main process also exits with an error.

a94a0f8604bc182459825c18b5574236ea2673c7 1629918 07-Oct-2014 ylavic

mpms: enforce assertion that unreachable code is not reached.

60f145444e00399b806c6e1329689ae57603a664 1629909 07-Oct-2014 ylavic

core: Use process scoreboard to store each child's listener bucket, and silently adjust the configured number of processes/threads to be above the computed number of listener buckets (depending on the CPU cores).

2d96b72b0ef10f756f89eb5695eff0b592843e94 1629577 06-Oct-2014 jkaluza

event: Fix worker-listener deadlock in graceful restart caused by get_worker() allocating new worker after ap_queue_info_term(), but not setting the have_idle_worker variable. PR 56960. Submitted By: Zin UDA Committed By: jkaluza

52d1a711e1e2fc3aed32827fb95eea0268de56eb 1629576 06-Oct-2014 jkaluza

event: have_idle_worker must not be cleared in every listener_thread iteration. Fixes bug when workers were not stopped after graceful restart (introduced in r1605328).

15660979a30d251681463de2e0584853890082ac 1613493 25-Jul-2014 covener

mod_proxy_wstunnel: Concurrent websockets messages could be lost or delayed with ProxyWebsocketAsync enabled. Submitted By: Edward Lu Committed By: covener

d3a471a02d42dc6b9b10fe53774728cb90681570 1610323 14-Jul-2014 rjung

Avoid C99 idiom. Followup to r1604466.

609c1240f4b281e05eaec25b4b0c43e796117fd4 1605946 27-Jun-2014 takashi

Revert r1601943, r1602058, r1605307 (socket callback returning pollfds) Revert r1605369 (wstunnel refactoring) per discassion on dev@httpd.a.o thread Message-ID: <CALK=YjN9HfThP_k_rF9iJPcUhcQk9sNOaDPxZNG+HcJNWS4ZAQ@mail.gmail.com>

850abbd66c421c3766525ca93dfa8c4789205211 1605328 25-Jun-2014 takashi

event: minify local variables scope.

73563a08e41440f717a1ab3d9c7f5403db566fe4 1605307 25-Jun-2014 takashi

follow up r1601943: Each apr_pollset_poll modified *out_pfd, so we need to copy it.

d20ee20f0812d5c337973041394ae7568e394301 1605067 24-Jun-2014 covener

followup to r1604350, move the c->sbh assignment to immediately before the socket is added to the timeout queue. Technically not needed because we hold the lock on the timeout queue, but more consistent with other blocks that leave the thread. Submitted By: Edward Lu <Chaosed0 gmail com> Committed By: covener

e0ce7e52cd7bd8ad6b4b67a1d550893c158a9714 1604466 21-Jun-2014 ylavic

event: Avoid timer's mutex two successive locks/unlocks with unrelated (and optional) work in between. Also saves declaration/usage of pointer 'ep' by reusing available 'te' instead, and removes duplicated 'te' declaration in a local block.

e9b6f7c8b9ede42dc0843e1eb2de001a5318d201 1604451 21-Jun-2014 ylavic

event: follow up to r1604347. Don't leak the timer event when it is cancelled.

434428892cc2f87c9b2556be747b2662809caa5d 1604350 21-Jun-2014 covener

missed a case in r1538490: PR56639 Always NULL c->sbh before putting a connection back in a pollset or queue. We can't NULL c->sbh at the bottom of process_socket() after putting a socket back on the event_pollset or having it go into lingering close, because the listener or a worker thread could A) continue on the connection or B) free and allocate the same conn_rec pointer before we get to the bottom of process_socket(). Submitted By: Edward Lu Committed By: covener

a667be1137e020ae6a49a852bc37c8fd8cbed451 1604347 21-Jun-2014 takashi

Do not call a timeout callback after the asociated socket woke and the socket callback was called. PR 56642

37d595a87da5e80d34461b837be7d7cb95e6aa82 1602826 16-Jun-2014 ylavic

Mark all unused/duplicated/closed child listeners as inactive. Fix unused "ap_listen_rec *lr;" in worker_run().

35595d55579ea9444dba455efed2fedc544aae0f 1602544 14-Jun-2014 takashi

style fix, no functional change.

5f421fb2b53b30f15648e26654dec0bd2aa65776 1602409 13-Jun-2014 takashi

eventMPM: fix SEGV in the case socket callback was registered and no timeout function was registered.

4102a740beaa5cfca0c12683fd1f754501dc325f 1601943 11-Jun-2014 takashi

Socket event callback now takes pollfd. User (e.g. mod_proxy_wstunnel) can know which socket is ready.

3b11e6ec1c5273d6a8968460db650e7ca99c49c0 1601185 08-Jun-2014 ylavic

mpm_event[opt]: Send the SSL close notify alert when the KeepAliveTimeout expires. PR54998.

0cb18804f6760c3803a42718671de6aa0e971936 1601171 08-Jun-2014 ylavic

-MPMs event & eventopt: child listeners are used in ONE_PROCESS mode too.

3a2bc69dbf5d2afe57bcc21c554aa1e3851fb159 1599641 03-Jun-2014 jim

Break out common code to be share-able

21afce42a6cd0c128dc659d30e55c47972fc0432 1599625 03-Jun-2014 jim

fold in performance hack from eventopt

776e24ab929f0ce906e43a0d2cf4b1f7a2d6b56b 1599603 03-Jun-2014 jim

Now allow MPMs to call ap_log_common()

3c990331fc6702119e4f5b8ba9eae3021aea5265 1599531 03-Jun-2014 jim

Optimize w/ duplicated listeners and use of SO_REUSEPORT where available.

72aa636f8d3b8f136d8442b914309889a9623bfe 1594301 13-May-2014 mrumph

Fix some comment typos

06b8f183140c8e02e0974e938a05078b511d1603 1593860 11-May-2014 covener

PR56333: Add an API to resume a connection that a handler has previously suspended. Submitted by: Artem <artemciy gmail.com>, Edward Lu <Chaosed0 gmail.com> Committed by: covener

259878293a997ff49f5ddfc53d3739cbdc25444e 1593857 11-May-2014 covener

Extend the socket callbacks in event to allow a timeout on the I/O callback. When a socket callback has a timeout, an associated timer event is used to remove the sockets from the pollset and call a timeout function. * This includes a noteworthy change to the main event loop. Previously, we would call epoll, then process the timer events, then iterate through the poll results. After this patch, the timer events are processed before the poll() a _non-queued_ action can change the pollset conents (a users timed callback function conversely could easily sit in a queue while the main thread continues down into epoll) * timer events can now have sockets associated with them, those sockets are removed from the pollset when the timer event fires w/o a queue to the worker. * timer events now have a canceled flag that can be toggled without locking the timer list. * Drop the severity of some wstunnel messages from DEBUG to TRACE1 * Lift the restriction on using asynchronous websockets connections but having an idle timeout

edab3912e2a8171399a5ec7283c184fd9d0d4e8c 1588806 20-Apr-2014 covener

r1494157 from eventopt for event, per sf's review comments. use a subpool of pchild since skiplist allocations will happen across threads and are only protected from other skiplist operations.

d454f4a581649ed9c7ad85d7c865920d36ab1846 1546760 30-Nov-2013 trawick

follow-up to r1546759: remove an inadvertently committed testcase

c8e4ae58e7b9eb27e5158d6980770d5064c50ba7 1546759 30-Nov-2013 trawick

Add suspend_connection and resume_connection hooks to notify modules when the thread/connection relationship changes. (Currently implemented only for the Event MPM; should be implemented for all async MPMs.)

e0e89cf8f09361f7d314a7d041dc143257c7c8c2 1546730 30-Nov-2013 trawick

fix whitespace in a debug message

90044e29e3840ebe786c67ee21f9111ffbcef59b 1545736 26-Nov-2013 trawick

Follow-up to r1538490: Ensure that conn_rec->sbh is always cleared when returning from process_socket().

d2d53047447cee1ca48ddd9777644dd1d1347f6a 1545286 25-Nov-2013 jim

Use a normalized offset point for idlers... still need to worry that atomics work as "expected", in this case that a add32 of a -1 is the "same" as dec32 (as far as effect on idlers)

1c6ad6ae62510775d157ee70085e1d735ff847e2 1545130 25-Nov-2013 jim

revert 1544876

96db7fca842e765ec64449aaf86a1e33719b03ce 1544876 23-Nov-2013 jim

Just critically warn people... but keep pushing through.

03880c49482316b8e564c1330e11dc0e654df341 1538490 04-Nov-2013 covener

c->sbh can be unexpectedly NULL when the thread that pulls the ready keepalive connection out of the queue laps the thread that put it on the queue.

d47e6decf3050517644b11e7ed726522c31f43b8 1534888 23-Oct-2013 trawick

axe unused autodata+heap (clang scan-build)

2a0710f86e6090901175480f4b716bddca263dd5 1528437 02-Oct-2013 jim

skiplist is now in apr 1.5 and above

17c3a6274eb64eef9efe5b2de59a22f46e054026 1517365 25-Aug-2013 covener

In event's process_lingering_close, close the socket and remove it from the ring as soon as we see any status that isn't APR_EAGAIN or APR_SUCCESS, instead of waiting specifically for EOF.

8966f6c6e6ed032cd17d020140e0ac1329d382b6 1493741 17-Jun-2013 jim

Fold in Eric Covener's socket callback

b9399240afdf3ec84188c614d403ff9a4fd66e93 1481396 11-May-2013 sf

update log tags replace duplicate, add missing

2c487ac43b583db869e743772a7a10b278aa2bcf 1470679 22-Apr-2013 minfrin

core, mod_ssl: Lift the restriction that prevents mod_ssl taking full advantage of the event MPM. Enable the ability for a module to reverse the sense of a poll event from a read to a write or vice versa.

4a470b153b1c251444249415190aabf912001e71 1463046 31-Mar-2013 sf

Remove some useless declarations that were shadowing other local variables of the same name.

b6ea23df6c8bed01661bcebae237b184421baa5e 1452072 03-Mar-2013 covener

rv uninitialized -- the failing checks don't set rv, so don't pass it to ap_log_error.

865eb332aefa01bf0db63ddddd3c41b793109fc1 1451706 01-Mar-2013 jim

As long as we have skiplist, use it.

e41052c690b57472c6e0a7170a2fc4faaeccca48 1433682 15-Jan-2013 jailletc36

Log a warning if ThreadStackSize has an inappropriate value. PR : 54311 Submitted by: Tianyin Xu <tixu cs ucsd edu> Only event.c has been compiled on my system. The 2 others are just cut and paste. I have left the same value for APLOGNO in event and eventopt has for the other logged messages. I don't know if it is the right way to do.

e02ff627c1e63137247e20493f6ef44b3bb1a095 1425777 25-Dec-2012 sf

Check that AsyncRequestWorkerFactor is not negative PR :54254 Submitted by: Jackie Zhang <jackie qq zhang gmail com>

409db88b012fc14bfe676f684d1b37e7d333f4ca 1410459 16-Nov-2012 jim

fdq expects a certain behavior from atomics... ensure that the event mpms check this.

ddd5a8aaf25fba9e158e554c072a1fa57eaef07a 1409878 15-Nov-2012 jim

Prefer higher-mode polling, but allow for drop down to default

554a8bb940c6c9968d9b75c45a0e549cbf49ba61 1409273 14-Nov-2012 jim

no longer needed

7cc77074d12e6ed11433da96af0df1e1a27e9b3d 1409214 14-Nov-2012 jim

Pull out the "extended" pod functions used by event and worker to core, since it will be used by Simple and Lean and likely other MPMs. Avoid duplication.

25e92b0c34577e2474e9f517d773be5b92f5391e 1393564 03-Oct-2012 minfrin

Fix spelling mistakes.

6cefee0444e9a5ab866271b09846ba8ae954d933 1364601 23-Jul-2012 trawick

Follow up to r1363557: Refactor with some existing code to slightly optimize thread tracking. Fix an implementation problem affecting statically linked MPMs which would break the ability to fail restart if a resource shortage was found immediately. Found by: rjung

65a32053cbb747cf0314ac3f655da8c7386b229e 1363557 19-Jul-2012 trawick

mpm_event, mpm_worker: Remain active amidst prevalent child process resource shortages. This is a somewhat different direction than r168182 ("transient thread creation errors shouldn't take down the whole server"). r168182: If APEXIT_CHILDSICK is received and there aren't any active children at the time, exit. Now: If APEXIT_CHILDSICK is received and we never successfully initialized a child, exit. The issue seen with the r168182 handling is that it is rather easy to be left with no active child processes (which causes the server to exit completely) during a resource shortage that lasts for some measurable period of time, as contrasted with a resource shortage that results in only a handful of allocation failures. Now the server will remain active, though as long as the resource shortage exists children may continually fail and the parent will try once per second to create a replacement. The existing logic to reduce the spawn rate after such errors will prevent the parent from trying to create children more rapidly.

383f563d00eccc1bf3f5283b346d8a232b81a265 1363440 19-Jul-2012 trawick

mpm_event, mpm_worker: Fix cases where the spawn rate wasn't reduced after child process resource shortages. The broken scenario: child X exits with APEXIT_CHILDSICK another child Y is created and reuses child X's scoreboard slot child X's exit status is processed The case that worked is when child X's scoreboard slot hadn't been reused by the time that its exit status was processed.

850ba9505c2d10d3e26c648caa968a1d41c57395 1361778 15-Jul-2012 sf

Don't count connections in lingering close state when calculating how many additional connections may be accepted

c6db27149a49091e2e1b65cef216efc4ec705028 1361773 15-Jul-2012 sf

Keep track of the number of clogged, lingering, and suspended connections

ea7ec12576188561596ddeff238e96a224a0b180 1361766 15-Jul-2012 sf

Simplify handling of MaxConnectionsPerChild If we decrement the counter at accept time and not at close time, we only need to access the counter in the listener thread and the code gets much simpler.

3104923cb51cf5826c97368d1f0d5202c352cd4f 1343087 27-May-2012 sf

Fix MaxConnectionsPerChild This was broken when the handling of lingering close was moved into the listener thread. - Make the connection counting thread safe. - Do the counting in the connection pool cleanup to ensure that it gets also executed if the listener thread closes the connection. - Add a trace log message when a process is recycled.

82f89164814b3396a5d32c87d27fdd843d8501c4 1343085 27-May-2012 sf

rename requests_this_child to conns_this_child, which is more accurate

ca61ccd0c306c2c72df153688ba1b49f3eceed80 1294356 27-Feb-2012 sf

Take care not to call ap_start_lingering_close from the listener thread, because it may block when flushing data to the client. From the listener thread, do a lingering close without flushing. This is OK because we only do this if there has been an error during write completion or if our send buffers are empty because we are in keep-alive. PR: 52229

ef9b1cb88b0f4f4d750fc1d8e8c1367ed3a7d48f 1294349 27-Feb-2012 sf

Prevent listener thread from ever updating a worker's scoreboard slot The worker may be doing something else by now. This should take care of slots staying in "L" state in the scoreboard

633c8380a52f8f0dda6b771a4d3948e45f22187e 1293426 24-Feb-2012 sf

Revert Paul's lock free circular queue changes done on MPM-event. The changes have been moved to branches/mpm-event-optimization. This puts trunk's MPM-event back to the state of 2.4.x, except for serf support. The following commits are reverted: ------------------------------------------------------------------------ r1203404 | trawick | 2011-11-17 23:48:35 +0100 event no longer requires APR_POLLSET_THREADSAFE, or any other non-standard feature (all but OS/2 have APR_POLLSET_WAKEABLE) config-foo: don't require thread-safe pollset in order to build event event.c: don't stress APR_ENOTIMPL in apr_pollset_create errors; just give the standard "check system or user limits" message ------------------------------------------------------------------------ r1203858 | trawick | 2011-11-18 22:39:33 +0100 follow up to r1202257 -- perform normal wakeup processing when APR_EINTR is seen from apr_pollset_poll(), with expectation that it was triggered by apr_pollset_wakeup() ------------------------------------------------------------------------ r1202395 | trawick | 2011-11-15 20:38:31 +0100 spellcheck r1202258 ------------------------------------------------------------------------ r1202329 | pquerna | 2011-11-15 18:47:33 +0100 Calculate the power of two size of the buffer before allocating it. Spotted by: Rüdiger Plüm ------------------------------------------------------------------------ r1202259 | pquerna | 2011-11-15 16:52:59 +0100 Use apr_pollset_wakeup to ensure that the listener thread will process most enqueue'd events quickly ------------------------------------------------------------------------ r1202258 | pquerna | 2011-11-15 16:52:00 +0100 Because the pollset is now only mutated from the event thread, we no longer need the APR_POLLSET_THREADSAFE flag for the event_pollset ------------------------------------------------------------------------ r1202257 | pquerna | 2011-11-15 16:51:03 +0100 Create a new lock free circular queue, and use it in the EventMPM to remove the timeout mutex that was wrapping both timeout queue operations and pollset operations. ------------------------------------------------------------------------ r1202256 | pquerna | 2011-11-15 16:50:09 +0100 Instead of disabling the listening sockets from the pollset when under load, just stop calling the accept call, but leave the sockets in the pollset.

4c35b4e0e5b95237ab482128f7a26d5c44d43097 1220850 19-Dec-2011 minfrin

Fix the case where AP_DEBUG is unset.

306f017f4287d3e95bba48d71a42019a32f8323f 1220826 19-Dec-2011 minfrin

Fix warning: variable 'rv' set but not used.

185aa71728867671e105178b4c66fbc22b65ae26 1209766 03-Dec-2011 sf

Add lots of unique tags to error log messages

/httpd/docs/log-message-tags/next-number /httpd/modules/aaa/mod_access_compat.c /httpd/modules/aaa/mod_allowmethods.c /httpd/modules/aaa/mod_auth_basic.c /httpd/modules/aaa/mod_auth_digest.c /httpd/modules/aaa/mod_auth_form.c /httpd/modules/aaa/mod_authn_anon.c /httpd/modules/aaa/mod_authn_core.c /httpd/modules/aaa/mod_authn_dbd.c /httpd/modules/aaa/mod_authn_dbm.c /httpd/modules/aaa/mod_authn_file.c /httpd/modules/aaa/mod_authn_socache.c /httpd/modules/aaa/mod_authnz_ldap.c /httpd/modules/aaa/mod_authz_core.c /httpd/modules/aaa/mod_authz_dbd.c /httpd/modules/aaa/mod_authz_dbm.c /httpd/modules/aaa/mod_authz_groupfile.c /httpd/modules/aaa/mod_authz_host.c /httpd/modules/aaa/mod_authz_owner.c /httpd/modules/aaa/mod_authz_user.c /httpd/modules/apreq/filter.c /httpd/modules/arch/netware/mod_netware.c /httpd/modules/arch/netware/mod_nw_ssl.c /httpd/modules/arch/unix/mod_privileges.c /httpd/modules/arch/unix/mod_unixd.c /httpd/modules/arch/win32/mod_isapi.c /httpd/modules/arch/win32/mod_win32.c /httpd/modules/cache/cache_storage.c /httpd/modules/cache/cache_util.c /httpd/modules/cache/mod_cache.c /httpd/modules/cache/mod_cache_disk.c /httpd/modules/cache/mod_file_cache.c /httpd/modules/cache/mod_socache_dbm.c /httpd/modules/cache/mod_socache_dc.c /httpd/modules/cache/mod_socache_memcache.c /httpd/modules/cache/mod_socache_shmcb.c /httpd/modules/cluster/mod_heartbeat.c /httpd/modules/cluster/mod_heartmonitor.c /httpd/modules/core/mod_so.c /httpd/modules/core/mod_watchdog.c /httpd/modules/database/mod_dbd.c /httpd/modules/dav/fs/dbm.c /httpd/modules/dav/main/mod_dav.c /httpd/modules/dav/main/util_lock.c /httpd/modules/echo/mod_echo.c /httpd/modules/examples/mod_example_hooks.c /httpd/modules/examples/mod_example_ipc.c /httpd/modules/experimental/mod_noloris.c /httpd/modules/filters/mod_charset_lite.c /httpd/modules/filters/mod_deflate.c /httpd/modules/filters/mod_ext_filter.c /httpd/modules/filters/mod_filter.c /httpd/modules/filters/mod_include.c /httpd/modules/filters/mod_proxy_html.c /httpd/modules/filters/mod_ratelimit.c /httpd/modules/filters/mod_reflector.c /httpd/modules/filters/mod_reqtimeout.c /httpd/modules/filters/mod_request.c /httpd/modules/filters/mod_sed.c /httpd/modules/filters/mod_substitute.c /httpd/modules/filters/mod_xml2enc.c /httpd/modules/generators/mod_asis.c /httpd/modules/generators/mod_autoindex.c /httpd/modules/generators/mod_cgi.c /httpd/modules/generators/mod_cgid.c /httpd/modules/generators/mod_status.c /httpd/modules/generators/mod_suexec.c /httpd/modules/http/byterange_filter.c /httpd/modules/http/http_filters.c /httpd/modules/http/http_protocol.c /httpd/modules/http/http_request.c /httpd/modules/http/mod_mime.c /httpd/modules/ldap/util_ldap.c /httpd/modules/ldap/util_ldap_cache_mgr.c /httpd/modules/loggers/mod_log_config.c /httpd/modules/loggers/mod_log_debug.c /httpd/modules/loggers/mod_log_forensic.c /httpd/modules/lua/lua_config.c /httpd/modules/lua/lua_request.c /httpd/modules/lua/lua_vmprep.c /httpd/modules/lua/mod_lua.c /httpd/modules/mappers/mod_actions.c /httpd/modules/mappers/mod_alias.c /httpd/modules/mappers/mod_imagemap.c /httpd/modules/mappers/mod_negotiation.c /httpd/modules/mappers/mod_rewrite.c /httpd/modules/metadata/mod_cern_meta.c /httpd/modules/metadata/mod_env.c /httpd/modules/metadata/mod_expires.c /httpd/modules/metadata/mod_headers.c /httpd/modules/metadata/mod_ident.c /httpd/modules/metadata/mod_mime_magic.c /httpd/modules/metadata/mod_remoteip.c /httpd/modules/metadata/mod_setenvif.c /httpd/modules/metadata/mod_unique_id.c /httpd/modules/metadata/mod_usertrack.c /httpd/modules/proxy/ajp_header.c /httpd/modules/proxy/ajp_link.c /httpd/modules/proxy/ajp_msg.c /httpd/modules/proxy/ajp_utils.c /httpd/modules/proxy/balancers/mod_lbmethod_bybusyness.c /httpd/modules/proxy/balancers/mod_lbmethod_byrequests.c /httpd/modules/proxy/balancers/mod_lbmethod_bytraffic.c /httpd/modules/proxy/balancers/mod_lbmethod_heartbeat.c /httpd/modules/proxy/examples/mod_lbmethod_rr.c /httpd/modules/proxy/mod_proxy.c /httpd/modules/proxy/mod_proxy_ajp.c /httpd/modules/proxy/mod_proxy_balancer.c /httpd/modules/proxy/mod_proxy_connect.c /httpd/modules/proxy/mod_proxy_express.c /httpd/modules/proxy/mod_proxy_fcgi.c /httpd/modules/proxy/mod_proxy_fdpass.c /httpd/modules/proxy/mod_proxy_ftp.c /httpd/modules/proxy/mod_proxy_http.c /httpd/modules/proxy/mod_proxy_scgi.c /httpd/modules/proxy/mod_serf.c /httpd/modules/proxy/proxy_util.c /httpd/modules/session/mod_session.c /httpd/modules/session/mod_session_crypto.c /httpd/modules/session/mod_session_dbd.c /httpd/modules/ssl/mod_ssl.c /httpd/modules/ssl/ssl_engine_init.c /httpd/modules/ssl/ssl_engine_io.c /httpd/modules/ssl/ssl_engine_kernel.c /httpd/modules/ssl/ssl_engine_log.c /httpd/modules/ssl/ssl_engine_mutex.c /httpd/modules/ssl/ssl_engine_ocsp.c /httpd/modules/ssl/ssl_engine_pphrase.c /httpd/modules/ssl/ssl_engine_rand.c /httpd/modules/ssl/ssl_engine_vars.c /httpd/modules/ssl/ssl_scache.c /httpd/modules/ssl/ssl_util_ocsp.c /httpd/modules/ssl/ssl_util_stapling.c /httpd/modules/test/mod_dialup.c /httpd/modules/test/mod_optional_fn_export.c /httpd/modules/test/mod_optional_hook_import.c /httpd/os/bs2000/os.c /httpd/os/unix/unixd.c /httpd/server/config.c /httpd/server/core.c /httpd/server/core_filters.c /httpd/server/listen.c /httpd/server/log.c /httpd/server/main.c event.c pod.c /httpd/server/mpm/mpmt_os2/mpmt_os2.c /httpd/server/mpm/mpmt_os2/mpmt_os2_child.c /httpd/server/mpm/netware/mpm_netware.c /httpd/server/mpm/prefork/prefork.c /httpd/server/mpm/simple/simple_api.c /httpd/server/mpm/simple/simple_children.c /httpd/server/mpm/simple/simple_core.c /httpd/server/mpm/simple/simple_io.c /httpd/server/mpm/simple/simple_run.c /httpd/server/mpm/winnt/child.c /httpd/server/mpm/winnt/mpm_winnt.c /httpd/server/mpm/winnt/service.c /httpd/server/mpm/worker/pod.c /httpd/server/mpm/worker/worker.c /httpd/server/mpm_common.c /httpd/server/mpm_unix.c /httpd/server/protocol.c /httpd/server/request.c /httpd/server/scoreboard.c /httpd/server/util.c /httpd/server/util_cookies.c /httpd/server/util_ebcdic.c /httpd/server/util_expr_eval.c /httpd/server/util_filter.c /httpd/server/util_mutex.c /httpd/server/util_xml.c /httpd/server/vhost.c
a0944d0cea0301ca402cfc896485d03da0d6209c 1204104 20-Nov-2011 sf

Remove MPM-private stuff from conn_state_t

859d1db781b9c6f49d967b249434dc02fd30d033 1203858 18-Nov-2011 trawick

follow up to r1202257 -- perform normal wakeup processing when APR_EINTR is seen from apr_pollset_poll(), with expectation that it was triggered by apr_pollset_wakeup()

4f37d4a111f115a982850f68fe4b898cb089fa5a 1203708 18-Nov-2011 gregames

garbage C's in server-status and extra child processes with async lingering close support in Event. these are set by the listener due to a residual c->sbh for a worker thread no longer associated with the connection. the associated worker threads are really idle and blocked in ap_queue_pop_something and will serve new work normally. but since they are marked as SERVER_CLOSING rather than SERVER_READY in the scoreboard, the parent process thinks they are busy and forks extra children. reproduction recipe: start Event with server-status enabled. hit localhost/server-status?refresh=5 and watch the C's trail behind the lone W.

6267d7243082e8316774a5ae69bce69cf6fac748 1203404 17-Nov-2011 trawick

event no longer requires APR_POLLSET_THREADSAFE, or any other non-standard feature (all but OS/2 have APR_POLLSET_WAKEABLE) config-foo: don't require thread-safe pollset in order to build event event.c: don't stress APR_ENOTIMPL in apr_pollset_create errors; just give the standard "check system or user limits" message

4ea3518ded68f096ad90772b89fe916afde11a62 1202395 15-Nov-2011 trawick

spellcheck r1202258

429e0075c40e2eb7d877bc79ea543dd9ea87655c 1202259 15-Nov-2011 pquerna

Use apr_pollset_wakeup to ensure that the listener thread will process most enqueue'd events quickly

ef52797d7cf3e5baab05fffc7f6525141261d224 1202258 15-Nov-2011 pquerna

Because the pollset is now only mutated from the event thread, we no longer need the APR_POLLSET_THREADSAFE flag for the event_pollset

0cf1c16713680b36b8f958535ada1f875b8156bd 1202257 15-Nov-2011 pquerna

Create a new lock free circular queue, and use it in the EventMPM to remove the timeout mutex that was wrapping both timeout queue operations and pollset operations.

c4fb0ec68797db7d314ab18570298df070c12110 1202256 15-Nov-2011 pquerna

Instead of disabling the listening sockets from the pollset when under load, just stop calling the accept call, but leave the sockets in the pollset.

f573edb315d96e752cf7da3f08b7a95367d0d702 1201146 12-Nov-2011 sf

Fix assertion failure during very high load by preventing race condition between appending to the timeout queues and adding to the pollset. We don't add additional locking calls but only extend the present calls to include the apr_pollset_add. Therefore this hopefully should not cause too much performance regression. Add some comments Replace two AP_DEBUG_ASSERTS with better error handling

11602491d9467452cc0f54925c9b356ad7719af9 1200132 10-Nov-2011 trawick

clean up unused ap_my_generation variable (presence is odd, since this variable as an API was supposedly removed long ago, and a similarly named static variable was removed in r1078286)

6c4d597609bf373e6b74576a71df722c746382fd 1200033 10-Nov-2011 sf

Downgrade log message which is triggered when client disconnects

e9356fde2e4fff8dab7eb6006ed1c476973796c5 1180742 10-Oct-2011 sf

If a child is created just before graceful restart and then exits because of a missing lock file, don't shutdown the whole server. PR: 39311 Submitted by: Shawn Michael <smichael rightnow com>

aaea51ff28093213376b9b8f63de07db53436223 1180737 10-Oct-2011 sf

Check the return value from ap_run_create_connection in mpm_event. Add a todo in mpm_simple PR: 41194 Submitted by: Davi Arnaut

5bfaaf573bacb45c1cf290ce85ecc676587e8a64 1174751 23-Sep-2011 jim

Cleanup effort in prep for GA push: Trim trailing whitespace... no func change

/httpd/modules/aaa/mod_allowmethods.c /httpd/modules/aaa/mod_auth_digest.c /httpd/modules/aaa/mod_authn_socache.c /httpd/modules/aaa/mod_authnz_ldap.c /httpd/modules/aaa/mod_authz_core.c /httpd/modules/aaa/mod_authz_dbd.c /httpd/modules/aaa/mod_authz_dbm.c /httpd/modules/aaa/mod_authz_host.c /httpd/modules/arch/netware/mod_netware.c /httpd/modules/arch/unix/mod_unixd.c /httpd/modules/arch/win32/mod_isapi.c /httpd/modules/cache/mod_socache_dbm.c /httpd/modules/cache/mod_socache_dc.c /httpd/modules/cache/mod_socache_memcache.c /httpd/modules/cache/mod_socache_shmcb.c /httpd/modules/cluster/mod_heartmonitor.c /httpd/modules/core/mod_so.c /httpd/modules/dav/fs/repos.c /httpd/modules/dav/main/mod_dav.c /httpd/modules/dav/main/util.c /httpd/modules/echo/mod_echo.c /httpd/modules/examples/mod_case_filter.c /httpd/modules/examples/mod_example_hooks.c /httpd/modules/examples/mod_example_ipc.c /httpd/modules/experimental/mod_noloris.c /httpd/modules/filters/mod_buffer.c /httpd/modules/filters/mod_charset_lite.c /httpd/modules/filters/mod_data.c /httpd/modules/filters/mod_deflate.c /httpd/modules/filters/mod_filter.c /httpd/modules/filters/mod_include.c /httpd/modules/filters/mod_reqtimeout.c /httpd/modules/filters/mod_sed.c /httpd/modules/filters/mod_substitute.c /httpd/modules/filters/regexp.c /httpd/modules/filters/sed0.c /httpd/modules/filters/sed1.c /httpd/modules/generators/mod_autoindex.c /httpd/modules/generators/mod_cgi.c /httpd/modules/generators/mod_cgid.c /httpd/modules/generators/mod_status.c /httpd/modules/http/byterange_filter.c /httpd/modules/http/http_core.c /httpd/modules/http/http_filters.c /httpd/modules/http/http_protocol.c /httpd/modules/http/http_request.c /httpd/modules/ldap/util_ldap.c /httpd/modules/loggers/mod_log_config.c /httpd/modules/loggers/mod_log_forensic.c /httpd/modules/lua/lua_request.c /httpd/modules/lua/lua_vmprep.c /httpd/modules/lua/mod_lua.c /httpd/modules/mappers/mod_dir.c /httpd/modules/mappers/mod_imagemap.c /httpd/modules/mappers/mod_rewrite.c /httpd/modules/mappers/mod_speling.c /httpd/modules/mappers/mod_userdir.c /httpd/modules/metadata/mod_remoteip.c /httpd/modules/proxy/balancers/mod_lbmethod_bybusyness.c /httpd/modules/proxy/balancers/mod_lbmethod_byrequests.c /httpd/modules/proxy/balancers/mod_lbmethod_heartbeat.c /httpd/modules/proxy/examples/mod_lbmethod_rr.c /httpd/modules/proxy/mod_proxy.c /httpd/modules/proxy/mod_proxy_ajp.c /httpd/modules/proxy/mod_proxy_balancer.c /httpd/modules/proxy/mod_proxy_connect.c /httpd/modules/proxy/mod_proxy_express.c /httpd/modules/proxy/mod_proxy_fcgi.c /httpd/modules/proxy/mod_proxy_fdpass.c /httpd/modules/proxy/mod_proxy_ftp.c /httpd/modules/proxy/mod_proxy_http.c /httpd/modules/proxy/mod_proxy_scgi.c /httpd/modules/proxy/mod_serf.c /httpd/modules/slotmem/mod_slotmem_plain.c /httpd/modules/ssl/ssl_engine_config.c /httpd/modules/ssl/ssl_engine_init.c /httpd/modules/ssl/ssl_engine_io.c /httpd/modules/ssl/ssl_engine_kernel.c /httpd/modules/ssl/ssl_engine_log.c /httpd/modules/ssl/ssl_engine_ocsp.c /httpd/modules/ssl/ssl_engine_pphrase.c /httpd/modules/ssl/ssl_engine_vars.c /httpd/modules/ssl/ssl_scache.c /httpd/modules/ssl/ssl_util.c /httpd/modules/ssl/ssl_util_ocsp.c /httpd/modules/ssl/ssl_util_ssl.c /httpd/modules/ssl/ssl_util_stapling.c /httpd/modules/test/mod_dialup.c /httpd/server/config.c /httpd/server/log.c /httpd/server/main.c event.c fdqueue.c /httpd/server/mpm/prefork/prefork.c /httpd/server/mpm/simple/simple_children.c /httpd/server/mpm/simple/simple_core.c /httpd/server/mpm/simple/simple_io.c /httpd/server/mpm/simple/simple_run.c /httpd/server/mpm/winnt/child.c /httpd/server/mpm/winnt/mpm_winnt.c /httpd/server/mpm/winnt/nt_eventlog.c /httpd/server/mpm/winnt/service.c /httpd/server/mpm/worker/worker.c /httpd/server/mpm_unix.c /httpd/server/protocol.c /httpd/server/request.c /httpd/server/util.c /httpd/server/util_expr_eval.c /httpd/server/util_expr_parse.c /httpd/server/util_expr_scan.c /httpd/server/util_mutex.c /httpd/server/util_pcre.c /httpd/server/util_script.c /httpd/server/vhost.c /httpd/support/ab.c /httpd/support/htcacheclean.c /httpd/support/htpasswd.c /httpd/support/rotatelogs.c /httpd/support/win32/ApacheMonitor.c
3a59bb90be3bc6246632384c3d885b875ae507d5 1172686 19-Sep-2011 sf

Add wrappers for malloc, calloc, realloc that check for out of memory situations. Use them in most places where malloc, and friends are used. This results in clean error messages in an out of memory situation instead of segfaulting or silently malfunctioning. In some places, it just allows to remove some logging code. PR 51568, PR 51569, PR 51571.

099d298d417b68b3d11fb5934c404c60f518d69c 1151234 26-Jul-2011 sf

Install signal handlers for crashes before detaching. Previously, there was a time span where crashes would be neither visible on the console nor logged in the error log.

0d54de55e9fec3d9ac5989a5fe016f349b82ed05 1151233 26-Jul-2011 sf

Reduce period during startup and restart where a successive signal may be lost PR: 43696 Submitted by: Arun Bhalla <arun shme net>

a041174c92fec6d5e37496ae7f5fe0d2ea946147 1137813 21-Jun-2011 sf

Log the deprecation warning at level info, not warn

5cd5205744c3596d29d29271073381e6b5ec0723 1137757 20-Jun-2011 sf

Fix search'n'replace error: Actually warn if MaxClients is used

70f553c56eda63b353598193c3afc238db9b3c78 1137755 20-Jun-2011 sf

New AsyncRequestWorkerFactor directive to influence how many connections will be accepted per process

93b22bb75e71dff48d5d32e1df02122762c57ff5 1137748 20-Jun-2011 sf

Remove dead assignment, as pointed out by Chris Wilson <cwilson vigilantsw com>

3fa816e4832a1c70600bdfd6fc5ef60e9f1c18bb 1137744 20-Jun-2011 sf

Rename MaxClients to MaxRequestWorkers which describes more accurately what it does.

b44ddab21bd6e44ba3c03f7ae8ed08dd23b68b48 1137358 19-Jun-2011 sf

Some improvements for handling of many connections for MPM event: - Process lingering close asynchronously instead of tying up worker threads (based on patch by Jeff Trawick). - If the number of connections of a process is above threads_per_child + WORKER_OVERCOMMIT * (idle_workers - 1) (WORKER_OVERCOMMIT is fixed at 2, at the moment), or if all workers are busy, don't accept new connections in that process. Such a dynamic connection limit is necessary because we may have both async and non-async (ssl) connections. WORKER_OVERCOMMIT should be a config option. - Don't count idle workers of not-accepting processes against MinSpareThreads, so that the parent will spawn new processes when necessary. - If we receive a keep-alive request while all workers are busy, don't block but close the connection immediately so that the client will re-connect to a different process. Related changes: - Log what is going on at trace loglevels. - Remove the bypass_push poll type flag, this code cannot be hit anymore (if it ever could?). - Add some macro helpers for dealing with timeout queues.

0ab15ffa17f588723d0c310af78b505bf4e8a953 1137262 19-Jun-2011 sf

If MaxMemFree is set, limit the number of recycled pools that is kept

bfda96bbfb44124efa453d4b8b6ddeaeffbaa029 1137261 19-Jun-2011 sf

Some logging tweaks

94bfd58dc29ddbf3dae30ff56d4085316de43cf8 1137260 19-Jun-2011 sf

Formatting changes, reuse 'now' variable instead of declaring a new one in several blocks. No significant code change.

1dee19645438f8e3cb80fe86e1aaade04d093e45 1137182 18-Jun-2011 sf

Fix graceful restart aborting connections PR: 43359 Submitted by: Takashi Sato <takashi lans-tv com>

925a6d92173ab96cdb0a8976c7aac13ef809e218 1096609 25-Apr-2011 trawick

Add child_status hook for tracking creation/termination of MPM child processes. Add end_generation hook for notification when the last MPM child of a generation exits. end_generation is implemented completely by core using the child_status hook run by the MPM. simple and mpmt_os2 MPMs don't currently run the child_status hook, so neither hook is invoked with those MPMs.

133a47776e6bc3f11f3beac454e643240b675ff7 1087085 30-Mar-2011 trawick

Simplify the interface to ap_reclaim_child_processes() and ap_relieve_child_processes(): instead of requiring the MPM to implement an otherwise-useless hook, just use a callback function. As I don't expect third-party MPM devs are following our day to day progress, the API changes are considered part of yesterday's MMN change.

8f29f672255fe76964af126f9ac8c3c864274fa0 1086293 28-Mar-2011 trawick

mpm_common.c implements a handful of config directives; the related state has to be re-initialized to the default values at pre-config time, but that was handled inconsistently by the MPMs, resulting in unexpected behavior when some of the directives were removed across restart move that necessary initialization from the MPMs to common code run from core's pre-config; MPMs that need to override defaults can do so by running after core's pre-config (the NetWare MPM now does that) the DEFAULT_MAX_REQUESTS_PER_CHILD compile setting wasn't useful enough to keep the simple MPM wasn't consistent in which of these directives were respected and which weren't, and that hasn't changed (see procmgr.max_requests_per_child vs. ap_max_requests_per_child)

20e0c71be778348516719e1e58a9f55c8e78c570 1086224 28-Mar-2011 trawick

consolidate logic to remove the pidfile in a new API, ap_remove_pid(), related to existing ap_log_pid() and ap_read_pid() presumably this is useful to third-party MPMs as well

814ea5b3442a2b48539f390ef51fe7bf0fc5c351 1084000 21-Mar-2011 jorton

* server/mpm/prefork/prefork.c (set_signals): Ignore SIGXFSZ; have a write() beyond 2GB fail with E2BIG rather than killing the process in the now hopefully rare case of non-LFS file usage on LFS systems. * server/mpm/worker/worker.c (set_signals): Likewise. * server/mpm/event/event.c (set_signals): Likewise.

efc81fe729a2b7401028387da184b4a98f0b854a 1078286 05-Mar-2011 trawick

worker, event, prefork: Correct several issues when built as DSOs; most notably, the scoreboard was reinitialized during graceful restart, such that processes of the previous generation were not observable. Other noticeable ones: * the generation number did not increment properly * worker's check-config hook didn't detect startup properly, so messages about inconsistent directives could have been sent to the wrong place max_daemons_limit wasn't tracked across restart, but as the scoreboard was always cleared this was a non-issue. Reinitialization of idle_spawn_rate, hold_off_on_exponential_spawning, and maxclients-message-reported may or may not have been features, but the big picture is that the behaviour shouldn't have differed. These changes should have been part of r758185.

403a74516d626da5c7e1b8f364eb730c7142f4cc 1078285 05-Mar-2011 trawick

zap needless reinitialization of is_graceful on the 2nd call of the open-logs hook

740a330a0d543c80086bb3ba9add6e93af69714d 1078170 04-Mar-2011 trawick

sanity check use of volatile in prefork, worker, and event

219c1ab259be52daf74b530ee9f80e02c723b7a8 1076718 03-Mar-2011 trawick

event: child_main() never returns, so remove some dead code after one of the calls

be192cefa381d5bae6868034687471754cb43175 1021924 12-Oct-2010 sf

Rename MaxRequestsPerChild to MaxConnectionsPerChild, which describes more accurately what the directive does. The old name still works but logs a warning.

5fd471ec540a088d143a223096d35661bf87c15b 1000814 24-Sep-2010 trawick

Fix crash accessing pollset on worker thread when child process is exiting. The timeout mutex and pollset were allocated from the listener thread pool. During child process shutdown, the listener thread exits first while any outstanding requests finish. These objects need to be allocated from pchild since the lifetime extends until the last worker thread has finished. Switch to pchild, and move init of these objects to the same place as other thread-independent objects.

a5854eacb5aaf8b0c14123b07745ba14630699b8 982382 04-Aug-2010 sf

Re-add AP_DEBUG_ASSERTs that were wrongly removed in r982050

c3e233736c4a453cbb2166a041f779e86230630a 982050 04-Aug-2010 sf

remove more unused variables revove some obsolete comments netware file is untested

047cb8df15a408e0c0c6125c4a351b35aa3c6e82 954273 13-Jun-2010 sf

Fix MPM event/libserf build problems: If libserf was installed during build, MPM event was picking up the headers but not linking with libserf, causing unresolved symbol errors. Now build MPM event with or without serf support depending on --with-serf being specified or not.

36ef8f77bffe75d1aa327882be1b5bdbe2ff567a 951895 06-Jun-2010 sf

Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take advantage of per-module loglevels

/httpd/modules/aaa/mod_access_compat.c /httpd/modules/aaa/mod_auth_basic.c /httpd/modules/aaa/mod_auth_digest.c /httpd/modules/aaa/mod_auth_form.c /httpd/modules/aaa/mod_authn_anon.c /httpd/modules/aaa/mod_authn_core.c /httpd/modules/aaa/mod_authn_dbd.c /httpd/modules/aaa/mod_authn_dbm.c /httpd/modules/aaa/mod_authn_file.c /httpd/modules/aaa/mod_authnz_ldap.c /httpd/modules/aaa/mod_authz_core.c /httpd/modules/aaa/mod_authz_dbd.c /httpd/modules/aaa/mod_authz_dbm.c /httpd/modules/aaa/mod_authz_groupfile.c /httpd/modules/aaa/mod_authz_host.c /httpd/modules/aaa/mod_authz_owner.c /httpd/modules/aaa/mod_authz_user.c /httpd/modules/arch/netware/mod_netware.c /httpd/modules/arch/netware/mod_nw_ssl.c /httpd/modules/arch/unix/mod_privileges.c /httpd/modules/arch/unix/mod_unixd.c /httpd/modules/arch/win32/mod_isapi.c /httpd/modules/arch/win32/mod_win32.c /httpd/modules/cache/cache_cache.c /httpd/modules/cache/cache_storage.c /httpd/modules/cache/cache_util.c /httpd/modules/cache/mod_cache.c /httpd/modules/cache/mod_disk_cache.c /httpd/modules/cache/mod_file_cache.c /httpd/modules/cache/mod_socache_dbm.c /httpd/modules/cache/mod_socache_dc.c /httpd/modules/cache/mod_socache_memcache.c /httpd/modules/cache/mod_socache_shmcb.c /httpd/modules/cluster/mod_heartbeat.c /httpd/modules/cluster/mod_heartmonitor.c /httpd/modules/core/mod_so.c /httpd/modules/core/mod_watchdog.c /httpd/modules/database/mod_dbd.c /httpd/modules/dav/fs/mod_dav_fs.c /httpd/modules/dav/lock/mod_dav_lock.c /httpd/modules/dav/main/mod_dav.c /httpd/modules/dav/main/util_lock.c /httpd/modules/debugging/mod_bucketeer.c /httpd/modules/debugging/mod_dumpio.c /httpd/modules/echo/mod_echo.c /httpd/modules/examples/mod_case_filter.c /httpd/modules/examples/mod_case_filter_in.c /httpd/modules/examples/mod_example_hooks.c /httpd/modules/examples/mod_example_ipc.c /httpd/modules/experimental/mod_noloris.c /httpd/modules/filters/mod_buffer.c /httpd/modules/filters/mod_charset_lite.c /httpd/modules/filters/mod_deflate.c /httpd/modules/filters/mod_ext_filter.c /httpd/modules/filters/mod_filter.c /httpd/modules/filters/mod_include.c /httpd/modules/filters/mod_ratelimit.c /httpd/modules/filters/mod_reflector.c /httpd/modules/filters/mod_reqtimeout.c /httpd/modules/filters/mod_request.c /httpd/modules/filters/mod_sed.c /httpd/modules/filters/mod_substitute.c /httpd/modules/generators/mod_asis.c /httpd/modules/generators/mod_autoindex.c /httpd/modules/generators/mod_cgi.c /httpd/modules/generators/mod_cgid.c /httpd/modules/generators/mod_info.c /httpd/modules/generators/mod_status.c /httpd/modules/generators/mod_suexec.c /httpd/modules/http/byterange_filter.c /httpd/modules/http/http_core.c /httpd/modules/http/http_filters.c /httpd/modules/http/http_protocol.c /httpd/modules/http/http_request.c /httpd/modules/http/mod_mime.c /httpd/modules/ldap/util_ldap.c /httpd/modules/ldap/util_ldap_cache_mgr.c /httpd/modules/loggers/mod_log_config.c /httpd/modules/loggers/mod_log_forensic.c /httpd/modules/loggers/mod_logio.c /httpd/modules/lua/lua_config.c /httpd/modules/lua/lua_request.c /httpd/modules/lua/lua_vmprep.c /httpd/modules/lua/mod_lua.c /httpd/modules/mappers/mod_actions.c /httpd/modules/mappers/mod_alias.c /httpd/modules/mappers/mod_dir.c /httpd/modules/mappers/mod_imagemap.c /httpd/modules/mappers/mod_negotiation.c /httpd/modules/mappers/mod_rewrite.c /httpd/modules/mappers/mod_speling.c /httpd/modules/mappers/mod_userdir.c /httpd/modules/mappers/mod_vhost_alias.c /httpd/modules/metadata/mod_cern_meta.c /httpd/modules/metadata/mod_env.c /httpd/modules/metadata/mod_expires.c /httpd/modules/metadata/mod_headers.c /httpd/modules/metadata/mod_ident.c /httpd/modules/metadata/mod_mime_magic.c /httpd/modules/metadata/mod_remoteip.c /httpd/modules/metadata/mod_setenvif.c /httpd/modules/metadata/mod_unique_id.c /httpd/modules/metadata/mod_usertrack.c /httpd/modules/metadata/mod_version.c /httpd/modules/proxy/ajp_header.c /httpd/modules/proxy/ajp_link.c /httpd/modules/proxy/ajp_msg.c /httpd/modules/proxy/ajp_utils.c /httpd/modules/proxy/balancers/mod_lbmethod_bybusyness.c /httpd/modules/proxy/balancers/mod_lbmethod_byrequests.c /httpd/modules/proxy/balancers/mod_lbmethod_bytraffic.c /httpd/modules/proxy/balancers/mod_lbmethod_heartbeat.c /httpd/modules/proxy/examples/mod_lbmethod_rr.c /httpd/modules/proxy/mod_proxy.c /httpd/modules/proxy/mod_proxy_ajp.c /httpd/modules/proxy/mod_proxy_balancer.c /httpd/modules/proxy/mod_proxy_connect.c /httpd/modules/proxy/mod_proxy_fcgi.c /httpd/modules/proxy/mod_proxy_fdpass.c /httpd/modules/proxy/mod_proxy_ftp.c /httpd/modules/proxy/mod_proxy_http.c /httpd/modules/proxy/mod_proxy_scgi.c /httpd/modules/proxy/mod_serf.c /httpd/modules/proxy/proxy_util.c /httpd/modules/session/mod_session.c /httpd/modules/session/mod_session_cookie.c /httpd/modules/session/mod_session_crypto.c /httpd/modules/session/mod_session_dbd.c /httpd/modules/slotmem/mod_slotmem_plain.c /httpd/modules/slotmem/mod_slotmem_shm.c /httpd/modules/test/mod_dialup.c /httpd/modules/test/mod_optional_fn_export.c /httpd/modules/test/mod_optional_fn_import.c /httpd/modules/test/mod_optional_hook_export.c /httpd/modules/test/mod_optional_hook_import.c /httpd/os/bs2000/os.c /httpd/os/unix/unixd.c /httpd/server/core_filters.c /httpd/server/listen.c /httpd/server/main.c event.c pod.c /httpd/server/mpm/mpmt_os2/mpmt_os2.c /httpd/server/mpm/mpmt_os2/mpmt_os2_child.c /httpd/server/mpm/netware/mpm_netware.c /httpd/server/mpm/prefork/prefork.c /httpd/server/mpm/simple/simple_api.c /httpd/server/mpm/simple/simple_children.c /httpd/server/mpm/simple/simple_core.c /httpd/server/mpm/simple/simple_io.c /httpd/server/mpm/simple/simple_run.c /httpd/server/mpm/winnt/child.c /httpd/server/mpm/winnt/mpm_winnt.c /httpd/server/mpm/winnt/service.c /httpd/server/mpm/worker/pod.c /httpd/server/mpm/worker/worker.c /httpd/server/mpm_common.c /httpd/server/mpm_unix.c /httpd/server/protocol.c /httpd/server/request.c /httpd/server/scoreboard.c /httpd/server/util.c /httpd/server/util_cookies.c /httpd/server/util_ebcdic.c /httpd/server/util_expr.c /httpd/server/util_filter.c /httpd/server/util_mutex.c /httpd/server/util_script.c /httpd/server/util_xml.c /httpd/server/vhost.c
820e91baab4f9a45001d668698d2fae3501cb4b0 947651 24-May-2010 trawick

odd assortment of spelling fixes

57713c26f79ee40e18f060d3725b02cf229233d5 922405 12-Mar-2010 covener

all signs indicate that status value is always -1 on error

43f18c24a8f6f42cdacc336d4344c7c64b3929d5 922392 12-Mar-2010 covener

reduce the warning level in the bindprocessor() call used to make sure child processes aren't bound to the CPU the parent is running on. In recent levels of AIX, the parent isn't implicitly bound to a CPU (so the children don't inherit it), and when the AIX WPAR feature is enabled this call can return EPERM, even though the child process is already unbound.

bd27541a0c96caa881f17a490e23cdd220d480c8 910684 16-Feb-2010 poirier

Log command line on startup, so there's a record of command line arguments like -f. Suggested by Shaya Potter. [Dan Poirier] PR: 48752

f58a640f5fcb90f5baf1814479a60cb2179c2ce6 882939 21-Nov-2009 trawick

axe some vestiges of Event's accept mutex

40965c37b2fd320093215de6c3fbd516382077ea 818825 25-Sep-2009 jim

Enhance ap_hook_monitor to pass along a server_rec (in general the ap_server_conf) and tuck away some storage in there which may be useful as an opaque data pointer.

25d0f8adcab13255494a3572edff1a25f6fbeea3 804764 16-Aug-2009 rpluem

* Do better checking of pollset operations in various places to avoid segfaults. PR: 46467 Submitted by: Stefan Fritsch <sf sfritsch.de> Reviewed by: rpluem

3ec1198cf7a85eea31dbbbbe7bc5268510701f7b 765305 15-Apr-2009 gregames

no longer amusing. I'll still pay off if somebody does it legitimately, but I haven't been to Apachecon in ages so we'll have to work out a different delivery mechanism. With the stability of the 2.0.x and 2.2.x releases and Moore's Law in effect for the last decade, it might be possible...

ff32c2e8bb4918d83fdad1182dcc26eeb88d28a5 762127 05-Apr-2009 trawick

main() can use ap_run_mpm() directly, so axe the old ap_mpm_run() function change the mpm hooks to return OK/DONE instead of 0/1

30741f9360fff567fe3450441aaf1e96d19bae9f 761084 02-Apr-2009 trawick

clean up apr_time_from_msec() compatibility macros * where needed, base on APR_VERSION_AT_LEAST() so we remember what this is about * where not, axe

badbab787974c883f2fff0341b4b249bbf6d57a2 760864 01-Apr-2009 trawick

mpm-query hook: distinguish between DECLINED and APR_ENOTIMPL so that . ap_mpm_query() can return APR_EGENERAL if called too early (for debugging a module) . some hypothetical module which implements the mpm-query hook can bypass the MPM with APR_ENOTIMPL

ff0d250751b2f53f755070f99cbda447064ca90a 759924 30-Mar-2009 trawick

rename the new retained-data APIs to ap_retained_data_create()/ap_retained_data_get(), for better consistency with existing APIs (e.g., slotmem) don't bother changing the MMN, which doesn't reflect recent -dev changes anyway

66b7d26b8c3164ddd1cd1ee1d0bec6cd5780301b 759757 29-Mar-2009 trawick

the mpm_get_child_pid hook is unnecessary, as was the per-MPM MPM_CHILD_PID() macro which it replaced axe this new hook, and use ap_get_scoreboard_process() instead

71debfa33ffaf708f3803495c4caf6b00b78ac86 759699 29-Mar-2009 trawick

Core can specify a platform-specific rewrite args hook. Use that on Unix. Windows continues to specify this in the MPM, at least until someone can separate out the MPM-specific bits.

8f65a478213d64b377659c263ceef21e6e61eabd 759648 29-Mar-2009 mturk

Register rewrite_args hook. Now, dunno if that was intended, but at least allow to start the httpd

e9f4b40b33b0563f88c40cd02140568803c829d9 759413 28-Mar-2009 pquerna

If serf is available, compile in driving the serf event loop from inside the Event MPM. Add a new MPM Query to determine if an MPM supports this.

7677dd9b01d498a2af1cddb8e2506a25d7da630b 759115 27-Mar-2009 trawick

The Event MPM is no longer experimental; move it out of that ghetto. Yank the few bits that implement the concept of an experimental MPM.