You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Larry Rosenman <le...@lerctr.org> on 2000/11/01 17:39:54 UTC

os-unixware/6780: the apache startup dlopens and dlcloses then re-dlopens modules.

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Nov 01 08:40:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     ler@lerctr.org
>Release:        1.3.14
>Organization:
apache
>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:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> 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!     ]