I have the following very basic WSGI application:
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
That I am loading with this httpd conf file:
<VirtualHost *:80>
ServerAdmin me at me.com
DocumentRoot "/var/www/htdocs/"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerAdmin me at me.com
ServerName tools.localhost
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess webruminant processes=2 threads=15
WSGIScriptAlias /webruminant /opt/webruminant/test.wsgi
ErrorLog /var/log/httpd/pylons-pyramid.error.log
CustomLog /var/log/httpd/pylons-pyramid.custom.log combined
<Directory /opt/webruminant>
WSGIProcessGroup webruminant
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
However in the httpd log I get that the child existed with segmentation
fault.
[Fri Jan 23 10:12:36.163030 2015] [core:notice] [pid 8611:tid
139740997855104] AH00052: child pid 8613 exit signal Segmentation fault (11)
I been looking at the problem and I cannot find it. I don't have
mod_python. I have only one version of Python.
Here is my version of Apache:
Server version: Apache/2.4.10 (Unix)
Server built: Jul 23 2014 19:20:13
Server's Module Magic Number: 20120211:36
Server loaded: APR 1.5.0, APR-UTIL 1.5.3
Compiled using: APR 1.5.0, APR-UTIL 1.5.3
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr"
-D SUEXEC_BIN="/usr/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/httpd/mime.types"
-D SERVER_CONFIG_FILE="/etc/httpd/httpd.conf"
ldd /usr/lib64/httpd/modules/mod_wsgi.so returns the following:
linux-vdso.so.1 (0x00007fff3699d000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (
0x00007f2041e09000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2041bec000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f20419e7000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f20417e4000)
libm.so.6 => /lib64/libm.so.6 (0x00007f20414e2000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2041117000)
/lib64/ld-linux-x86-64.so.2 (0x00007f204246d000)
The list of loaded modules are:
core_module (static)
so_module (static)
http_module (static)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
reqtimeout_module (shared)
filter_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
headers_module (shared)
setenvif_module (shared)
version_module (shared)
proxy_module (shared)
proxy_connect_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_fcgi_module (shared)
proxy_scgi_module (shared)
proxy_wstunnel_module (shared)
proxy_ajp_module (shared)
proxy_express_module (shared)
lbmethod_byrequests_module (shared)
lbmethod_bytraffic_module (shared)
lbmethod_bybusyness_module (shared)
mpm_event_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
dir_module (shared)
alias_module (shared)
php5_module (shared)
wsgi_module (shared)
I tried to debug the problem with GDB but I cannot find the problem. If I
remove the WSGIDaemonProcess and just use WSGIScriptAlias the application
works ok.
Any idea what would be wrong and what could I check?
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.