Terence Monteiro wrote: > Terence Monteiro wrote: >> Hi, >> >> I'm getting segmentation faults with apache child processes. I'm running a >> Catalyst application using DBIx::SearchBuilder in the backend to accesss a >> mysql database. I'm running this on a debian quad core CPU server with 4 >> gigs RAM. I enabled core dumping and got a gdb backtrace as follows:
Important piece of information - I get the segfaults after putting a high load on the server, i.e. making many successive HTTP requests. >> >> #0 0xb6047590 in mysql_ping () from /usr/lib/libmysqlclient.so.15 >> No symbol table info available. >> #1 0xb61f83ea in XS_DBD__mysql__db_ping () from >> /usr/lib/perl5/auto/DBD/mysql/mysql.so >> No symbol table info available. >> #2 0xb6e10fb6 in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so >> No symbol table info available. >> #3 0xb7694975 in Perl_pp_entersub () from /usr/lib/libperl.so.5.10 >> No symbol table info available. >> #4 0xb7692d91 in Perl_runops_standard () from /usr/lib/libperl.so.5.10 >> No symbol table info available. >> #5 0xb768cd08 in Perl_call_sv () from /usr/lib/libperl.so.5.10 >> No symbol table info available. >> #6 0xb775cbfc in modperl_callback () from >> /usr/lib/apache2/modules/mod_perl.so >> No symbol table info available. >> #7 0xb775d2d3 in modperl_callback_run_handlers () from >> /usr/lib/apache2/modules/mod_perl.so >> No symbol table info available. >> #8 0xb775d9ca in modperl_callback_per_dir () from >> /usr/lib/apache2/modules/mod_perl.so >> No symbol table info available. >> #9 0xb77566ef in modperl_response_init () from >> /usr/lib/apache2/modules/mod_perl.so >> No symbol table info available. >> #10 0xb77568a3 in modperl_response_handler_cgi () from >> /usr/lib/apache2/modules/mod_perl.so >> No symbol table info available. >> #11 0x0807a179 in ap_run_handler (r=0x96fe138) at >> /tmp/buildd/apache2-2.2.9/server/config.c:159 >> n = 6 >> rv = 14 >> #12 0x0807d591 in ap_invoke_handler (r=0x96fe138) at >> /tmp/buildd/apache2-2.2.9/server/config.c:373 >> handler = 0x9e52b08 "8)�\t�X!\b" >> result = 166013704 >> old_handler = 0xa96a1e0 "perl-script" >> ignore = <value optimized out> >> #13 0x0808aff6 in ap_process_request (r=0x96fe138) at >> /tmp/buildd/apache2-2.2.9/modules/http/http_request.c:258 >> access_status = 0 >> #14 0x08088128 in ap_process_http_connection (c=0x9e52b08) at >> /tmp/buildd/apache2-2.2.9/modules/http/http_core.c:190 >> r = (request_rec *) 0x96fe138 >> csd = (apr_socket_t *) 0x0 >> #15 0x080815a9 in ap_run_process_connection (c=0x9e52b08) at >> /tmp/buildd/apache2-2.2.9/server/connection.c:43 >> n = 1 >> rv = 14 >> #16 0x0808fc0c in child_main (child_num_arg=<value optimized out>) at >> /tmp/buildd/apache2-2.2.9/server/mpm/prefork/prefork.c:672 >> pdesc = (const apr_pollfd_t *) 0x9dff018 >> current_conn = <value optimized out> >> csd = (void *) 0x9e52970 >> ptrans = (apr_pool_t *) 0x9e52938 >> allocator = (apr_allocator_t *) 0x9720d58 >> status = <value optimized out> >> i = <value optimized out> >> lr = <value optimized out> >> pollset = (apr_pollset_t *) 0x9dfefa8 >> sbh = (ap_sb_handle_t *) 0x9dfefa0 >> bucket_alloc = (apr_bucket_alloc_t *) 0x92a03a0 >> last_poll_idx = 1 >> #17 0x0808ff63 in make_child (s=0x80ab908, slot=4) at >> /tmp/buildd/apache2-2.2.9/server/mpm/prefork/prefork.c:769 >> No locals. >> #18 0x08090d68 in ap_mpm_run (_pconf=0x80a70c8, plog=0x80d9190, >> s=0x80ab908) at /tmp/buildd/apache2-2.2.9/server/mpm/prefork/prefork.c:904 >> pidfile = <value optimized out> >> active_children = <value optimized out> >> cutoff = <value optimized out> >> index = <value optimized out> >> remaining_children_to_start = 0 >> rv = <value optimized out> >> #19 0x08066f10 in main (argc=Cannot access memory at address 0x0 >> ) at /tmp/buildd/apache2-2.2.9/server/main.c:732 >> exit_status = 15 >> c = 68 'D' >> configtestonly = 0 >> confname = 0x8092866 "/etc/apache2/apache2.conf" >> def_server_root = 0x809a990 "" >> temp_error_log = 0x0 >> error = <value optimized out> >> process = (process_rec *) 0x80a5140 >> server_conf = (server_rec *) 0x80ab908 >> pglobal = (apr_pool_t *) 0x80a50c0 >> pconf = (apr_pool_t *) 0x80a70c8 >> plog = (apr_pool_t *) 0x80d9190 >> ptemp = (apr_pool_t *) 0x80e01a8 >> pcommands = (apr_pool_t *) 0x80a90d0 >> opt = (apr_getopt_t *) 0x80a9168 >> rv = <value optimized out> >> mod = <value optimized out> >> optarg = 0xbfeddf70 "NO_DETACH" >> >> Package versions of relevant packages are: >> >> ii apache2 2.2.9-10 >> ii apache2-dbg 2.2.9-11 >> ii apache2-mpm-prefork 2.2.9-11 >> ii apache2-utils 2.2.3-4+etch6 >> ii apache2.2-common 2.2.9-11 >> ii libapache2-mod-auth-pam 1.1.1-6.1 >> ii libapache2-mod-auth-sys-group 1.1.1-6.1 >> ii libapache2-mod-fastcgi 2.4.6-1 >> ii libapache2-mod-perl2 2.0.4-4 >> ii libapache2-mod-php5 5.2.0-8+etch10 >> ii libapache2-reload-perl 0.10-2 >> >> >> >> Output of perl -V: >> >> Summary of my perl5 (revision 5 version 10 subversion 0) configuration: >> Platform: >> osname=linux, osvers=2.6.26-1-686, archname=i486-linux-gnu-thread-multi >> uname='linux rebekka 2.6.26-1-686 #1 smp thu oct 9 15:18:09 utc 2008 >> i686 gnulinux ' >> config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN >> -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr >> -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5. >> 10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 >> -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local >> -Dsitelib=/usr/local/share/perl/5.10.0 -Dsitearch=/usr/local/lib/perl/5.10.0 >> -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 >> -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 >> -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible >> -pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g >> -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des' >> hint=recommended, useposix=true, d_sigaction=define >> useithreads=define, usemultiplicity=define >> useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef >> use64bitint=undef, use64bitall=undef, uselongdouble=undef >> usemymalloc=n, bincompat5005=undef >> Compiler: >> cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN >> -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE >> -D_FILE_OFFSET_BITS=64', >> optimize='-O2 -g', >> cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing >> -pipe -I/usr/local/include' >> ccversion='', gccversion='4.3.2', gccosandvers='' >> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 >> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 >> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', >> lseeksize=8 >> alignbytes=4, prototype=define >> Linker and Libraries: >> ld='cc', ldflags =' -L/usr/local/lib' >> libpth=/usr/local/lib /lib /usr/lib /usr/lib64 >> libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt >> perllibs=-ldl -lm -lpthread -lc -lcrypt >> libc=/lib/libc-2.7.so, so=so, useshrplib=true, libperl=libperl.so.5.10.0 >> gnulibc_version='2.7' >> Dynamic Linking: >> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' >> cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib' >> >> Characteristics of this binary (from libperl): >> Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV >> PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS >> USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API >> Built under linux >> Compiled at Nov 1 2008 21:31:06 >> @INC: >> /etc/perl >> /usr/local/lib/perl/5.10.0 >> /usr/local/share/perl/5.10.0 >> /usr/lib/perl5 >> /usr/share/perl5 >> /usr/lib/perl/5.10 >> /usr/share/perl/5.10 >> /usr/local/lib/site_perl >> . >> >> My apache2 configuration file is: >> >> <Perl> >> use lib '/usr/local/apps/ttk/lib'; >> </Perl> >> PerlModule tirt >> >> <Location /> >> SetHandler modperl >> PerlResponseHandler tirt >> </Location> >> >> Please help me to find a solution. Please ask if you need more information. >> > > Enabled apache2 modules (ls -1 /etc/apache2/mods-enabled): > > actions.conf > actions.load > alias.conf > alias.load > auth_basic.load > authn_file.load > auth_pam.load > authz_default.load > authz_groupfile.load > authz_host.load > authz_user.load > autoindex.conf > autoindex.load > cache.load > cgi.load > dir.conf > dir.load > env.load > fastcgi.conf > fastcgi.load > mime.conf > mime.load > negotiation.conf > negotiation.load > perl.load > php5.conf > php5.load > proxy.conf > proxy_connect.load > proxy_http.load > proxy.load > rewrite.load > ssl.conf > ssl.load > status.conf > status.load > -- Thanks and Regards, Terence Monteiro. DeepRoot Linux, http://www.deeproot.in Ph: +91 (80) 4089 0000 Getting GNU/Linux to work for you. Faster. Better. Today. Every way