1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-04 21:42:15 +03:00

120 Commits

Author SHA1 Message Date
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
Joe Orton
7bc45b4845 * include/mpm_common.h (ap_pod_t): Remove 'sa' field.
* server/mpm_common.c (ap_mpm_pod_open, dummy_connection): Use
ap_listeners->bind_addr for the dummy connection rather than doing a
name lookup on the first listener's hostname and using one of the
addresses returned.

PR: 27313


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102869 13f79535-47bb-0310-9956-ffa450edef68
2004-03-06 14:50:55 +00:00
Joe Orton
babcd5c7e1 * server/mpm_common.c (ap_process_child_status): Remove an escaped \n
in the error log and add some political correctness.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102772 13f79535-47bb-0310-9956-ffa450edef68
2004-02-25 11:55:31 +00:00
Jeff Trawick
8ab979d28f Add a new directive EnableExceptionHook that must be specified for
exception hooks to be called (in addition to the build time
requirements).

The 2.1-dev feature is now more aligned with the 1.3.30-dev feature,
in that there is a build-time requirement as well as a configuration
requirement.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102686 13f79535-47bb-0310-9956-ffa450edef68
2004-02-19 11:19:43 +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
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
b924ca508a avoid losing a subpool (until restart) on a rare error path
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102420 13f79535-47bb-0310-9956-ffa450edef68
2004-01-27 17:11:04 +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
a6bc964f24 fix a problem where a crash of a non-MPM child process could
result in an error log message stating that the parent had
crashed

the problem, which affected all *X platforms, was due to an
attempt to support the general problem with linuxthreads;
this change leaves us with a relatively obscure hole when
running on linuxthreads (see comments)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102033 13f79535-47bb-0310-9956-ffa450edef68
2003-12-11 19:05:30 +00:00
Jeff Trawick
8d0f256131 Add fatal exception hook for use by debug modules. The hook is only
available if the --enable-exception-hook configure parm is used.

Sample users at http://httpd.apache.org/~trawick/exception_hook.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101899 13f79535-47bb-0310-9956-ffa450edef68
2003-11-26 03:45:34 +00:00
Jeff Trawick
0f5ba4e44d build with latest other-child API changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101848 13f79535-47bb-0310-9956-ffa450edef68
2003-11-22 20:43:25 +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
Allan K. Edwards
a070f737a4 Enable ap_sock_disable_nagle for Windows. This along with the addition of
APR_TCP_NODELAY_INHERITED to apr.hw will cause Nagle to be disabled for
Windows.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99373 13f79535-47bb-0310-9956-ffa450edef68
2003-04-15 22:34:47 +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
William A. Rowe Jr
1e7b7d79bb SECURITY: Eliminated leaks of several file descriptors to child
processes, such as CGI scripts.

PR: 17206
Submitted by:	Christian Kratzer <ck@cksoft.de>, Bjoern A. Zeeb <bz@zabbadoz.net>
Reviewed by:	Joe Orton, Will Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99032 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 21:50:40 +00:00
Greg Ames
b906d05f70 Linux 2.4+: enable coredumps when Apache is started as root if
CoreDumpDirectory is explicitly coded


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98908 13f79535-47bb-0310-9956-ffa450edef68
2003-03-06 21:48:58 +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
William A. Rowe Jr
ed8fc9abae http occurances to update for apr_socket_opt_get/set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96057 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 08:05:11 +00:00
William A. Rowe Jr
6b69fe06c0 Timeout/time fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96055 13f79535-47bb-0310-9956-ffa450edef68
2002-07-15 07:46:19 +00:00
Sander Striker
3b5826f7e9 Now why did I commit that symbolic constant in APR again? Exactly...
to use it here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95955 13f79535-47bb-0310-9956-ffa450edef68
2002-07-04 15:24:01 +00:00
Sander Striker
62faca71e7 Add a new directive: MaxMemFree. MaxMemFree makes it possible
to configure the maximum amount of memory the allocators will
hold on to for reuse.  Anything over the MaxMemFree threshold
will be free()d.  This directive is usefull when uncommon large
peaks occur in memory usage.  It should _not_ be used to mask
defective modules' memory use.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95954 13f79535-47bb-0310-9956-ffa450edef68
2002-07-04 15:20:54 +00:00
William A. Rowe Jr
178e10e3da Well the wrappers work out well... nice to be able to put off committing
these API changes until the evening ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95587 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 03:44:03 +00:00
Jeff Trawick
fc658e628b the "-k startssl" parameter is reverted by popular demand
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95269 13f79535-47bb-0310-9956-ffa450edef68
2002-05-24 18:48:10 +00:00
Jeff Trawick
8f135cea77 fix data initialization problem in new Unix -k option processing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95251 13f79535-47bb-0310-9956-ffa450edef68
2002-05-23 18:31:02 +00:00
Jeff Trawick
0547e6e6e9 Add "-k start|startssl|restart|graceful|stop" support to httpd
for the Unix MPMs.  These have semantics very similar to the
old apachectl commands of the same name.

The use of stderr/stdout and exit status for error conditions
needs to be revisited.  For now it matches apachectl behavior.

Justin Erenkrantz got the ball rolling with this feature.  Some
of his support code was used unchanged.  Other code was shuffled
around and modified or rewritten.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95237 13f79535-47bb-0310-9956-ffa450edef68
2002-05-23 12:58:37 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +00:00
Aaron Bannert
fe3208953d Remove unnecessary includes of apr_lock.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94566 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 06:48:31 +00:00
Jim Jagielski
cc7157e782 Added support for Posix semaphore-based mutex locking (AcceptMutex posixsem).
It's between pthread and sysvsem in the DEFAULT priority ranking. This
makes it the new default for Darwin, and adds support for it for other
platforms as well (like Solaris).
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94434 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 18:36:03 +00:00
Paul J. Reder
78ae2a9eb4 PR:
Obtained from:
Submitted by:	Paul J. Reder
Reviewed by:

