[mod_python] Segfault on Apache Startup

list-modpython at ccraig.org list-modpython at ccraig.org
Tue Jul 11 22:23:10 EST 2000


#LoadModule mmap_static_module modules/mod_mmap_static.so
LoadModule python_module modules/mod_python.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule env_module         modules/mod_env.so
LoadModule config_log_module  modules/mod_log_config.so
LoadModule agent_log_module   modules/mod_log_agent.so
LoadModule referer_log_module modules/mod_log_referer.so
#LoadModule mime_magic_module  modules/mod_mime_magic.so
LoadModule mime_module        modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule status_module      modules/mod_status.so
LoadModule info_module        modules/mod_info.so
LoadModule includes_module    modules/mod_include.so
LoadModule autoindex_module   modules/mod_autoindex.so
LoadModule dir_module         modules/mod_dir.so
LoadModule cgi_module         modules/mod_cgi.so
LoadModule asis_module        modules/mod_asis.so
LoadModule imap_module        modules/mod_imap.so
LoadModule action_module      modules/mod_actions.so
#LoadModule speling_module     modules/mod_speling.so
LoadModule userdir_module     modules/mod_userdir.so
LoadModule alias_module       modules/mod_alias.so
LoadModule rewrite_module     modules/mod_rewrite.so
LoadModule access_module      modules/mod_access.so
LoadModule auth_module        modules/mod_auth.so
LoadModule anon_auth_module   modules/mod_auth_anon.so
LoadModule db_auth_module     modules/mod_auth_db.so
LoadModule digest_module      modules/mod_digest.so
LoadModule proxy_module       modules/libproxy.so
#LoadModule cern_meta_module   modules/mod_cern_meta.so
LoadModule expires_module     modules/mod_expires.so
LoadModule headers_module     modules/mod_headers.so
LoadModule usertrack_module   modules/mod_usertrack.so
#LoadModule example_module     modules/mod_example.so
#LoadModule unique_id_module   modules/mod_unique_id.so
LoadModule setenvif_module    modules/mod_setenvif.so
#LoadModule bandwidth_module   modules/mod_bandwidth.so
#LoadModule put_module		modules/mod_put.so

# Extra Modules
#LoadModule perl_module        modules/libperl.so
#LoadModule php_module         modules/mod_php.so
#LoadModule php3_module        modules/libphp3.so


#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_python.c
#AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_db.c
AddModule mod_digest.c
AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_usertrack.c
#AddModule mod_example.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
#AddModule mod_bandwidth.c
#AddModule mod_put.c

# Extra Modules
#AddModule mod_perl.c
#AddModule mod_php.c
#AddModule mod_php3.c
-------------- next part --------------
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(no debugging symbols found)...
Core was generated by `httpd -X'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libdb.so.3...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /etc/httpd/modules/mod_python.so...done.
Reading symbols from /lib/libpthread.so.0...done.
Reading symbols from /etc/httpd/modules/mod_vhost_alias.so...done.
Reading symbols from /etc/httpd/modules/mod_env.so...done.
Reading symbols from /etc/httpd/modules/mod_log_config.so...done.
Reading symbols from /etc/httpd/modules/mod_log_agent.so...done.
Reading symbols from /etc/httpd/modules/mod_log_referer.so...done.
Reading symbols from /etc/httpd/modules/mod_mime.so...done.
Reading symbols from /etc/httpd/modules/mod_negotiation.so...done.
Reading symbols from /etc/httpd/modules/mod_status.so...done.
Reading symbols from /etc/httpd/modules/mod_info.so...done.
Reading symbols from /etc/httpd/modules/mod_include.so...done.
Reading symbols from /etc/httpd/modules/mod_autoindex.so...done.
Reading symbols from /etc/httpd/modules/mod_dir.so...done.
Reading symbols from /etc/httpd/modules/mod_cgi.so...done.
Reading symbols from /etc/httpd/modules/mod_asis.so...done.
Reading symbols from /etc/httpd/modules/mod_imap.so...done.
Reading symbols from /etc/httpd/modules/mod_actions.so...done.
Reading symbols from /etc/httpd/modules/mod_userdir.so...done.
Reading symbols from /etc/httpd/modules/mod_alias.so...done.
Reading symbols from /etc/httpd/modules/mod_rewrite.so...done.
Reading symbols from /etc/httpd/modules/mod_access.so...done.
Reading symbols from /etc/httpd/modules/mod_auth.so...done.
Reading symbols from /etc/httpd/modules/mod_auth_anon.so...done.
Reading symbols from /etc/httpd/modules/mod_auth_db.so...done.
Reading symbols from /etc/httpd/modules/mod_digest.so...done.
Reading symbols from /etc/httpd/modules/libproxy.so...done.
Reading symbols from /etc/httpd/modules/mod_expires.so...done.
Reading symbols from /etc/httpd/modules/mod_headers.so...done.
Reading symbols from /etc/httpd/modules/mod_usertrack.so...done.
Reading symbols from /etc/httpd/modules/mod_setenvif.so...done.
#0  0x4021a047 in ?? () from /lib/libpthread.so.0
(gdb) bt
#0  0x4021a047 in ?? () from /lib/libpthread.so.0
#1  0x401352eb in __getpwnam_r (name=0x80a9dc4 "nobody", resbuf=0x40196240, 
    buffer=0x80a6f08 "nobody", buflen=1024, result=0xbfffd5fc)
    at ../nss/getXXbyYY_r.c:182
#2  0x40134ba0 in getpwnam () at ../nss/getXXbyYY.c:156
#3  0x8064c26 in ap_uname2id ()
#4  0x8057043 in ap_exists_config_define ()
#5  0x8053e8c in ap_clear_module_list ()
#6  0x80540cc in ap_handle_command ()
#7  0x8054118 in ap_srm_command_loop ()
#8  0x8054487 in ap_process_resource_config ()
#9  0x8054b04 in ap_read_config ()
#10 0x805bf97 in ap_child_terminate ()
#11 0x805c65f in main ()
#12 0x400bc9cb in __libc_start_main () at ../sysdeps/generic/libc-start.c:122
(gdb) 
-------------- next part --------------

I'm using mod_python version 2.4.1 on a RedHat 6.2 machine,
kernel 2.2.16 and Apache 1.3.12

The module was compiled with the following command:

apxs -c -I/usr/include/python1.5 -L/usr/lib/python1.5/config \
-lpython1.5 -lpthread -lieee -lm -ldl mod_python.c


I'm including a complete list of module loads and a backtrace of the
core dump.  This segfault does not occur if the LoadModule for
mod_python are commented out, but does if only the AddModule is.

I hope this was somewhat helpful,

-- 
Christopher A. Craig <ccraig at ccraig.org>
When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*". - Linus
http://www.ccraig.org


More information about the Mod_python mailing list