Received: (qmail 16479 invoked by uid 2012); 1 Jun 1998 21:41:33 -0000 Message-Id: <19980601214133.16478.qmail@hyperreal.org> Date: 1 Jun 1998 21:41:33 -0000 From: Martin Lichtin Reply-To: lichtin@olsen.ch To: apbugs@hyperreal.org Subject: Modules are initialized twice at startup. X-Send-Pr-Version: 3.2 >Number: 2337 >Category: apache-api >Synopsis: Modules are initialized twice at startup. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Jun 1 14:50:00 PDT 1998 >Last-Modified: Thu Jun 4 13:32:31 PDT 1998 >Originator: lichtin@olsen.ch >Organization: >Release: 1.3b7 >Environment: SunOs, gcc. >Description: A module initializer should only be called once at startup. This is fixed in 1.2.5 and 1.2.6! >How-To-Repeat: >Fix: Add the bFirst flag to 1.3. >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Mon Jun 1 15:55:49 PDT 1998 State-Changed-Why: Modules are supposed to be initialized twice, and they have been for a long time and will be for the forseeable future in the 1.x code. I suspect your confusion comes from some third-party patch you applied to your 1.2.x code that makes initialization only happen once. Note that doing so can break some modules that rely on it happening twice. From: Marc Slemko To: Martin Lichtin Cc: Apache bugs database Subject: Re: apache-api/2337: Modules are initialized twice at startup. Date: Wed, 3 Jun 1998 09:55:42 -0700 (PDT) On Wed, 3 Jun 1998, Martin Lichtin wrote: > Ben Laurie writes: > > The justification I was given, a long time ago, was that modules are > > reinitialised on a server restart (i.e. SIGHUP or SIGUSR1) so they may > > as well go wrong at startup if they can't deal with that. I believe that > > that is just a rationalisation, though. The real reason is that it is > > simpler to let it do it that way. > > Ok, but why then does the SSL patch subvert that behaviour? One > problem, for example, is that the FastCGI module expects to be called > twice at startup, but after the SSL patch, this is not true anymore so > it fails to initialize itself. It took me some time to figure that out. > > In general, module initialization can be costly, so Apache shouldn't > initialize all its modules twice at startup, there's just no reason > for it, as far as I can see. > And we do not want to mess with the way it is done now because, as you say, it creates problems for numerous modules. It was tried in one beta. It caused so many problems we had to go back. In 2.0, this will likely be revisited. Comment-Added-By: dgaudet Comment-Added-When: Thu Jun 4 13:32:31 PDT 1998 Comment-Added: Another reason not mentioned is that the server does know things such as where the error log will be until after it has read the file... and so it can't report configuration errors to the error log without doing things twice. Or some such silliness. Dean >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]