You will only get the Seg fault or Bus error when a process comes round
for recycling.
<IfModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 1
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<Location /evn>
SetHandler perl-script
PerlResponseHandler TEST::ENV
</Location>
TEST/ENV.pm
package TEST::ENV;
use strict;
use warnings FATAL => 'all';
use Carp;
use Sys::HostIP;
use Apache2::RequestRec ();
use Apache2::Const -compile => qw(OK);
sub handler {
my $r = shift;
$r->content_type('text/html');
## core dump
local %ENV;
$r->print("IP: " . join ',', Sys::HostIP->ips());
return Apache2::Const::OK;
}
1;
I'll confirm that does core dump as Peter says.
Backtrace:
#0 0x284e4533 in modperl_env_request_tie (r=0x8ee3050) at
modperl_env.c:404
404 EnvMgObj = (char *)r;
[New LWP 100139]
(gdb) bt full
#0 0x284e4533 in modperl_env_request_tie (r=0x8ee3050) at
modperl_env.c:404
No locals.
#1 0x284d4a98 in modperl_response_handler_cgi (r=0x8ee3050) at
mod_perl.c:1087
dcfg = (modperl_config_dir_t *) 0x8ee1910
h_stdin = (GV *) 0x8b6de8c
h_stdout = (GV *) 0x8ed5950
retval = 675975185
rc = 135565248
rcfg = (modperl_config_req_t *) 0x8ee3e30
#2 0x08076f4a in ap_run_handler (r=0x8ee3050) at config.c:157
pHook = (ap_LINK_handler_t *) 0x81679b0
n = 9
rv = -1
#3 0x080776ca in ap_invoke_handler (r=0x8ee3050) at config.c:371
handler = 0x0
p = 0x0
result = 0
old_handler = 0x8148fc0 "perl-script"
#4 0x08085238 in ap_process_request (r=0x8ee3050) at http_request.c:258
access_status = 0
#5 0x08082684 in ap_process_http_connection (c=0x8a75128) at
http_core.c:171
r = (request_rec *) 0x8ee3050
csd = (apr_socket_t *) 0x8a75050
#6 0x0807e58e in ap_run_process_connection (c=0x8a75128) at
connection.c:43
pHook = (ap_LINK_process_connection_t *) 0x8167f68
n = 1
rv = -1
#7 0x0807e9cc in ap_process_connection (c=0x8a75128, csd=0x8a75050) at
connection.c:178
rc = -2
#8 0x0808a53e in child_main (child_num_arg=2) at prefork.c:640
current_conn = (conn_rec *) 0x8a75128
csd = (void *) 0x8a75050
ptrans = (apr_pool_t *) 0x8a75018
allocator = (apr_allocator_t *) 0x81b5f00
status = 0
i = -1
lr = (ap_listen_rec *) 0x80b6680
pollset = (apr_pollset_t *) 0x8a733e0
sbh = (ap_sb_handle_t *) 0x8a733d8
bucket_alloc = (apr_bucket_alloc_t *) 0x8edd018
last_poll_idx = 0
#9 0x0808a6de in make_child (s=0x80b9cf8, slot=2) at prefork.c:736
pid = 0
#10 0x0808a93a in perform_idle_server_maintenance (p=0x80b8018) at
prefork.c:871
i = 0
to_kill = -1
idle_count = 0
ws = (worker_score *) 0x287661e4
free_length = 1
free_slots = {2, 3, -1077942496, 672654516, -1077942408,
134934528, -1077942456, 672548371, -1077942480, 0, 3, 672548298, 1, 0,
100000
672422316, -1077942020, 671765128, -1077942392, 672410675, 0, 0, 0, 0,
-1077942408, 0, 1000000, 0, 134978808, 3, 1, 0}
last_non_dead = 1
total_non_dead = 2
#11 0x0808adb1 in ap_mpm_run (_pconf=0x80b8018, plog=0x80e6018,
s=0x80b9cf8) at prefork.c:1075
status = 135221272
pid = {pid = -1, in = 0x281459ac, out = 0xbfbfe818, err =
0x281355da}
child_slot = 0
exitwhy = 672355536
processed_status = 0
index = 134903040
remaining_children_to_start = 0
rv = 0
#12 0x080620d6 in main (argc=3, argv=0xbfbfe8ec) at main.c:712
c = 0 '\0'
configtestonly = 0
confname = 0x80955ad "conf/httpd.conf"
def_server_root = 0x80955c0
"/usr/home/pgollucci/dev/apps/httpd/2.2.0/prefork"
temp_error_log = 0x0
error = 0x0
process = (process_rec *) 0x80b6098
server_conf = (server_rec *) 0x80b9cf8
pglobal = (apr_pool_t *) 0x80b6018
pconf = (apr_pool_t *) 0x80b8018
plog = (apr_pool_t *) 0x80e6018
ptemp = (apr_pool_t *) 0x80f5018
pcommands = (apr_pool_t *) 0x80ba018
opt = (apr_getopt_t *) 0x80ba0b0
rv = 0
mod = (module **) 0x80a0030
optarg = 0xbfbfe884 ""
signal_server = (apr_OFN_ap_signal_server_t *) 0x8080950
<ap_signal_server>
Now to see if I can fix it :)