Fapws Segmentation fault error

42 views
Skip to first unread message

alexvassel

unread,
Feb 6, 2012, 1:12:13 AM2/6/12
to Fast Asynchronous Python Web Server
I'm trying to use fapws as a long-time working decision. But after
couple of hours running I always get an error 'Segmentation Fault'.
I'm using the news version (just updated). OS: debian squeezy x64 with
all updates. Attaching gdb back trace. Thanks for your help.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff66522a3 in write_cb (loop=0x7ffff664a6a0, w=0xd27208,
revents=2) at fapws/mainloop.c:509
509 fapws/mainloop.c: No such file or directory.
in fapws/mainloop.c
(gdb) bt
#0 0x00007ffff66522a3 in write_cb (loop=0x7ffff664a6a0, w=0xd27208,
revents=2) at fapws/mainloop.c:509
#1 0x00007ffff64414d1 in ev_invoke_pending () from /usr/lib/libev.so.
3
#2 0x00007ffff644608d in ev_loop () from /usr/lib/libev.so.3
#3 0x00007ffff66531bd in py_run_loop (self=<value optimized out>,
args=<value optimized out>) at fapws/_evwsgi.c:183
#4 0x00000000004a7ba5 in PyEval_EvalFrameEx ()
#5 0x00000000004a84a0 in PyEval_EvalFrameEx ()
#6 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#7 0x00000000004a9692 in PyEval_EvalCode ()
#8 0x00000000004c98be in PyRun_FileExFlags ()
#9 0x00000000004c9ad4 in PyRun_SimpleFileExFlags ()
#10 0x000000000041a6bd in Py_Main ()
#11 0x00007ffff69e9c8d in __libc_start_main () from /lib/libc.so.6
#12 0x00000000004198d9 in _start ()

william opensource4you

unread,
Feb 6, 2012, 1:30:59 AM2/6/12
to fa...@googlegroups.com

If you are use the current version, line 509 of mainloop.c correspond to a pylist and pytuple check.

Which version of python are you using?
Can you verify your python code?
1st guess you return an empty object.

Thanks

alexvassel

unread,
Feb 6, 2012, 1:40:17 AM2/6/12
to Fast Asynchronous Python Web Server
I'm using trunk version (January 29).

On Feb 6, 10:30 am, william opensource4you <william.o...@gmail.com>
wrote:
> If you are use the current version, line 509 of mainloop.c correspond to a
> pylist and pytuple check.
>
> Which version of python are you using?
> Can you verify your python code?
> 1st guess you return an empty object.
>
> Thanks

alexvassel

unread,
Feb 6, 2012, 1:49:16 AM2/6/12
to Fast Asynchronous Python Web Server
There is one place where a function returns list with empty string
(['']), but but the case user gets this line is very often. Anyway,
I've changed my code and now it doesn't return this empty string.

P.S. Python 2.6.6

On Feb 6, 10:30 am, william opensource4you <william.o...@gmail.com>
wrote:
> If you are use the current version, line 509 of mainloop.c correspond to a
> pylist and pytuple check.
>
> Which version of python are you using?
> Can you verify your python code?
> 1st guess you return an empty object.
>
> Thanks

alexvassel

unread,
Feb 8, 2012, 4:17:14 AM2/8/12
to Fast Asynchronous Python Web Server
Guys, it just happens anyway. I can't figure out the problem. I have
just two functions, each of them in all cases returns a list
containing the string. After the changing of the code (see above),
this error appears less but still. Thanks again for reply.

william opensource4you

unread,
Feb 8, 2012, 1:53:05 PM2/8/12
to fa...@googlegroups.com
I cannot reproduce the problem :-(.

I propose you 2 actions:

1)
Can you run the unit tests ?
in tests/unittest, you run server.py then execute test.py and see if
it pass the tests.

2)
If you can send me your application william.os4y at gmail.com
I can try to reproduce it

W.

alexvassel

unread,
Feb 9, 2012, 2:28:38 AM2/9/12
to Fast Asynchronous Python Web Server
1. Tests work fine
2. Let's do this way: I try to catch this error again (server works
24/7) and send you the back trace. I think that the error could be not
the same as I described in my first post. For the last day the server
works with no failures.

On Feb 8, 10:53 pm, william opensource4you <william.o...@gmail.com>
wrote:

william opensource4you

