1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

120 Commits

Author SHA1 Message Date
Bradley Nicholes
05be96b865 Simplify the per-thread pool handling in the NetWare MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100156 13f79535-47bb-0310-9956-ffa450edef68
2003-06-03 19:47:35 +00:00
Bradley Nicholes
c9476445d9 Make sure that bucket allocator for each worker thread is created from a thread
specific pool.  This prevents multiple threads from trying to clean up the same
pool at the same time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99942 13f79535-47bb-0310-9956-ffa450edef68
2003-05-20 15:15:23 +00:00
Bradley Nicholes
cb1fce485b Need to report a select() error vs a timeout. Also avoid hogging the CPU on
an error.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99065 13f79535-47bb-0310-9956-ffa450edef68
2003-03-26 19:21:32 +00:00
Bradley Nicholes
7289968ef4 Fixed a small logic problem when printing out the console command help
Submitted by: Ulrich Neumann <U_Neumann@gne.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99017 13f79535-47bb-0310-9956-ffa450edef68
2003-03-18 15:13:42 +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
Bradley Nicholes
a6d627ff01 Enabled the -n parameter on NetWare to allow the administrator to rename
the console screen


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98535 13f79535-47bb-0310-9956-ffa450edef68
2003-01-29 17:09:50 +00:00
Bradley Nicholes
60c843a69a Register for the SERVERDOWN event to allow Apache to shutdown gracefully
when the NetWare OS is shutdown


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97898 13f79535-47bb-0310-9956-ffa450edef68
2002-12-12 19:40:52 +00:00
Bradley Nicholes
de524cdd36 Force the screen to close on exit() if the -E option was specified on the
command line


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97647 13f79535-47bb-0310-9956-ffa450edef68
2002-11-25 17:46:26 +00:00
Bradley Nicholes
a3fc322d82 Don't hold the Apache screen open when it exits with an error if all of the error
messages are going to a file anyway.  In other words, don't hold the screen
open if the -E <filename> command line parameter is used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97507 13f79535-47bb-0310-9956-ffa450edef68
2002-11-13 21:14:02 +00:00
Bradley Nicholes
9ac2b41d95 Switched to the APR_STATUS_IS_XXX macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97207 13f79535-47bb-0310-9956-ffa450edef68
2002-10-14 18:07:15 +00:00
Bradley Nicholes
54425d0332 Don't bother destroying the memory pools and buckets for each thread at
during shutdown since it will all be cleaned up at termination anyway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97067 13f79535-47bb-0310-9956-ffa450edef68
2002-10-03 00:30:54 +00:00
Bradley Nicholes
3749da13cb Removed unnecessary pool cleanup after a restart or shutdown
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96560 13f79535-47bb-0310-9956-ffa450edef68
2002-08-28 19:56:32 +00:00
Bradley Nicholes
73f7934fd4 Hold the Apache screen open on NetWare if exit() is called for any reason
during initialization and configuration of the main Apache process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96172 13f79535-47bb-0310-9956-ffa450edef68
2002-07-24 15:17:56 +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
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
Bradley Nicholes
18ba6165fe Re-architected the select()/accept() loop to allow all threads to rely on select() to
signal when data is ready rather than only allowing a single thread at a time to
be signaled by select().  This allows Apache to pull the requests off of the
listen queue as fast as winsock will allow without latency introduced by the
accept mutex.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95893 13f79535-47bb-0310-9956-ffa450edef68
2002-06-26 21:53:25 +00:00
Jim Jagielski
cb3975a65b Now that we have the functionality in apr, we can now have 2.0's
startup message regarding AcceptMutex (what we are using and what
the default is) "fully" match what is present in 1.3.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95568 13f79535-47bb-0310-9956-ffa450edef68
2002-06-07 14:08:05 +00:00
Bradley Nicholes
c92c530536 Switched to using atomic operations for tracking the active threads rather
than having to lock and unlock a mutex.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95458 13f79535-47bb-0310-9956-ffa450edef68
2002-05-31 22:16:04 +00:00
Sander Striker
b1d454e981 Catch up with the apr_allocator_set_owner -> apr_allocator_owner_set renames
in APR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95373 13f79535-47bb-0310-9956-ffa450edef68
2002-05-30 00:21:27 +00:00
Bradley Nicholes
5176216ddc Fixing a memory leak with the threads bucket_allocator. We were allocating
too much and not freeing up enough.  On a thread exit the bucket and the
transaction pool need to be cleaned up.  When the MPM exits, the main pool
needs to be cleaned up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95207 13f79535-47bb-0310-9956-ffa450edef68
2002-05-21 22:00:44 +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
Bradley Nicholes
61b3b73397 Readjusting how the bucket alloc is done for each worker thread. Allocate
the bucket once per thread rather than on every request.  This change
increases our performance significantly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94880 13f79535-47bb-0310-9956-ffa450edef68
2002-04-30 14:32:07 +00:00
Bradley Nicholes
704d15c85f Add some additional shutdown synchronization so that we don't get the OS
message to force the module to unload.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94660 13f79535-47bb-0310-9956-ffa450edef68
2002-04-15 19:23:59 +00:00
Bradley Nicholes
f317c2c9e6 Readjustment of where the bucket is being allocated now that they are being
cleaned up.  Need to move the call to after apr_pool_clear() so that it doesn't
get cleanup too soon and never reallocated.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94627 13f79535-47bb-0310-9956-ffa450edef68
2002-04-12 22:11:44 +00:00
Bradley Nicholes
1269b72fbf Closed up some holes where a thread could escape and exit without releasing
the mutex.  This would leave all of the other threads deadlocked.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94593 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 17:13:32 +00:00
Bradley Nicholes
f6aa116eaa Added a call to apr_bucket_alloc_destroy() to the clean_child_exit() code that
is called when each worker thread terminates.  This stopped the memory leak.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94479 13f79535-47bb-0310-9956-ffa450edef68
2002-04-06 00:03:32 +00:00
Bradley Nicholes
7c0bb25bd2 Check for a NULL pointer in the case of the OS address space
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94388 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 16:25:23 +00:00
Bradley Nicholes
dc2e5a5b3e Replaced a hack for getting the address space with the real API
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94369 13f79535-47bb-0310-9956-ffa450edef68
2002-04-02 00:29:23 +00:00
Jim Jagielski
70bb2575ea The old, legacy (and unused) code in which the scoreboard was totally
and completely contained in a file (SCOREBOARD_FILE) has been
removed. This does not affect scoreboards which are *mapped* to
files using named-shared-memory at all. This implies that scoreboards
must be based, at some level, on native shared memory (mmap, shm_open,
shmget, whatever), but the code has assumed that for quite awhile
now. Having the scoreboard be *based* on a file makes no sense today.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94306 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 14:33:50 +00:00
Cliff Woolley
3e2ce19baf BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 08:17:26 +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
William A. Rowe Jr
cec6d4b870 The pre_mpm hook creates server-lifetime objects (or at least, for the
generations across graceful restarts.)  They should use the process pool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94039 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 05:58:21 +00:00
Sander Striker
50ba0ce732 Update the mpms to call the new allocator/pools API
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93943 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 00:50:31 +00:00
Bradley Nicholes
da65586a94 Added code to extract the current address space name so that each
instance of Apache can be identified by the address space that it is running in


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93934 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 16:48:19 +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
Aaron Bannert
0cff6e8f58 Implement new ScoreBoardFile directive logic. This affects how we
create the scoreboard's shared memory segment. We now have the best of
both worlds:

if config specifies ScoreBoardFile
  create name-based shared memory, errors are fatal
else /* we get to choose */
  create anonymous shared memory
  if ENOTIMPL
    create name-based shared memory from DEFAULT_SCOREBOARD
  else
    errors are fatal

This gives us the flexibility to have anonymous shared memory (on platforms
that support it) as well as name-based shared memory when third-party
programs want access to our scoreboard.

The ap_scoreboard_fname static variable is now owned by the scoreboard.c
file, and no longer by the MPMs. The MPMs MUST NOT set ap_scoreboard_fname
to a default, since that will override the default creation logic and
only allow name-based segments.

Submitted by:	Aaron Bannert
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93434 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 20:48:19 +00:00
Bradley Nicholes
de40d0256c Create a new pool allocator for each worker thread
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93397 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 22:56:10 +00:00
Bradley Nicholes
6e81b18307 Implemented the handling of the SIGABRT signal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93315 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 21:13:57 +00:00
Bill Stoddard
bd3d360392 Reintroduce the create_connection hook. This hook is required to enable
modules to completely take over all network i/o from the core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93171 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 22:16:31 +00:00
Bradley Nicholes
936f36684e Fixed the unload process so that the console command gets properly
unregistered.  This fixes the 88 unreleased resources after termination


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93161 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 17:29:27 +00:00
Bradley Nicholes
bef023bf1b Removed the call for now to shutdown the listeners so that threads don't end
up stuck on blocking socket calls during shutdown.  I need to figure out a
cleaner way of preventing this problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93139 13f79535-47bb-0310-9956-ffa450edef68
2002-01-31 19:21:34 +00:00
Bill Stoddard
4168820850 This patch restores most of Ryan's patch (11/12/2001) to remove the
client_socket from the conn_rec.  Diffs from Ryan's patch include:

- rename the create_connection hook to install_transport_filters
- move the point of invocation of the hook till after the call to
  after ap_update_vhost_given_ip to enable the hook to use vhost
  config info in its decision making.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93087 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 19:02:04 +00:00
Aaron Bannert
d5fdaf9cfd The pre_config hook now takes a return value. This allows modules to
cause the server to bail out under error conditions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93063 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 23:49:40 +00:00
Jeff Trawick
7c1ce28ee1 fix the problem where a scoreboard init failure could leave
mod_cgid stranded

a pre_mpm hook can now return failures, so problems in
ap_create_scoreboard percolate back to a place where Apache
can exit cleanly


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93055 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 00:41:32 +00:00
Bill Stoddard
327e4989d5 Remove the create_connection hook and put the client_socket back into the
conn_rec. The create_connection_hook has a design flaw that prevents it
from making decisions based on vhost information.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93050 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 12:52:08 +00:00
Bradley Nicholes
422b6e7cdf Updated the command line keyword to Apache2 and also modified the
shutdown code for unloading the NLM


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92917 13f79535-47bb-0310-9956-ffa450edef68
2002-01-18 23:26:07 +00:00
Bradley Nicholes
d1146dd589 Implemented a checkunload callback to allow apache to be unloaded using
the Unload console command.  Also changed the nlm name and console
command to APACHE2.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92852 13f79535-47bb-0310-9956-ffa450edef68
2002-01-14 18:55:51 +00:00
Bradley Nicholes
057bd297b4 Combination of blocking and nonblocking accept loop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92832 13f79535-47bb-0310-9956-ffa450edef68
2002-01-11 23:19:45 +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