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

379 Commits

Author SHA1 Message Date
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
7d0348cd78 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>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180742 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 23:10:12 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
d4e7fad995 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1151234 13f79535-47bb-0310-9956-ffa450edef68
2011-07-26 20:37:49 +00:00
Stefan Fritsch
344dbd4e82 Reduce period during startup and restart where a successive signal may be lost
PR: 43696
Submitted by: Arun Bhalla <arun shme net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1151233 13f79535-47bb-0310-9956-ffa450edef68
2011-07-26 20:36:56 +00:00
Stefan Fritsch
4b3f0aaf96 Log the deprecation warning at level info, not warn
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137813 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 22:57:24 +00:00
Stefan Fritsch
5f2cf595f0 Fix search'n'replace error: Actually warn if MaxClients is used
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137757 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:47:23 +00:00
Stefan Fritsch
6d8de2ff42 Rename MaxClients to MaxRequestWorkers which describes more accurately what
it does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137744 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:00:52 +00:00
Stefan Fritsch
c9fd2623da Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere.

We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
Jeff Trawick
462c69e0b5 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096609 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 21:21:22 +00:00
Jeff Trawick
3c0476fe50 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087085 13f79535-47bb-0310-9956-ffa450edef68
2011-03-30 21:32:10 +00:00
Jeff Trawick
5e3ba7d3ee 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)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086293 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 16:25:20 +00:00
Jeff Trawick
7be2d26631 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086224 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 13:35:08 +00:00
Joe Orton
239188a96b * 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1084000 13f79535-47bb-0310-9956-ffa450edef68
2011-03-21 22:36:45 +00:00
Jeff Trawick
4487fa925a 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078286 13f79535-47bb-0310-9956-ffa450edef68
2011-03-05 13:36:09 +00:00
Jeff Trawick
21a628f138 zap needless reinitialization of is_graceful on the 2nd
call of the open-logs hook


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078285 13f79535-47bb-0310-9956-ffa450edef68
2011-03-05 13:09:12 +00:00
Jeff Trawick
3b75c26516 sanity check use of volatile in prefork, worker, and event
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078170 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 22:12:21 +00:00
Jeff Trawick
60221bdd76 prefork in ONE_PROCESS mode:
child_main() called clean_child_exit() in almost all paths,
and returned to the caller in one infrequent path; just
call clean_child_exit() always


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1076454 13f79535-47bb-0310-9956-ffa450edef68
2011-03-02 23:17:22 +00:00
Jeff Trawick
4618019d69 prefork: store pid in scoreboard for ONE_PROCESS mode
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1076382 13f79535-47bb-0310-9956-ffa450edef68
2011-03-02 21:16:57 +00:00
Jeff Trawick
46bdc28bf4 fix some logging calls to include the server_rec
(and even the conn_rec in a couple of places)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1074871 13f79535-47bb-0310-9956-ffa450edef68
2011-02-26 15:32:01 +00:00
Joe Orton
4cb4c7437f * server/mpm/prefork/prefork.c (stop_listening, sig_term, restart):
Update mpm_state in the signal handlers such that it is correct in
  children during a graceful stop/restart too.

PR: 41743
Submitted by: Andrew Punch <andrew.punch 247realmedia.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068389 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 13:47:23 +00:00
Stefan Fritsch
5ad5328aa3 Fix ap_mpm_query results:
AP_MPMQ_MAX_THREADS: Single threaded means one thread per child, not zero
AP_MPMQ_MAX_DAEMONS: Max # daemons by config is determined by MaxClients, not
                     ServerLimit


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1057045 13f79535-47bb-0310-9956-ffa450edef68
2011-01-09 22:47:33 +00:00
Jeff Trawick
5860b7bef6 fix description of the change for PR43857; it is a work-around
for a reslist problem that isn't fixed in apr-util 1.3.x

Suggested by: jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021616 13f79535-47bb-0310-9956-ffa450edef68
2010-10-12 03:55:11 +00:00
Stefan Fritsch
a527986832 remove more unused variables
revove some obsolete comments