unread,
Feb 9, 2012, 7:00:05 AM2/9/12
to fa...@googlegroups.com
If tests are working, Means that compilation, linking, ... are OK.
You could also check the backend used (cfr LIBEV_FLAGS). I've never
had issues with this on linux, (epoll) but this could be a root cause

On my side, I have several Fapws instances running since +100 days
without interruption.

Fapws.org is a good example :-)
http://www.fapws.org/uptime


Since several days/weeks, this is my main task: find bugs in Fapws.
(cfr python3 branch)
I'm curious ... maybe you have found a new bug :-)

W.

alexvassel

unread,
Feb 9, 2012, 7:50:58 AM2/9/12
to Fast Asynchronous Python Web Server
Okay. I understand ) Thanks for your advices. Your product is really
fast and easy to use. If an error will appear (I hope it will), I will
post a report in this thread.

On Feb 9, 4:00 pm, william opensource4you <william.o...@gmail.com>
wrote:
> If tests are working, Means that compilation, linking,  ... are OK.
> You could also check the backend used (cfr LIBEV_FLAGS). I've never
> had issues with this on linux, (epoll) but this could be a root cause
>
> On my side, I have several Fapws instances running since +100 days
> without interruption.
>
> Fapws.org is a good example :-)http://www.fapws.org/uptime

alexvassel

unread,
Feb 10, 2012, 8:37:31 AM2/10/12
to Fast Asynchronous Python Web Server
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff59382a3 in write_cb (loop=0x7ffff59306a0, w=0xc92b78,
revents=2) at fapws/mainloop.c:509
509 fapws/mainloop.c: No such file or directory.
in fapws/mainloop.c
(gdb) bt
#0 0x00007ffff59382a3 in write_cb (loop=0x7ffff59306a0, w=0xc92b78,
revents=2) at fapws/mainloop.c:509
#1 0x00007ffff57274d1 in ev_invoke_pending () from /usr/lib/libev.so.
3
#2 0x00007ffff572c08d in ev_loop () from /usr/lib/libev.so.3
#3 0x00007ffff59391bd in py_run_loop (self=<value optimized out>,
args=<value optimized out>) at fapws/_evwsgi.c:183
#4 0x00000000004a7ba5 in PyEval_EvalFrameEx ()
#5 0x00000000004a84a0 in PyEval_EvalFrameEx ()
#6 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#7 0x00000000004a9692 in PyEval_EvalCode ()
#8 0x00000000004c98be in PyRun_FileExFlags ()
#9 0x00000000004c9ad4 in PyRun_SimpleFileExFlags ()
#10 0x000000000041a6bd in Py_Main ()
#11 0x00007ffff69e9c8d in __libc_start_main () from /lib/libc.so.6
#12 0x00000000004198d9 in _start ()


alexvassel

unread,
Feb 10, 2012, 8:49:13 AM2/10/12
to Fast Asynchronous Python Web Server
First attempt to explain. I've found that right before the crash
server got very long GET request (about 4kB).

william opensource4you

unread,
Feb 10, 2012, 11:53:20 AM2/10/12
to fa...@googlegroups.com

Can you reproduce the bug with the long GET?

william opensource4you

unread,
Feb 10, 2012, 4:46:33 PM2/10/12
to fa...@googlegroups.com
I've made test with very long GET command .... system resit :-) (cfr
last commit)
I've tried GET with non ascii character (non ascii code in Firefox).
no issues.

Can't reproduce the issue :-(

Did you got more details to allow me to reproduce the problem ?

william opensource4you

unread,
Feb 10, 2012, 4:56:35 PM2/10/12
to fa...@googlegroups.com
Which version of Libev are you using ?
Did you try with an another backend (LIBEV_FLAGS) ?

Which was the exact URL before the crash ?
What is the normal content that your script return to Fapws ?
Do you use some special headers ? which one ?

W.


On Fri, Feb 10, 2012 at 10:46 PM, william opensource4you

alexvassel

unread,
Feb 11, 2012, 4:44:23 AM2/11/12
to Fast Asynchronous Python Web Server
I will try to present full info by Monday. Unfortunately now I cant'
answer all your questions. Hope you understand )

The GET query; got right form the mongodb:

"title=%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B
%D0%B5%3A%20%D0%9A%D0%B8%D1%81%D0%BB%D0%BE%D1%80%D0%BE%D0%B4%20%D0%BF
%D1%80%D0%B8%20%D0%BD%D0%B5%D0%B8%D0%B7%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE
%D0%BC%20%D0%B4%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD
%D0%B8%D0%B8%20%D1%80%3D80%20%D0%BA%D0%9F%D0%B0%20%D0%BD
%D0%B0%D0%B3%D1%80%D0%B5%D0%B2%D0%B0%D0%B5%D1%82%D1%81%D1%8F.
%20%D0%95%D0%B3%D0%BE%20%D0%BE%D0%B1%D1%8A%D0%B5%D0%BC
%20%D1%83%D0%B2%D0%B5%D0%BB
%D0%B8%D1%87%D0%B8%D0%B2%D0%B0%D0%B5%D1%82%D1%81%D1%8F%20%D0%BE
%D1%82%20V1%3D1%20%D0%BC3%20%D0%B4%D0%BE%20V2%3D3%20%D0%BC3.%20%D0%9E
%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D1%8C
%20%D0%B8%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5%20%CE%94%20U
%20%D0%B2%D0%BD%D1%83%D1%82%D1%80%D0%B5%D0%BD%D0%BD
%D0%B5%D0%B9%20%D1%8D%D0%BD%D0%B5%D1%80%D0%B3%D0%B8%D0%B8%20%D0%BA
%D0%B8%D1%81&location=http%3A%2F%2Fwww.prorektor.ru%2Fplanv.php%3Fid
%3DV16845&referrer=http%3A%2F%2Fwww.google.ru%2Furl%3Fsa%3Dt%26rct%3Dj
%26q%3D%25D0%25BA%25D0%25B8%25D1%2581%25D0%25BB%25D0%25BE
%25D1%2580%25D0%25BE%25D0%25B4%2520%25D0%25BF
%25D1%2580%25D0%25B8%2520%25D0%25BD
%25D0%25B5%25D0%25B8%25D0%25B7%25D0%25BC%25D0%25B5%25D0%25BD%25D0%25BD
%25D0%25BE%25D0%25BC%2520%25D0%25B4%25D0%25B0%25D0%25B2%25D0%25BB
%25D0%25B5%25D0%25BD
%25D0%25B8%25D0%25B8%2520%25D1%2580%253D80%2520%25D0%25BA%25D0%25BF
%25D0%25B0%2520%25D0%25BD
%25D0%25B0%25D0%25B3%25D1%2580%25D0%25B5%25D0%25B2%25D0%25B0%25D0%25B5%25D1%2582%25D1%2581%25D1%258F.
%2520%25D0%25B5%25D0%25B3%25D0%25BE%2520%25D0%25BE%25D0%25B1%25D1%258A
%25D0%25B5%25D0%25BC%2520%25D1%2583%25D0%25B2%25D0%25B5%25D0%25BB
%25D0%25B8%25D1%2587%25D0%25B8%25D0%25B2%25D0%25B0%25D0%25B5%25D1%2582%25D1%2581%25D1%258F
%2520%25D0%25BE
%25D1%2582%2520v1%253D1%2520%25D0%25BC3%2520%25D0%25B4%25D0%25BE
%2520v2%253D%25203%2520%25D0%25BC3.%2520%25D0%25BE%25D0%25BF
%25D1%2580%25D0%25B5%25D0%25B4%25D0%25B5%25D0%25BB
%25D0%25B8%25D1%2582%25D1%258C%2520%25D0%25B8%25D0%25B7%25D0%25BC
%25D0%25B5%25D0%25BD%25D0%25B5%25D0%25BD%25D0%25B8%25D0%25B5%2520%25EF
%2581%2584u%2520%25D0%25B2%25D0%25BD
%25D1%2583%25D1%2582%25D1%2580%25D0%25B5%25D0%25BD%25D0%25BD
%25D0%25B5%25D0%25B9%2520%25D1%258D%25D0%25BD
%25D0%25B5%25D1%2580%25D0%25B3%25D0%25B8%25D0%25B8%2520%25D0%25BA
%25D0%25B8%25D1%2581%25D0%25BB%25D0%25BE%25D1%2580%25D0%25BE
%25D0%25B4%25D0%25B0%252C%2520%25D1%2580%25D0%25B0%25D0%25B1%25D0%25BE
%25D1%2582%25D1%2583%2520%25D0%25B0%252C%2520%25D1%2581%25D0%25BE
%25D0%25B2%25D0%25B5%25D1%2580%25D1%2588%25D0%25B5%25D0%25BD%25D0%25BD
%25D1%2583%25D1%258E%2520%25D0%25B8%25D0%25BC%2520%25D0%25BF
%25D1%2580%25D0%25B8%2520%25D1%2580%25D0%25B0%25D1%2581%25D1%2588%25D0%25B8%25D1%2580%25D0%25B5%25D0%25BD
%25D0%25B8%25D0%25B8%252C
%2520%25D0%25B0%2520%25D1%2582%25D0%25B0%25D0%25BA
%25D0%25B6%25D0%25B5%2520%25D1%2582%25D0%25B5%25D0%25BF%25D0%25BB
%25D0%25BE%25D1%2582%25D1%2583%2520q%2520%25D1%2581%25D0%25BE%25D0%25BE
%25D0%25B1%25D1%2589%25D0%25B5%25D0%25BD%25D0%25BD%25D1%2583%25D1%258E
%2520%25D0%25B3%25D0%25B0%25D0%25B7%25D1%2583%26source%3Dweb%26cd
%3D5%26ved%3D0CD8QFjAE%26url%3Dhttp%253A%252F%252Fwww.prorektor.ru
%252Fplanv.php%253Fid%253DV16845%26ei%3D-Bk1T4jIOajj4QTluNz5AQ%26usg
%3DAFQjCNHF3BEUXyi8jYR1dCcBYhiZJQMWwQ%26cad
%3Drjt&clid=556ba17f-111e-412f-b548-6f75ef007a68"

