Received: (qmail 75969 invoked by uid 501); 1 Nov 2000 16:39:54 -0000 Message-Id: <20001101163954.75951.qmail@locus.apache.org> Date: 1 Nov 2000 16:39:54 -0000 From: Larry Rosenman Reply-To: ler@lerctr.org To: submit@bugz.apache.org Subject: the apache startup dlopens and dlcloses then re-dlopens modules. X-Send-Pr-Version: 3.110 >Number: 6780 >Category: os-unixware >Synopsis: the apache startup dlopens and dlcloses then re-dlopens modules. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Nov 01 08:40:01 PST 2000 >Closed-Date: Thu Nov 02 13:31:23 PST 2000 >Last-Modified: Thu Nov 02 13:31:23 PST 2000 >Originator: ler@lerctr.org >Release: 1.3.14 >Organization: >Environment: $ uname -a UnixWare lerami 5 7.1.1 i386 x86at SCO UNIX_SVR5 $ uname -X System = UnixWare Node = lerami Release = 5 KernelID = 00/06/28 Machine = Pentium III BusType = ISA Serial = 2GE034261 Users = 15 OEM# = 0 Origin# = 1 NumCPU = 1 $ using the NATIVE cc compiler. But I don't think that it matters. >Description: During apache's startup, apache dlopen's all the shared library's, and then dlcloses them, and then re-dlopens them. This causes some issues on UnixWare with some of the routines in -lsocket. There is some static initialization that happens when some of these routines are called. If an extension, such as PHP4 in my case, needs -lresolv in addition to -lsocket, we wind up with a wrong function pointer stored in the static data section. A quick fix in my case was to force -lresolv into the apache link. My question is why do we do this? there is *NO* guarantee that the libraries will wind up at the same place in memory. >How-To-Repeat: see above >Fix: Don't dlopen/dlclose/dlopen just dlopen once. >Release-Note: >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: fanf State-Changed-When: Thu Nov 2 11:07:38 PST 2000 State-Changed-Why: This is a "feature" rather than a bug. Does Apache work without -lresolv and without php? (I would have expected it to need -lresolv.) Is php linked with -lresolv? We can add -lresolv to the configure script if it fixes the problem. In the more general case of modules having difficulties with the double- load there are standard ways to deal with it which I would expect PHP to use. In any case, apache-2.0 handles this completely differently, and loads modules only once. From: "Larry Rosenman" To: , , Cc: , Subject: RE: os-unixware/6780: the apache startup dlopens and dlcloses then re-dlopens modules. Date: Thu, 2 Nov 2000 13:18:06 -0600 Yes, apache runs without -lresolv. PHP needs -lresolv, but apache apparently doesn't. If we could add it for future 1.3 releases (at least for UnixWare), I'd appreciate it. When 2.0 goes beta, I'll try it and PHP and see how it goes. Thanks! Larry Rosenman -----Original Message----- From: fanf@apache.org [mailto:fanf@apache.org] Sent: Thursday, November 02, 2000 1:08 PM To: apache-bugdb@apache.org; fanf@apache.org; ler@lerctr.org Subject: Re: os-unixware/6780: the apache startup dlopens and dlcloses then re-dlopens modules. [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ] Synopsis: the apache startup dlopens and dlcloses then re-dlopens modules. State-Changed-From-To: open-feedback State-Changed-By: fanf State-Changed-When: Thu Nov 2 11:07:38 PST 2000 State-Changed-Why: This is a "feature" rather than a bug. Does Apache work without -lresolv and without php? (I would have expected it to need -lresolv.) Is php linked with -lresolv? We can add -lresolv to the configure script if it fixes the problem. In the more general case of modules having difficulties with the double- load there are standard ways to deal with it which I would expect PHP to use. In any case, apache-2.0 handles this completely differently, and loads modules only once. State-Changed-From-To: feedback-closed State-Changed-By: fanf State-Changed-When: Thu Nov 2 13:31:20 PST 2000 State-Changed-Why: I've added -lresolv to the libraries list for UnixWare 7. Thanks for using Apache! >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]