netware file is untested


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982050 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 22:12:19 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Jeff Trawick
4548ab57f9 replace r942897 with the original submitted patch
prefork MPM: Run cleanups for final request when process exits gracefully.
PR: 43857
Submitted by: Tom Donovan


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@943650 13f79535-47bb-0310-9956-ffa450edef68
2010-05-12 19:41:19 +00:00
Jeff Trawick
d24fd9927c revert the PR 43857 fix in r942897 based on a potential
memory leak pointed out by jorton
(original patch to be committed shortly)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@943648 13f79535-47bb-0310-9956-ffa450edef68
2010-05-12 19:36:47 +00:00
Jeff Trawick
60feeb2f5a prefork MPM: Run cleanups for final request when process exits gracefully.
PR: 43857
Submitted by: Tom Donovan, simplified slightly by me


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@942897 13f79535-47bb-0310-9956-ffa450edef68
2010-05-10 20:47:59 +00:00
William A. Rowe Jr
01d300298f Catch up with ap_[proc|global]_mutex_create api change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@940981 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04 17:40:43 +00:00
Eric Covener
555372fbfc all signs indicate that status value is always -1 on error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@922405 13f79535-47bb-0310-9956-ffa450edef68
2010-03-12 19:55:35 +00:00
Eric Covener
c81cbf5592 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.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@922392 13f79535-47bb-0310-9956-ffa450edef68
2010-03-12 18:49:26 +00:00
Daniel Earl Poirier
0c96068dc4 Log command line on startup, so there's a record of command line
arguments like -f.  Suggested by Shaya Potter.  [Dan Poirier]
PR: 48752


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910684 13f79535-47bb-0310-9956-ffa450edef68
2010-02-16 20:50:10 +00:00
Jeff Trawick
aecc198b93 change the preprocessor define ap_accept_mutex_type to upper case
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@907723 13f79535-47bb-0310-9956-ffa450edef68
2010-02-08 16:59:45 +00:00
Jeff Trawick
2e9668a33d Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
and WatchdogMutexPath with a single Mutex directive.  Add APIs to
simplify setup and user customization of APR proc and global mutexes.  
(See util_mutex.h.)  Build-time setting DEFAULT_LOCKFILE is no longer
respected; set DEFAULT_REL_RUNTIMEDIR instead.

Some existing modules, such as mod_ldap and mod_auth_digest gain 
configurability for their mutexes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883540 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:17:51 +00:00
Jim Jagielski
83532ab628 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@818825 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 11:59:30 +00:00
Ruediger Pluem
3fadc493c9 * Do better checking of pollset operations in various places to avoid segfaults.
PR: 46467
Submitted by: Stefan Fritsch <sf sfritsch.de>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@804764 13f79535-47bb-0310-9956-ffa450edef68
2009-08-16 20:29:47 +00:00
Jeff Trawick
d1c3416282 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@762127 13f79535-47bb-0310-9956-ffa450edef68
2009-04-05 17:54:22 +00:00
Jeff Trawick
23ac01a833 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760864 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 11:53:50 +00:00
Jeff Trawick
fb6a306876 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759924 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 11:27:53 +00:00
Jeff Trawick
35e3599b25 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759757 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 19:30:17 +00:00
Jeff Trawick
a1908585a8 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759699 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 14:41:02 +00:00
Jeff Trawick
b949658d4d axe ancient platform checks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759682 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 13:59:07 +00:00
Mladen Turk
bf086f6dcc Register rewrite_args hook.
Now, dunno if that was intended, but at least allow to start the httpd

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759648 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 08:22:28 +00:00
Jeff Trawick
301f0404f5 axe unmaintained 1.3-era code to support AUX, SunOS, IRIX, Next, Tandem, MPE,
LynxOS, QNX, and UnixWare


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758944 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:32:22 +00:00
Jeff Trawick
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
Jeff Trawick
901744828a prefork, worker, event:
restore expected accept mutex mechanism and allocator limit support
  (the related AP_MPM_WANT_foo defines no longer exist)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758680 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 15:24:11 +00:00
Jeff Trawick
5872c0a54c resurrect the old (pre-r757867) compiled-in MPM_NAME value, but via a hook for dynamically
linked MPMs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758312 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 15:46:56 +00:00
Jeff Trawick
c7266edf61 The rewrite-args hook isn't available to MPM DSOs. Piggy-back on the
linked-in mod_unixd.c to handle that.

(The set of MPMs modified is the same set for which mod_unixd is enabled,
which is approximately equivalent to the set of Unix MPMs which anybody has
tried to maintain in recent memory.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758278 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 14:50:24 +00:00
Jeff Trawick
de5f7aa944 prefork, worker, and event MPMs: use retained-data API to maintain
information across reconfigs, to allow these MPMs to work as DSOs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758185 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 09:23:23 +00:00
Jeff Trawick
e12944e64d main() now sets ap_server_conf()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758062 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 22:20:34 +00:00