Hello all,
I have been trying out the wsgi server with the app_sessionless example
downloaded from the google stacklessexamples page and i keep getting a
assertion and segmentation fault. I have browsed through the mailing
list archives and there seems to be a similar error posted about a year
ago. http://www.stackless.com/pipermail/stackless/2009-February/003910.html
I have the same symptoms as jtunney describes. Works great when you do a
single request in your web browser but when you stress it a bit the
server simply exits. When running this with a debug version of python
under windows i also can see a assertion before the server exits. When
stressing it even further under windows i get a segmentation fault.
Assertion failed: stack_pointer != NULL, file ..\Python\ceval.c, line 914.
This assertion/crash only happens when the clients are about to
disconnect. To reproduce this i used jmeter, 10 looping threads doing a
request against /. When starting the test i can see 10 "Accepted
connection" print outs and the server serves request. But when i shut
down the threads a assertion/segmentation fault occures.
I have also been able to reproduce this under linux and there i get a
segmentation fault right away.
I have attached some output from gdb, one with standard optimizations
and one with the flag turned to -O0 for more information.
I am running the following setup.
Windows:
Win 7 x64, (same thing on Vista 64)
Linux:
Redhat 5 x64
Python 2.6.4 Stackless 3.1b3 060516 (release26-maint:78823M, Mar 11
2010, 10:10:31)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
python2.6: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux
2.6.9, not stripped
Perhaps someone can help shed some light on this one.
/Håkan
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Program received signal SIGSEGV, Segmentation fault.
0x00000000004a34df in PyEval_EvalFrame_value (f=0xec2c740, throwflag=0,
retval=0x0) at Python/ceval.c:938
938 PUSH(retval); /* we are back from a function call */
(gdb) bt
#0 0x00000000004a34df in PyEval_EvalFrame_value (f=0xec2c740, throwflag=0,
retval=0x0) at Python/ceval.c:938
#1 0x00000000004b0ed2 in slp_frame_dispatch_top (retval=0x0) at
Stackless/core/stacklesseval.c:698
#2 0x00000000004b3acd in slp_run_tasklet () at
Stackless/module/scheduling.c:1199
#3 0x00000000004b019e in slp_eval_frame (f=0xea9c1a0) at
Stackless/core/stacklesseval.c:299
#4 0x00000000004b00e0 in climb_stack_and_eval_frame (f=0x4b77cd) at
Stackless/core/stacklesseval.c:266
#5 0x00000000004b5c50 in kill_finally (ob=0xebf1600) at
Stackless/module/taskletobject.c:91
#6 0x00000000004b123c in slp_resurrect_and_kill (self=0xebf1600,
killer=0x4b5bff <kill_finally>) at Stackless/core/stackless_util.c:135
#7 0x00000000004b5d49 in tasklet_dealloc (t=0xebf1600) at
Stackless/module/taskletobject.c:124
#8 0x000000000046cec1 in subtype_dealloc (self=0xebf1600) at
Objects/typeobject.c:1025
#9 0x0000000000547683 in channel_clear (ob=0xebf1600) at
Stackless/module/channelobject.c:29
#10 0x00000000004b123c in slp_resurrect_and_kill (self=0xebff5f0,
killer=0x54760c <channel_clear>) at Stackless/core/stackless_util.c:135
#11 0x00000000005476bd in channel_dealloc (ob=0xebff5f0) at
Stackless/module/channelobject.c:39
#12 0x000000000046cec1 in subtype_dealloc (self=0xebff5f0) at
Objects/typeobject.c:1025
#13 0x0000000000449abf in dict_dealloc (mp=0xec34190) at
Objects/dictobject.c:911
#14 0x00000000004239ef in instance_dealloc (inst=0xec04128) at
Objects/classobject.c:669
#15 0x0000000000525ec6 in frame_clear (f=0xec2c740) at Objects/frameobject.c:529
#16 0x00000000004f227e in delete_garbage (collectable=0x801100, old=0x7d2f80)
at Modules/gcmodule.c:714
#17 0x00000000004f26b3 in collect (generation=2) at Modules/gcmodule.c:873
#18 0x00000000004f305e in PyGC_Collect () at Modules/gcmodule.c:1300
#19 0x00000000004e1899 in Py_Finalize () at Python/pythonrun.c:438
#20 0x0000000000416169 in Py_Main (argc=2, argv=0x7fffd38cc5a8) at
Modules/main.c:625
#21 0x0000000000414f03 in main (argc=2, argv=0x7fffd38cc5a8) at
./Modules/python.c:23
(gdb) where full
#0 0x00000000004a34df in PyEval_EvalFrame_value (f=0xec2c740, throwflag=0,
retval=0x0) at Python/ceval.c:938
stack_pointer = (PyObject **) 0x0
next_instr = (unsigned char *) 0xea7fc10 "\001WnJ"
opcode = 246006560
oparg = 0
why = WHY_NOT
err = 0
x = (PyObject *) 0x7aafc0
v = (PyObject *) 0xe9747b0
w = (PyObject *) 0x0
u = (PyObject *) 0xffffffff00000000
t = (PyObject *) 0xe8f20a0
stream = (PyObject *) 0x0
fastlocals = (PyObject **) 0xec2c8c0
freevars = (PyObject **) 0xec2c8d8
tstate = (PyThreadState *) 0xe8f20a0
co = (PyCodeObject *) 0xebe6288
instr_ub = -1
instr_lb = 0
instr_prev = -1
first_instr = (unsigned char *) 0xea7fbd4 "y>"
names = (PyObject *) 0xeb3ee60
consts = (PyObject *) 0xebd8470
#1 0x00000000004b0ed2 in slp_frame_dispatch_top (retval=0x0) at
Stackless/core/stacklesseval.c:698
ts = (PyThreadState *) 0xe8f20a0
f = (PyFrameObject *) 0xec2c740
#2 0x00000000004b3acd in slp_run_tasklet () at
Stackless/module/scheduling.c:1199
ts = (PyThreadState *) 0xe8f20a0
retval = (PyObject *) 0x0
#3 0x00000000004b019e in slp_eval_frame (f=0xea9c1a0) at
Stackless/core/stacklesseval.c:299
ts = (PyThreadState *) 0xe8f20a0
fprev = (PyFrameObject *) 0x0
stackref = (intptr_t *) 0x7fffd38c0850
#4 0x00000000004b00e0 in climb_stack_and_eval_frame (f=0x4b77cd) at
Stackless/core/stacklesseval.c:266
ts = (PyThreadState *) 0xebf1600
probe = 244788368
needed = 5816
goobledigoobs = (intptr_t *) 0xe8f9090
#5 0x00000000004b5c50 in kill_finally (ob=0xebf1600) at
Stackless/module/taskletobject.c:91
ts = (PyThreadState *) 0xe8f20a0
self = (PyTaskletObject *) 0xebf1600
is_mine = 1
#6 0x00000000004b123c in slp_resurrect_and_kill (self=0xebf1600,
killer=0x4b5bff <kill_finally>) at Stackless/core/stackless_util.c:135
error_type = (PyObject *) 0x0
error_value = (PyObject *) 0x0
error_traceback = (PyObject *) 0x0
#7 0x00000000004b5d49 in tasklet_dealloc (t=0xebf1600) at
Stackless/module/taskletobject.c:124
No locals.
#8 0x000000000046cec1 in subtype_dealloc (self=0xebf1600) at
Objects/typeobject.c:1025
type = (PyTypeObject *) 0xe8f9090
base = (PyTypeObject *) 0x7c83e0
basedealloc = (destructor) 0x4b5d22 <tasklet_dealloc>
#9 0x0000000000547683 in channel_clear (ob=0xebf1600) at
Stackless/module/channelobject.c:29
dir = 1
ch = (PyChannelObject *) 0xebff5f0
#10 0x00000000004b123c in slp_resurrect_and_kill (self=0xebff5f0,
killer=0x54760c <channel_clear>) at Stackless/core/stackless_util.c:135
error_type = (PyObject *) 0x0
error_value = (PyObject *) 0x0
error_traceback = (PyObject *) 0x0
#11 0x00000000005476bd in channel_dealloc (ob=0xebff5f0) at
Stackless/module/channelobject.c:39
ch = (PyChannelObject *) 0xebff5f0
#12 0x000000000046cec1 in subtype_dealloc (self=0xebff5f0) at
Objects/typeobject.c:1025
type = (PyTypeObject *) 0xe8fad80
base = (PyTypeObject *) 0x7eb420
basedealloc = (destructor) 0x547690 <channel_dealloc>
#13 0x0000000000449abf in dict_dealloc (mp=0xec34190) at
Objects/dictobject.c:911
ep = (PyDictEntry *) 0xec333e0
fill = 5
#14 0x00000000004239ef in instance_dealloc (inst=0xec04128) at
Objects/classobject.c:669
error_type = (PyObject *) 0x0
error_value = (PyObject *) 0x0
error_traceback = (PyObject *) 0x0
del = (PyObject *) 0x0
delstr = (PyObject *) 0x2ac37bd579f0
#15 0x0000000000525ec6 in frame_clear (f=0xec2c740) at Objects/frameobject.c:529
_py_tmp = (PyObject *) 0xec04128
fastlocals = (PyObject **) 0xec2c8c0
p = (PyObject **) 0xec28e18
oldtop = (PyObject **) 0xec2c8d8
i = 2
slots = 3
#16 0x00000000004f227e in delete_garbage (collectable=0x801100, old=0x7d2f80)
at Modules/gcmodule.c:714
gc = (PyGC_Head *) 0xec2c720
op = (PyObject *) 0xec2c740
clear = (inquiry) 0x525caa <frame_clear>
#17 0x00000000004f26b3 in collect (generation=2) at Modules/gcmodule.c:873
i = 2
m = 17
n = 0
young = (PyGC_Head *) 0x7d2f80
old = (PyGC_Head *) 0x7d2f80
gc = (PyGC_Head *) 0x801100
t1 = 0
unreachable = {gc = {gc_next = 0xec2c720, gc_prev = 0xebf1a40, gc_refs
= 0}, dummy = <invalid float value>}
finalizers = {gc = {gc_next = 0x8010e0, gc_prev = 0x8010e0, gc_refs =
0}, dummy = <invalid float value>}
#18 0x00000000004f305e in PyGC_Collect () at Modules/gcmodule.c:1300
n = 47019084574960
#19 0x00000000004e1899 in Py_Finalize () at Python/pythonrun.c:438
interp = (PyInterpreterState *) 0xe8f2010
tstate = (PyThreadState *) 0xe8f20a0
#20 0x0000000000416169 in Py_Main (argc=2, argv=0x7fffd38cc5a8) at
Modules/main.c:625
c = -1
sts = 0
command = 0x0
filename = 0x7fffd38ce6d9 "app_sessionless.py"
module = 0x0
fp = (FILE *) 0xea4dd00
p = 0x0
unbuffered = 0
skipfirstline = 0
stdin_is_interactive = 1
help = 0
version = 0
saw_unbuffered_flag = 0
cf = {cf_flags = 0}
#21 0x0000000000414f03 in main (argc=2, argv=0x7fffd38cc5a8) at
./Modules/python.c:23
No locals.
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Accepted connection
Program received signal SIGSEGV, Segmentation fault.
0x00000000004924eb in PyEval_EvalFrame_value (f=0x45ba420, throwflag=<value
optimized out>, retval=0x0) at Python/ceval.c:938
938 PUSH(retval); /* we are back from a function call */
(gdb) bt
#0 0x00000000004924eb in PyEval_EvalFrame_value (f=0x45ba420, throwflag=<value
optimized out>, retval=0x0) at Python/ceval.c:938
#1 0x0000000000498950 in slp_frame_dispatch_top (retval=0x491e50) at
Stackless/core/stacklesseval.c:698
#2 0x000000000049b646 in slp_run_tasklet () at
Stackless/module/scheduling.c:1199
#3 0x000000000049976e in slp_eval_frame (f=0x4429f40) at
Stackless/core/stacklesseval.c:299
#4 0x00000000004997f7 in climb_stack_and_eval_frame (f=0x45ba420) at
Stackless/core/stacklesseval.c:266
#5 0x000000000044797c in dict_dealloc (mp=0x0) at Objects/dictobject.c:911
#6 0x0000000000424cbf in instance_dealloc (inst=0x45921b8) at
Objects/classobject.c:669
#7 0x00000000004f71d4 in frame_clear (f=0x45ba420) at Objects/frameobject.c:529
#8 0x00000000004d0e5a in collect (generation=2) at Modules/gcmodule.c:714
#9 0x00000000004d13b4 in PyGC_Collect () at Modules/gcmodule.c:1300
#10 0x00000000004c4795 in Py_Finalize () at Python/pythonrun.c:438
#11 0x0000000000415584 in Py_Main (argc=<value optimized out>,
argv=0x7fff5c38cf88) at Modules/main.c:625
#12 0x000000317121d994 in __libc_start_main () from /lib64/libc.so.6
#13 0x0000000000414d09 in _start ()
(gdb) where full
#0 0x00000000004924eb in PyEval_EvalFrame_value (f=0x45ba420, throwflag=<value
optimized out>, retval=0x0) at Python/ceval.c:938
stack_pointer = <value optimized out>
next_instr = (unsigned char *) 0x440dc10 "\001WnJ"
opcode = <value optimized out>
oparg = <value optimized out>
why = <value optimized out>
err = <value optimized out>
x = <value optimized out>
v = <value optimized out>
w = <value optimized out>
u = <value optimized out>
t = <value optimized out>
stream = <value optimized out>
fastlocals = (PyObject **) 0x45ba5a0
freevars = (PyObject **) 0x45ba5b8
tstate = (PyThreadState *) 0x42800a0
co = (PyCodeObject *) 0x4574288
instr_ub = <value optimized out>
instr_lb = <value optimized out>
instr_prev = <value optimized out>
first_instr = (unsigned char *) 0x440dbd4 "y>"
names = (PyObject *) 0x44cce60
consts = (PyObject *) 0x4566470
#1 0x0000000000498950 in slp_frame_dispatch_top (retval=0x491e50) at
Stackless/core/stacklesseval.c:698
ts = (PyThreadState *) 0x42800a0
f = (PyFrameObject *) 0x440dc0f
#2 0x000000000049b646 in slp_run_tasklet () at
Stackless/module/scheduling.c:1199
ts = (PyThreadState *) 0x42800a0
retval = (PyObject *) 0x0
#3 0x000000000049976e in slp_eval_frame (f=0x4429f40) at
Stackless/core/stacklesseval.c:299
ts = (PyThreadState *) 0x42800a0
fprev = (PyFrameObject *) 0x0
#4 0x00000000004997f7 in climb_stack_and_eval_frame (f=0x45ba420) at
Stackless/core/stacklesseval.c:266
probe = 0
#5 0x000000000044797c in dict_dealloc (mp=0x0) at Objects/dictobject.c:911
ep = (PyDictEntry *) 0x43f5210
fill = 17
#6 0x0000000000424cbf in instance_dealloc (inst=0x45921b8) at
Objects/classobject.c:669
error_type = (PyObject *) 0x0
error_value = (PyObject *) 0x0
error_traceback = (PyObject *) 0x0
del = (PyObject *) 0x2b0ab3eaa9f0
delstr = (PyObject *) 0x2b0ab3eaa9f0
#7 0x00000000004f71d4 in frame_clear (f=0x45ba420) at Objects/frameobject.c:529
fastlocals = (PyObject **) 0x45ba5a0
p = <value optimized out>
oldtop = (PyObject **) 0x45ba5b8
i = 1
#8 0x00000000004d0e5a in collect (generation=2) at Modules/gcmodule.c:714
i = <value optimized out>
m = 17
n = <value optimized out>
young = <value optimized out>
old = (PyGC_Head *) 0x78ff80
gc = <value optimized out>
t1 = 0
unreachable = {gc = {gc_next = 0x45ba400, gc_prev = 0x457fab0, gc_refs
= 0}, dummy = <invalid float value>}
finalizers = {gc = {gc_next = 0x7bde20, gc_prev = 0x7bde20, gc_refs =
0}, dummy = <invalid float value>}
#9 0x00000000004d13b4 in PyGC_Collect () at Modules/gcmodule.c:1300
n = 4791888
#10 0x00000000004c4795 in Py_Finalize () at Python/pythonrun.c:438
interp = (PyInterpreterState *) 0x4280010
#11 0x0000000000415584 in Py_Main (argc=<value optimized out>,
argv=0x7fff5c38cf88) at Modules/main.c:625
c = <value optimized out>
sts = 0
command = 0x0
filename = 0x7fff5c38e6d9 "app_sessionless.py"
module = 0x0
fp = (FILE *) 0x43dbaa0
p = <value optimized out>
unbuffered = <value optimized out>
skipfirstline = 0
stdin_is_interactive = 1
help = <value optimized out>
version = <value optimized out>
saw_unbuffered_flag = 0
cf = {cf_flags = 0}
#12 0x000000317121d994 in __libc_start_main () from /lib64/libc.so.6
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless