J'essaie de faire fonctionner le mod-wsgi sous Apache2 en vue de l'utiliser avec Django.défaut de segmentation de mod-wsgi sous debian/apache2
À l'heure actuelle, je ne fais qu'exécuter une application de base et j'obtiens une erreur de segmentation. Toute suggestion sur la façon de localiser l'erreur serait appréciée, je suis coincé.
Ceci est sous Debian/Lenny, versions d'Apache, mod-wsgi, et python 2.5. J'ai vérifié et mod-wsgi est lié à /usr/lib/libpython2.5.so.1.0. J'ai initialement installé python 2.4, mais je l'ai supprimé juste au cas où il prendrait la mauvaise version.
Le fichier script est:
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]
Ma config est:
WSGIScriptAlias /myapp /var/www/test/myapp.wsgi
<Directory /var/www/test/myapp.wsgi>
Order allow,deny
Allow from all
</Directory>
Et quand j'essaie de voir l'URL que je vois cela dans le journal des erreurs apache.
[Fri Nov 19 09:29:58 2010] [info] mod_wsgi (pid=7190): Create interpreter 'morpheus.gateway.2wire.net|/myapp'.
[Fri Nov 19 09:29:58 2010] [info] mod_wsgi (pid=7331): Attach interpreter ''.
[Fri Nov 19 09:29:58 2010] [notice] child pid 7190 exit signal Segmentation fault (11)
Python semble fonctionner correctement sinon, j'ai couru mon application django sous le serveur intégré sans problème.
Juste Pour votre information, j'ai commencé à essayer d'obtenir mon application django course, mais a couru dans cette erreur:
[Fri Nov 19 08:25:08 2010] [info] mod_wsgi (pid=6861): Create interpreter 'morpheus.gateway.2wire.net|/curtana'.
[Fri Nov 19 08:25:08 2010] [error] [client 192.168.2.70] mod_wsgi (pid=6861): Exception occurred processing WSGI script '/var/data/curtana/curtana.wsgi'.
[Fri Nov 19 08:25:08 2010] [error] [client 192.168.2.70] File "/var/data/curtana/curtana.wsgi", line 1
[Fri Nov 19 08:25:08 2010] [error] [client 192.168.2.70] import sys
[Fri Nov 19 08:25:08 2010] [error] [client 192.168.2.70] ^
[Fri Nov 19 08:25:08 2010] [error] [client 192.168.2.70] SyntaxError: invalid syntax
Ce qui semble me laisser essayer l'application de base.
Merci pour vos suggestions.
Edit pour ajouter, voici un backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb751a700 (LWP 8092)]
0xb6b3a920 in PyParser_AddToken (ps=0x8543f90, type=8, str=0x845a480 ")",
lineno=1, col_offset=39, expected_ret=0xbfffe378) at ../Parser/parser.c:274
274 ../Parser/parser.c: No such file or directory.
in ../Parser/parser.c
(gdb) backtrace
#0 0xb6b3a920 in PyParser_AddToken (ps=0x8543f90, type=8, str=0x845a480 ")",
lineno=1, col_offset=39, expected_ret=0xbfffe378) at ../Parser/parser.c:274
#1 0xb6b3ab86 in parsetok (tok=0x8535460, g=<value optimized out>, start=257,
err_ret=0xbfffe360, flags=<value optimized out>)
at ../Parser/parsetok.c:194
#2 0xb6bec5eb in PyParser_SimpleParseFileFlags (fp=0x84f3288,
filename=0x85301b0 "/var/www/test/myapp.wsgi", start=257, flags=0)
at ../Python/pythonrun.c:1404
#3 0xb6c76877 in ??() from /usr/lib/apache2/modules/mod_wsgi.so
#4 0x084f3288 in ??()
#5 0x085301b0 in ??()
#6 0x00000101 in ??()
#7 0x00000000 in ??()
Merci Graham, vos pages ont aidé à éliminer certaines causes. J'avais déjà supprimé la seule autre instance de python et mod_python, mais votre texte sur l'utilisation de gdb m'aide à obtenir la trace. Après avoir obtenu où j'ai fait un python grêle et réinstallé en utilisant 'apt-get --reinstall' et maintenant ça marche. Quelque chose a dû corrompre mon installation. – Eddie