1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-25 10:59:28 +03:00
Commit Graph

232 Commits

Author SHA1 Message Date
Brian Pane
c821da5c78 Removed the destruction of the bucket allocator prior to
clearing the transaction pool.  The bucket allocator will
now get destroyed when apr_pool_clear() invokes its cleanup
callback.  With the old logic, memory corruption was possible
if the pool contained any brigades that referenced any
buckets allocated from the bucket allocator.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@360257 13f79535-47bb-0310-9956-ffa450edef68
2005-12-31 07:16:09 +00:00
Brian Pane
4778e1e0de When computing the timeouts for keepalives and write completion,
get the current time _after_ processing the event that led to the
timeout, rather than before.
[forward-port of commit 349189 from the async-read-dev branch]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@349190 13f79535-47bb-0310-9956-ffa450edef68
2005-11-27 07:34:15 +00:00
Brian Pane
58d941233a remove an obsolete comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345726 13f79535-47bb-0310-9956-ffa450edef68
2005-11-20 07:40:49 +00:00
Brian Pane
596e8e2d9d Minor refactoring: move the creation of the pollset and associated
data structures outside of the listener thread function.  The point
of this is to facilitate future experiments with different concurrency
models like Leader/Followers as potential alternatives to the current
Reactor design.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332879 13f79535-47bb-0310-9956-ffa450edef68
2005-11-13 02:27:44 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Brian Pane
cb0e5db86f Async write completion for Event MPM
(backported from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327945 13f79535-47bb-0310-9956-ffa450edef68
2005-10-24 03:33:14 +00:00
Greg Ames
a5d8311d59 remove the recycled_pool variable to keep it more in sync with worker.
event already had logic in the listener thread error legs to prevent
leaking ptrans, so this is mostly cosmetic.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307250 13f79535-47bb-0310-9956-ffa450edef68
2005-10-08 03:47:15 +00:00
Greg Ames
12223605b7 remove obsolete constant
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307239 13f79535-47bb-0310-9956-ffa450edef68
2005-10-08 02:29:08 +00:00
Greg Ames
5b981cc853 get rid of an obsolete comment. the separate event thread disappeared when
the event MPM moved into svn.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@289681 13f79535-47bb-0310-9956-ffa450edef68
2005-09-17 01:14:16 +00:00
Paul Querna
d9219348b2 Move the timeout mutex up, to limit the time we are holding it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279794 13f79535-47bb-0310-9956-ffa450edef68
2005-09-09 15:24:43 +00:00
Colm MacCarthaigh
cc841a28e5 Initiliase all of the first_*_limit variables to zero, so that we can actually
raise limits beyond their defaults reliably. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265523 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:10:55 +00:00
Colm MacCarthaigh
146fd39a5a Implement graceful stop in the event MPM. Implementation is identical to
the worker MPM implementation. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264105 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 10:20:25 +00:00
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +00:00
Paul Querna
e1955172ab * event.c: Create ptrans pool as a child of pconf, to fix APR pool
lifetime checks in apr_tables.c.

Based on r170896 changes to the Worker MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179355 13f79535-47bb-0310-9956-ffa450edef68
2005-06-01 05:00:29 +00:00
Greg Ames
e06eaebac5 missed a couple.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@168649 13f79535-47bb-0310-9956-ffa450edef68
2005-05-06 20:37:05 +00:00
Greg Ames
5ceb57af0d worker and event mpms: transient thread creation errors shouldn't take down
the whole server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@168182 13f79535-47bb-0310-9956-ffa450edef68
2005-05-04 20:00:23 +00:00
Paul Querna
1fe9d2eba8 sync with mod_status hacks in the worker mpm.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157810 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 21:48:57 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Greg Ames
1192058be2 ap_queue_push: update comment to reflect reality
pointed out by: Ron Park (ronp cnet.com)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111385 13f79535-47bb-0310-9956-ffa450edef68
2004-12-09 14:11:29 +00:00
Justin Erenkrantz
779e530a5c * server/mpm/experimental/event/event.c: Go through and reformat and correct
comments to be more appropriate.

*no functional changes*


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109773 13f79535-47bb-0310-9956-ffa450edef68
2004-12-04 05:25:57 +00:00
Greg Ames
7be370590c fix child process aborts with
assertion "!((queue)->nelts == (queue)->bounds)" failed
due to worker queue overflows. The listener/event thread
needs to block when all worker threads are busy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109631 13f79535-47bb-0310-9956-ffa450edef68
2004-12-03 05:28:00 +00:00
Greg Ames
895bdde8f8 listener_thread: no functional changes, formatting changes only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106744 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 19:33:21 +00:00
Greg Ames
4c448acc3a only need one main listener loop.
logic changes only to minimize diff.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106743 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 19:29:26 +00:00
Greg Ames
5f83105351 make the type field in listener_poll_type an enum to make gdb output more
useful.

add a comment about a field I haven't been able to grok yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106674 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 00:37:54 +00:00
Paul Querna
34959f29db The Event MPM.
Designed to minimize Apache's KeepAlive overhead.

This MPM depends on the current APR-trunk for new features added to 
the apr_pollset interface. Currently the underlying operating
system must support KQueue or EPoll.

Status:
  Should work as a drop in replacement for all non-ssl servers.
  SSL Requests that use HTTP 1.1 Pipelining do not currently work.

Testing:
  I have tested it with Linux 2.6, FreeBSD 5.2.1, and OS X 10.3.
  
Originally based on the patch by Greg Ames.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105919 13f79535-47bb-0310-9956-ffa450edef68
2004-11-20 02:52:36 +00:00
Joe Orton
c36ecfa64f Remove the .cvsignore files.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105796 13f79535-47bb-0310-9956-ffa450edef68
2004-11-19 09:07:29 +00:00
Jeff Trawick
6ca160f41f perchild MPM: Fix thread safety problem in the use of longjmp().
Submitted by:   Tsuyoshi SASAMOTO <nazonazo super.win.ne.jp>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104436 13f79535-47bb-0310-9956-ffa450edef68
2004-07-31 20:47:49 +00:00
Jeff Trawick
c940ea5b58 use existing directive name ThreadStackSize instead of
WorkerStackSize

as made obvious by: Brad Nicholes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102975 13f79535-47bb-0310-9956-ffa450edef68
2004-03-15 23:08:41 +00:00
Jeff Trawick
cb5c3dd6fd Threaded MPMs for Unix and Win32: Add WorkerStackSize directive
to override default thread stack size for threads which handle
client connections.  Required for some third-party modules on
platforms with small default thread stack size.

This is also useful for trimming back the stack size on
platforms with relatively large default stack size in order to
conserve address space for supporting more threads per child.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102931 13f79535-47bb-0310-9956-ffa450edef68
2004-03-11 03:57:50 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
1e8cb2d1a1 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102582 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:39:09 +00:00
André Malo
ba9e690fc2 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102581 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:35:39 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
Jeff Trawick
01da1159b3 Unix MPMs: Stop dropping connections when the file descriptor
is at least FD_SETSIZE.

That isn't a problem for most users (since poll() is widespread).
On old boxes where select() must be used by APR, APR needs to fail
operations that don't work with such fds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102419 13f79535-47bb-0310-9956-ffa450edef68
2004-01-27 15:19:58 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
d0f5240ca9 update leader, threadpool, and worker MPMs to return MPM state
from ap_mpm_query()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102045 13f79535-47bb-0310-9956-ffa450edef68
2003-12-13 19:00:56 +00:00
Jeff Trawick
50351f79aa update threadpool MPM to build and appear to work with the current APR
pollset API


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102044 13f79535-47bb-0310-9956-ffa450edef68
2003-12-13 18:25:57 +00:00
Jeff Trawick
8fd159ef87 update leader MPM to build and appear to work with the current APR
pollset API


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102043 13f79535-47bb-0310-9956-ffa450edef68
2003-12-13 15:46:09 +00:00
Brian Pane
79a3c0c99b remove calls to the apr_proc_other_child_read function that no longer exists
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101858 13f79535-47bb-0310-9956-ffa450edef68
2003-11-24 01:34:04 +00:00
Jeff Trawick
c9eb9be474 stop using deprecated apr_atomic functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101786 13f79535-47bb-0310-9956-ffa450edef68
2003-11-16 01:51:28 +00:00
Jeff Trawick
0024a03faa Lower the severity of the "listener thread didn't exit" message
to debug, as it is of interest only to developers.

PR:                9011


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101165 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 19:36:26 +00:00
Jeff Trawick
3090c1b2c5 Fix a misleading message from the some of the threaded MPMs when
MaxClients has to be lowered due to the setting of ServerLimit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101160 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 16:50:22 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Cliff Woolley
a770ae9e77 Updated the various MPM's to use the new bucket_alloc_create_ex API
when necessary.  Which is to say that it's necessary in all cases except
for prefork, where the change to apr-util to have it use the allocator
from the pool passed in is already sufficient.

Reviewed by:	Jean-Jacques Clar, Sander Striker, Brad Nicholes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101122 13f79535-47bb-0310-9956-ffa450edef68
2003-08-28 05:54:44 +00:00
Bradley Nicholes
dc4cfa1640 Make sure that the global ap_max_mem_free is initialized along with the
other MPM globals whenever HTTPD is started or restarted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101117 13f79535-47bb-0310-9956-ffa450edef68
2003-08-27 22:33:12 +00:00
Jeff Trawick
457570612a consolidate code related to sig_coredump
a note on perchild:
  perchild exception handling was busted before this and is still busted
  the problem I noticed was that a client that exposes a segfault never
  gets its connection dropped and the parent never notices that the
  child process that segfaulted hasexited


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99312 13f79535-47bb-0310-9956-ffa450edef68
2003-04-09 16:58:30 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Jeff Trawick
9cfaf13dad fix some problems in the perchild MPM
apr_socket_t ptr filled in by apr_os_sock_put() needs to be NULL on
entry to have a new structure allocated

various iov problems were fixed

Submitted by:  Jonas Eriksson <jonas@webkonsulterna.com>
Reviewed by:   Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97299 13f79535-47bb-0310-9956-ffa450edef68
2002-10-25 02:20:26 +00:00
Ryan Bloom
2795dc66ca If the server is configured with an accept mutex type that isn't comaptible
with perchild, then force it to be FCNTL.

PR:	13311


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97180 13f79535-47bb-0310-9956-ffa450edef68
2002-10-11 15:41:52 +00:00