Received: (qmail 29454 invoked by uid 2012); 11 Mar 1999 14:24:56 -0000 Message-Id: <19990311142456.29452.qmail@hyperreal.org> Date: 11 Mar 1999 14:24:56 -0000 From: Didimo Grimaldo Reply-To: emilio_tunon@nl.compuware.com To: apbugs@hyperreal.org Subject: Httpd dies with SEGV when 3rd party module has threading X-Send-Pr-Version: 3.2 >Number: 4038 >Category: os-solaris >Synopsis: Httpd dies with SEGV when 3rd party module has threading >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Mar 11 06:30:01 PST 1999 >Last-Modified: Tue Apr 20 15:39:14 PDT 1999 >Originator: emilio_tunon@nl.compuware.com >Organization: >Release: 1.3.3 >Environment: SunOS waxmoth 5.5.1 Generic_103640-24 sun4m sparc SUNW,SPARCclassic Sun Pro compiler version 4.0 >Description: No backtrace, dbx also coredumps after run -X so I can't do 'where'. This occurs on some SunOS machines and is probably related to the sun patches, though one machine with the same patch level (24) does work while the other doesn't. It seems that on some machines you ACTUALLY need to compile Apache with the "-mt" CFLAG because the module is multi-threaded. If not used on these circumstances. If not then when that module is loaded it both libthread and libpthread are 'read'/loaded. But with "-mt" the libthread is loaded much earlier in the startup and the problem does not occur. A crashing session would show: Reading symbolic information for libpthread.so.1 Reading symbolic information for libthread.so.1 dbx: internal error: signal SEGV (Segmentation Fault) A good executable however would load libthread (Solaris native) very early, then load all the modules (mod_*) and then as last libpthread.so.1. Side remark: Changing EXTRA_CFLAGS requires that one *also* adds the `$(SRCDIR)/apaci` otherwise the generated makefiles lose all the system-defines of the configure session! >How-To-Repeat: Have a couple of Posix threads on a mod_mymodule, compile the module with -lpthread (ie. don't use native solaris threads) and with -mt. Will crash when you do 'httpd -X' or simply 'httpd'. >Fix: It should work on machines that don't require an explicit -mt but I can't affirm that. In any case -mt solves it. This of course is only valid when building using the Sun Pro compiler. >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: dgaudet State-Changed-When: Tue Apr 20 15:39:14 PDT 1999 State-Changed-Why: There's really not much we can do about this. Modules can modify the EXTRA_CFLAGS settings... see the .mod files and such in the modules/standard directory for an example. So this seems more of a 3rd party module bug than an apache bug. thanks for choosing apache. 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. ] [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! ]