On Feb 11, 1:56 am, william opensource4you <william.o...@gmail.com>
wrote:
> Which version of Libev are you using ?
> Did you try with an another backend (LIBEV_FLAGS) ?
>
> Which was the exact URL before the crash ?
> What is the normal content that your script return to Fapws ?
> Do you use some special headers ? which one ?
>
> W.
>
> On Fri, Feb 10, 2012 at 10:46 PM, william opensource4you
>
>
>
>
>
>
>
> <william.o...@gmail.com> wrote:
> > I've made test with very long GET command .... system resit :-) (cfr
> > last commit)
> > I've tried GET with non ascii character (non ascii code in Firefox).
> > no issues.
>
> > Can't reproduce the issue :-(
>
> > Did you got more details to allow me to reproduce the problem ?
>
> > On Fri, Feb 10, 2012 at 5:53 PM, william opensource4you
> > <william.o...@gmail.com> wrote:
> >> Can you reproduce the bug with the long GET?
>

alexvassel

unread,
Feb 13, 2012, 1:23:37 AM2/13/12
to Fast Asynchronous Python Web Server
1. Suspicious headers are:
start_response('200 OK', [('Content-type', 'image/gif'), ('P3P: CP',
'IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT')])
start_response('200 OK', [('Content-type', 'image/gif'), ('Expires',
'Mon, 26 Jul 1997 05:00:00 GMT'), ('Pragma', 'no-cache'), ('Cache-
Control', 'no-cache, must-revalidate'),
('P3P: CP', 'IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR
IND CNT')])

2. My script returns ['<h1>Not Found</h1>'] or ['Ok'] or ["%c%c%c%c%c%c
%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c
%c%c" %
(71, 73, 70, 56, 57, 97, 1, 0, 1, 0, 128, 255, 0, 192,
192, 192, 0, 0, 0, 33, 249, 4, 1, 0,
0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0,
59)
]

3. I didn't try with an another backend yet.
4. Libev:
Architecture: amd64
Source: libev-dev
Version: 1:3.9-1

Architecture: amd64
Source: libevent-1.4-2
Version: 1.4.13-stable-1
> ...
>
> read more »

william opensource4you

unread,
Feb 13, 2012, 3:05:06 AM2/13/12
to fa...@googlegroups.com
Thanks.

I'm not able to reproduce it. :-(
Maybe you could you send me the whole dump file ?

I'm running Archlinux 64 with python-2.7.2, libev-4.04 all tests done with epoll

To debug it, I need to be able to reproduce it ...
Thus, I've build the following script:
import fapws._evwsgi as evwsgi
from fapws import base

def start():
evwsgi.start("0.0.0.0", "8080")
evwsgi.set_base_module(base)

def hello(environ, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return ["hello world!!"]

def test1(environ, start_response):


start_response('200 OK', [('Content-type', 'image/gif'),
('P3P: CP','IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR
IND CNT
')])

return ['<h1>Not Found</h1>']
def test2(environ, start_response):


start_response('200 OK', [('Content-type', 'image/gif'),
('Expires','Mon, 26 Jul 1997 05:00:00 GMT'), ('Pragma', 'no-cache'),
('Cache

-Control', 'no-cache, must-revalidate'),('P3P: CP', 'IDC DSP COR ADM


DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT')])

return ['Ok']
def test3(environ, start_response):


start_response('200 OK', [('Content-type', 'image/gif'),
('Expires','Mon, 26 Jul 1997 05:00:00 GMT'), ('Pragma', 'no-cache'),
('Cache

-Control', 'no-cache, must-revalidate'),('P3P: CP', 'IDC DSP COR ADM


DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT')])

return ["%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"


% (71, 73, 70, 56, 57, 97, 1, 0, 1,
0, 128, 255, 0, 192, 192, 192, 0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44,
0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 68, 1, 0, 59) ]


evwsgi.wsgi_cb(("/hello", hello))
evwsgi.wsgi_cb(("/test1", test1))
evwsgi.wsgi_cb(("/test2", test2))
evwsgi.wsgi_cb(("/test3", test3))

evwsgi.set_debug(0)
evwsgi.run()

if __name__=="__main__":
start()


I've tested it with curl.
test1
-------
curl -D stdout1 http://127.0.0.1:8080/test1 > res1

wi@myarchhost:~/tmp/fapws_vassel$ more res1
<h1>Not Found</h1>
wi@myarchhost:~/tmp/fapws_vassel$ more stdout1
HTTP/1.0 200 OK
Date: Mon, 13 Feb 2012 07:47:14 GMT
P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
Content-type: image/gif
Server: fapws3/0.10

test2
-------
curl -D stdout2 http://127.0.0.1:8080/test2 > res2

wi@myarchhost:~/tmp/fapws_vassel$ more res2
Ok
wi@myarchhost:~/tmp/fapws_vassel$ more stdout2
HTTP/1.0 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Server: fapws3/0.10
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Date: Mon, 13 Feb 2012 07:47:45 GMT
P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
Content-type: image/gif

test3
-------
curl -D stdout3 http://127.0.0.1:8080/test3 > res3

wi@myarchhost:~/tmp/fapws_vassel$ more res3
GIF89a
wi@myarchhost:~/tmp/fapws_vassel$ more stdout3
HTTP/1.0 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Server: fapws3/0.10
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Date: Mon, 13 Feb 2012 07:47:54 GMT
P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
Content-type: image/gif

I've done HEAD tests (sometimes proxies are doing it):


wi@myarchhost:~/tmp/fapws_vassel$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
HEAD /test1 HTTP/1.1

HTTP/1.0 200 OK
Date: Mon, 13 Feb 2012 07:58:45 GMT
P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
Content-type: image/gif
Server: fapws3/0.10

Connection closed by foreign host.
wi@myarchhost:~/tmp/fapws_vassel$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
HEAD /test2 HTTP/1.1

HTTP/1.0 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Server: fapws3/0.10
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Date: Mon, 13 Feb 2012 07:59:07 GMT
P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
Content-type: image/gif

Connection closed by foreign host.
wi@myarchhost:~/tmp/fapws_vassel$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
HEAD /test3 HTTP/1.1

HTTP/1.0 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Server: fapws3/0.10
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Date: Mon, 13 Feb 2012 07:59:19 GMT
P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
Content-type: image/gif

Connection closed by foreign host.
wi@myarchhost:~/tmp/fapws_vassel$

alexvassel

unread,
Feb 13, 2012, 6:02:09 AM2/13/12
to Fast Asynchronous Python Web Server
I've found it!!!) My server sets a cookie where I store long string
(about 4 kB). So, when fapws returns a response (file base.py, string
117), turns out that the response is a huge string and SegFault
appears.

The response which causes an error (i've just created it manually).
File base.py, line 117, variable 'res' contains:

'HTTP/1.0 200 OK\r\nDate: Mon, 13 Feb 2012 10:56:27 GMT\r\nP3P: CP:
IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\r
\nContent-type: image/gif\r\nServer: fapws3/0.10\r\nSet-Cookie:
lh_source_client_556ba17f-111e-412f-
b548-6f75ef007a68=687474703A2F2F7777772E676F6F676C652E72752F75726C3F73613D74267263743D6A26713D2544302542342544302542382544302542462544302542422544302542452544302542432544302542442544302542302544312538462532302544312538302544302542302544302542312544302542452544312538322544302542302532302544302542442544302542302532302544312538322544302542352544302542432544312538332532302544302542312544302542382544302542372544302542442544302542352544312538312D254430254246254430254242254430254230254430254244254430254238254431253830254430254245254430254232254430254230254430254244254430254238254430254235253230254430254232253230254431253844254430254241254430254245254430254244254430254245254430254243254430254238254431253837254430254235254431253831254430254241254430254245254430254239253230254430254234254430254235254431253846254431253832254430254235254430254242254431253843254430254244254430254245254431253831254431253832254430254238253230254430254246254431253830254430254235254430254234254430254246254431253830254430254238254431253846254431253832254430254238254431253846253230282544302542452544312538302544302542332544302542302544302542442544302542382544302542372544302542302544312538362544302542382544302542382532432532302544312538342544302542382544312538302544302542432544312538422925334125323025443125383625443025423525443025424225443125384325324325323025443125383125443025424525443025423425443025423525443125383025443025423625443025423025443025424425443025423825443025423525323025443025423825323025443125384425443125383225443025423025443025424625443125384225323025443125383025443025423025443025423725443125383025443025423025443025423125443025424525443125383225443025424125443025423826736F757263653D7765622663643D31267665643D3043435551466A41412675726C3D687474702533412532462532467777772E70726F72656B746F722E7275253246706C616E2D676F742532464A494D3532342E68746D6C2665693D7564513454395F514863575034675475303747684377267573673D4146516A434E46784F6A34312D4B644872366939343470415F42436E72734E6C70772663616425aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
Path=/\r\nSet-Cookie: lh_visit_client_556ba17f-111e-412f-
b548-6f75ef007a68=18078084-99e4-4056-a134-23b70b6a0570; Path=/\r\n\r
\n'

and Segmentation fault raises when interpreter tries to execute
'return res'.



On Feb 13, 12:05 pm, william opensource4you <william.o...@gmail.com>
wrote:
> curl -D stdout1http://127.0.0.1:8080/test1> res1
>
> wi@myarchhost:~/tmp/fapws_vassel$ more res1
> <h1>Not Found</h1>
> wi@myarchhost:~/tmp/fapws_vassel$ more stdout1
> HTTP/1.0 200 OK
> Date: Mon, 13 Feb 2012 07:47:14 GMT
> P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
> Content-type: image/gif
> Server: fapws3/0.10
>
> test2
> -------
> curl -D stdout2http://127.0.0.1:8080/test2> res2
>
> wi@myarchhost:~/tmp/fapws_vassel$ more res2
> Ok
> wi@myarchhost:~/tmp/fapws_vassel$ more stdout2
> HTTP/1.0 200 OK
> Expires: Mon, 26 Jul 1997 05:00:00 GMT
> Server: fapws3/0.10
> Pragma: no-cache
> Cache-Control: no-cache, must-revalidate
> Date: Mon, 13 Feb 2012 07:47:45 GMT
> P3P: CP: IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT
> Content-type: image/gif
>
> test3
> -------
> curl -D stdout3http://127.0.0.1:8080/test3> res3
> ...
>
> read more »

william opensource4you

unread,
Feb 13, 2012, 7:06:18 AM2/13/12
to fa...@googlegroups.com
I'm not sure I understand correctly your point :-(.

But I understand that there is a problem with Base.py (line 117) which
generate a crash of Fapws.

I you take the last release v0.10) this should no more generate a
crash because I have added the following line in mainloop.c:
if (PyErr_Occurred())
{
PyErr_Print();
return -500;
}


In other words, you will get an error message in your output file
(really hope you have one).
And the user will receive an error message
All in all Fapws will stays up an running.


Could I suggest you to migrate to the last version (v0.10) ?
I know it was released yesterday, but it contains some additional bugfixes.


Hope we are on the good track :-)
Thanks tell me how this will evolve


W.

alexvassel

unread,
Feb 13, 2012, 7:15:47 AM2/13/12
to Fast Asynchronous Python Web Server
I already use last version. I will try to explain more clear. Ok, file
base.py, line 117. Variable res contains a response. In my case the
response is huge (more than 4kB) and the server gets SegFault. If you
have some time, we could use google chat to talk or skype.

On Feb 13, 4:06 pm, william opensource4you <william.o...@gmail.com>
wrote:
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages