English 中文(简体)
bian/肥胖症下的 mo血分裂
原标题:mod-wsgi segmentation fault under debian/apache2

I m试图在Appa2下进行 mo血管手术,用Django使用。

现在我刚刚获得基本的生活,正在陷入分裂的错误。 我 st不.,对如何追踪错误的任何建议都会受到赞赏。

这属于Debian/Lenny,阿帕奇、 mo和草原。 I veecked and mod-wsgi is associated with /usr/libpython2.5.so.1.0. 我最初安装了Python 2.4,但只是在拿走错误版本的时候,才将其删除。

文字档案是:

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]

我的想法是:

WSGIScriptAlias /myapp /var/www/test/myapp.wsgi

<Directory /var/www/test/myapp.wsgi>
Order allow,deny
Allow from all
</Directory>

当我试图看到ur时,我就看到了这种.误。

[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)

灰色看来是其他的细微工作,我先在固定服务器下操作了我的jan,没有问题。

就我而言,我开始试图接手我的jan扬戈。

[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

似乎让我尝试基本的东西。

Thanks for any suggestions.

加入:

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 ?? ()
问题回答

Read through mod_wsgi documentation looking for where it discusses crashes. Start with:

http://code.google.com/p/modwsgi/wiki/FrequentlyAskedQuestions http://code.google.com/p/modwsgi/wiki/InstallationIssues

就像与Mod_python发生冲突,或者由于在操作时间发现错误的Adhury安装。

其后,对安装进行下列检查:


附录1

评论中提到的 generation痕的产生记录如下:

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques” rel=“nofollow”http://code.google.com/p/modwsgi/wiki/DebuggingTechniques





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签