The following reply was made to PR mod_jserv/5420; it has been noted by GNATS.
From: Thierry Delaitre <[EMAIL PROTECTED]>
To: Ed Korthof <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: mod_jserv/5420: Segmentation Fault
Date: Wed, 8 Dec 1999 10:29:47 +0000 (GMT)
Hi,
On Mon, 6 Dec 1999, Ed Korthof wrote:
> hi --
>
> the place where the problem is occuring is populated by the __FILE__
> macro; apache expects certain things there, in the module_structure. so
> either the wrong thing is there, or the memory got corrupted already at
> the point when this was called.
>
> in the testing environment which i have, DSOs work fine. i'm guessing
> that you're seeing one of two things. either the gcc which you're using
> is buggy, or you built the mod_jserv.so file on a different machine from
> the one used to build your httpd (or with different compiler settings).
I'm sure I've used the same gcc.
> the version of gcc which you're using isn't in that common of use (i've
> generally seen 2.7.x, with the explanation that the 2.8.x series is buggy)
> -- but if this were a bug in that, i'd expect a work-around in the apache
> source.
> but it's also possible that the jserv initialization is corrupting the
> stack; if that's the case, it's not triggered by my environment. if
> that's what's going on, it'd be helpful to see your conf file.
>
> are you certain the .so file was compiled on the same machine (and with
> the same compiler) as apache?
yes it was compiled on the same machine using same gcc.
> if so, could you gdb one of the core files
> and send me the output from 'p jserv_module'?
Sure. Please find the output below:
Starting program: /rhino_local/apache-internet/bin/httpd
Program received signal SIGSEGV, Segmentation fault.
0xef6505e0 in strrchr () from /usr/lib/libc.so.1
(gdb) bt
#0 0xef6505e0 in strrchr () from /usr/lib/libc.so.1
#1 0x4f96c in ap_add_module ()
#2 0x4fb24 in ap_add_loaded_module ()
#3 0x471d0 in load_module ()
#4 0x50314 in invoke_cmd ()
#5 0x510e4 in ap_handle_command ()
#6 0x511c4 in ap_srm_command_loop ()
#7 0x51928 in ap_process_resource_config ()
#8 0x58a74 in include_config ()
#9 0x501fc in invoke_cmd ()
#10 0x510e4 in ap_handle_command ()
#11 0x511c4 in ap_srm_command_loop ()
#12 0x51928 in ap_process_resource_config ()
#13 0x5251c in ap_read_config ()
#14 0x60b3c in main ()
(gdb) p jserv_module
$1 = {version = 19990320, minor_version = 6, module_index = 21,
name = 0x5c0e18 <Address 0x5c0e18 out of bounds>, dynamic_load_handle =
0xef770b00, next = 0xd0a7c,
magic = 1095774515, init = 0x5b7360, create_dir_config = 0, merge_dir_config
= 0,
create_server_config = 0x5b5c98, merge_server_config = 0x5b5d50, cmds =
0x5d68a8, handlers = 0x5d6888,
translate_handler = 0x5b77a0, ap_check_user_id = 0, auth_checker = 0,
access_checker = 0,
type_checker = 0x5b787c, fixer_upper = 0, logger = 0, header_parser = 0,
child_init = 0x5b746c,
child_exit = 0, post_read_request = 0}
(gdb)
it should look something
> like this:
>
> *****
> (gdb) p jserv_module
> $1 = {version = 19990320, minor_version = 6, module_index = 20,
> name = 0x400e8337 "mod_jserv.c", dynamic_load_handle = 0x80de9b8,
> next = 0x80c8518, magic = 1095774515, init = 0x400df2b4 <jserv_init>,
> create_dir_config = 0, merge_dir_config = 0,
> create_server_config = 0x400dde78 <jserv_server_config_create>,
> merge_server_config = 0x400ddf4c <jserv_server_config_merge>,
> cmds = 0x400ed42c, handlers = 0x400ed40c,
> translate_handler = 0x400df650 <jserv_translate_handler>,
> ap_check_user_id = 0, auth_checker = 0, access_checker = 0,
> type_checker = 0x400df718 <jserv_type_match>, fixer_upper = 0, logger = 0,
> header_parser = 0, child_init = 0x400df37c <jserv_child_init>,
> child_exit = 0, post_read_request = 0}
> (gdb)
> *****
>
> what do you mean when you say the system was solaris 7 w/ 32 bits?
The Sun/Solaris OS runs in 64 bits on Ultra Sparc processor only. The
Sun architecture I have only supports 32 bits. BTW, only the Sun C
compiler is able to produce 64 bits binaries.
I'm using the default httpd.conf file. The only addition I did is to add
the Include statement at the bottom of the file to load jserv.conf.
I use the following options with configure for Apache 1.3.9
./configure --prefix=/rhino_local/apache-internet \
--enable-module=so \
--enable-module=info \
--enable-module=status \
--enable-module=rewrite \
--enable-suexec --suexec-caller=www
I use the following options with configure for ApacheJserv-1.1.b3
./configure --prefix=/rhino_local/apache-internet/jserv \
--with-apxs=/rhino_local/apache-internet/bin/apxs \
--with-jdk-home=/usr/java \
--with-JSDK=/rhino_local/JSDK2.0/lib/jsdk.jar
Thierry.