Remove the MPM_SYNC_CHILD_TABLE macro since there is no longer a scoreboard
file that needs to be synched.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94308 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 16:15:33 +00:00
Jim Jagielski
730e99e461 Fold the compiled-in knowledge of the allowable AcceptMutex settings into
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94062 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 22:19:11 +00:00
Jim Jagielski
a65170a84c Bring 2.0 up to parity, a bit, with how much info we provide to
the admin regarding valid values for AcceptMutex. Should also
tell 'em what "default" actually maps to, but that can wait.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94055 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 16:44:13 +00:00
Jeff Trawick
928aff8a02 Fix a hang condition with graceful restart and prefork MPM
in the situation where MaxClients is very high but
much fewer servers are actually started at the time of the
restart.

The way we notify an entire generation to die at once is
changed so that we don't have to use the pod (and deal with
the ease of filling the kernel pipe buffer).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93999 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 18:24:55 +00:00
Jeff Trawick
fab7f0a891 don't check for EINTR after a call to apr_file_write();
you'll never see it


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93997 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 16:39:56 +00:00
William A. Rowe Jr
d07e31f81f Simplify s/APR_OS_PROC_T_FMT/APR_PID_T_FMT/, apr_os_foo entities aren't
for external consumption.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93969 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:42:46 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Sander Striker
f91ea17c85 Make this look a bit better.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93843 13f79535-47bb-0310-9956-ffa450edef68
2002-03-11 14:27:45 +00:00
Sander Striker
d694a08ca3 Style Police comming through...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93833 13f79535-47bb-0310-9956-ffa450edef68
2002-03-11 10:48:58 +00:00
Jeff Trawick
2580e70141 don't wait nearly so long for child processes to go away
the adjustment of the wait time was done too soon

now the code should be consistent with 1.3 behavior


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93560 13f79535-47bb-0310-9956-ffa450edef68
2002-02-24 20:41:19 +00:00
Jeff Trawick
b49a2fbe38 close an extremely unlikely file descriptor leak in
dummy_connection()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93479 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 16:18:10 +00:00
Greg Ames
9ad90284cd if a child detects a resource shortage on accept(), limit the rate of fork()s
to 1 per second until the situation clears up.

Inspired by: Martin Kraemer


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93366 13f79535-47bb-0310-9956-ffa450edef68
2002-02-11 23:20:16 +00:00
William A. Rowe Jr
7e1113f913 This patch eliminated from the _SHARED_ segment of the scoreboard all
pointer math.  This is required for portable scoreboards.

  vhost becomes the 'vhost name string' so it now survives ap_generation
  clicks.  next was apparently never used.

  This patch also accounts for the changes to the apr_shm api, and gives
  Win32 the magic of a shared scoreboard.

  Breakage aplenty on non-win32 platforms, I suspect, but this radical
  surgery, and culling of unused functions, was really, really needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92791 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 00:28:00 +00:00
Jeff Trawick
57b42f96ac handle the disappearance of apr_lock_create_np() and
apr_proc_mutex_create_np() and the new parameter to
apr_lock_create() and apr_proc_mutex_create()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92653 13f79535-47bb-0310-9956-ffa450edef68
2001-12-29 23:16:24 +00:00
Jeff Trawick
187e9ae3b9 Change core code to allow an MPM to set hard thread/server
limits at startup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92512 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 13:48:54 +00:00
Aaron Bannert
b491e30b1c Fix a bug in how we select the IP for the POD to connect to for dummy
connects (dislodging a doomed child from the accept mutex). No longer
do we assume that the child is listening to 127.0.0.1, but instead
we just pick the first hostname/port from the listen rec.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92437 13f79535-47bb-0310-9956-ffa450edef68
2001-12-12 23:56:46 +00:00
Greg Ames
65538c20e3 fix a problem with graceful restart. If you look at daedalus early in the
morning, you will usually see lots ( >50 ) of old generation processes
happily serving requests with yesterday's config.  Late in the afternoon, they
are usually gone due to MaxRequestsPerChild and perform_idle_server_maintenance.

ap_mpm_pod_signal can time out during connect(), causing it to exit with an
error.  If it was called by ap_mpm_pod_killpg during graceful restart,
ap_mpm_pod_killpg will exit immediately.  This can cause us to not write
enough characters to the pod to kill off all the old generation children.

This fix decouples the loop which writes to the pod from the loop which
generates dummy connect()s.  The connect()s aren't as important as
writing to the pod when there is a steady stream of inbound connections.

also, close the socket and destroy the temporary pool if the connect()
fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92411 13f79535-47bb-0310-9956-ffa450edef68
2001-12-10 20:10:05 +00:00
Jeff Trawick
6496d29027 get prototype for strcasecmp() on AIX
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92305 13f79535-47bb-0310-9956-ffa450edef68
2001-12-04 01:04:17 +00:00
Jeff Trawick
477e8bbba8 make sure ap_process_child_status() always returns something
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92020 13f79535-47bb-0310-9956-ffa450edef68
2001-11-17 14:09:14 +00:00
Jeff Trawick
502a0a8eb9 Get mod_cgid killed when a MPM exits due to a fatal error.
Presumably other such processes are affected to.  Now we
give main() a chance to clean up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92019 13f79535-47bb-0310-9956-ffa450edef68
2001-11-17 14:02:26 +00:00