This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Crash when doing some list iteration
Type: crash Stage: test needed
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, qwjqwj
Priority: normal Keywords:

Created on 2009-02-20 08:49 by qwjqwj, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg82522 - (view) Author: (qwjqwj) Date: 2009-02-20 08:49
I am using the python 2.5.4 in redhat enterprise. 

My project is a big one with turbogears and sqlobject. The python core
dumped sometime when iterating list. It occurs randomly and cannot be
reproduced.

After using gdb, I found python core dumped at this line in the lambda
unnamed function:
newsfeeds = filter(lambda x: not(x.activity==0 and
x.value.get('uid')==sess.user.id),n)[:5]

The core dump info is as followed:


#0  listiter_next (it=0xa2988ecc) at Objects/listobject.c:2819
#1  0x08079e56 in listextend (self=0xa91f90c, b=<value optimized out>)
at Objects/listobject.c:823
#2  0x0807a370 in list_init (self=0xa91f90c, args=0xb64c6ec, kw=0x0) at
Objects/listobject.c:2391
#3  0x0809bfe3 in type_call (type=0x8140220, args=0xb64c6ec, kwds=0x0)
at Objects/typeobject.c:436
#4  0x0805a5f7 in PyObject_Call (func=0xb47cc6c, arg=0xb64c6ec, kw=0x0)
at Objects/abstract.c:1861
#5  0x080c16a2 in PyEval_EvalFrameEx (f=0xa2649aec, throwflag=0) at
Python/ceval.c:3823
#6  0x080c7765 in PyEval_EvalCodeEx (co=0x9929a88, globals=0x9907b54,
locals=0x0, args=0xb52fe58, 
    argcount=1, kws=0x9f98ae0, kwcount=2, defs=0x991ed38, defcount=2,
closure=0x0) at Python/ceval.c:2875
#7  0x0810f0ba in function_call (func=0x9f32b54, arg=0xb52fe4c,
kw=0xa27b679c)
    at Objects/funcobject.c:517
#8  0x0805a5f7 in PyObject_Call (func=0xb47cc6c, arg=0xb52fe4c,
kw=0xa27b679c) at Objects/abstract.c:1861
#9  0x080c46dd in PyEval_EvalFrameEx (f=0xac6737c, throwflag=0) at
Python/ceval.c:3892
#10 0x080c7765 in PyEval_EvalCodeEx (co=0x89bce30, globals=0x8ac702c,
locals=0x0, args=0xa14d6418, 
    argcount=2, kws=0xa3c2ba0, kwcount=2, defs=0x0, defcount=0,
closure=0x0) at Python/ceval.c:2875
#11 0x0810f0ba in function_call (func=0x8acf144, arg=0xa14d640c,
kw=0xa27b69bc)
    at Objects/funcobject.c:517
#12 0x0805a5f7 in PyObject_Call (func=0xb47cc6c, arg=0xa14d640c,
kw=0xa27b69bc)
    at Objects/abstract.c:1861
#13 0x080c46dd in PyEval_EvalFrameEx (f=0xac671ec, throwflag=0) at
Python/ceval.c:3892
#14 0x080c6410 in PyEval_EvalFrameEx (f=0xacf7c1c, throwflag=0) at
Python/ceval.c:3698
#15 0x080c7765 in PyEval_EvalCodeEx (co=0x84e1da0, globals=0x84d8acc,
locals=0x0, args=0xa0d144e8, 
    argcount=4, kws=0x9d850e8, kwcount=2, defs=0x0, defcount=0,
closure=0x9f3944c) at Python/ceval.c:2875
#16 0x0810f0ba in function_call (func=0x9f32cdc, arg=0xa0d144dc,
kw=0x9a22824)
    at Objects/funcobject.c:517
#17 0x0805a5f7 in PyObject_Call (func=0xb47cc6c, arg=0xa0d144dc,
kw=0x9a22824) at Objects/abstract.c:1861
#18 0x080c46dd in PyEval_EvalFrameEx (f=0xa2304ba4, throwflag=0) at
Python/ceval.c:3892
#19 0x080c7765 in PyEval_EvalCodeEx (co=0x9dcf890, globals=0x857ebdc,
locals=0x0, args=0xbb7b5b0, 
    argcount=4, kws=0x9b82858, kwcount=2, defs=0x0, defcount=0,
closure=0x9ebf10c) at Python/ceval.c:2875
#20 0x0810f0ba in function_call (func=0xa40de64, arg=0xbb7b5a4,
kw=0xa27b6604)
    at Objects/funcobject.c:517
#21 0x0805a5f7 in PyObject_Call (func=0xb47cc6c, arg=0xbb7b5a4,
kw=0xa27b6604) at Objects/abstract.c:1861
#22 0x080c46dd in PyEval_EvalFrameEx (f=0x9c7b0d4, throwflag=0) at
Python/ceval.c:3892
#23 0x080c7765 in PyEval_EvalCodeEx (co=0x89ade30, globals=0x89b7acc,
locals=0x0, args=0xa275a248, 
    argcount=5, kws=0x9c8e838, kwcount=2, defs=0x0, defcount=0,
closure=0x0) at Python/ceval.c:2875
msg82532 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-20 15:54
Can you take a look at issues 4732 to see whether it helps you pinpoint
the problem? Python 2.5 won't receive simple bugfixes any longer, only
security fixes.
msg82594 - (view) Author: (qwjqwj) Date: 2009-02-22 07:03
I used the script from issue 4732 and can reproduce segfault on my RHEL
5. After that I updated the system with "yum update" and get a new
version of libc. Currently the script cannot cause segfault after
updating. Thank you for your help.
History
Date User Action Args
2022-04-11 14:56:45adminsetgithub: 49578
2009-02-22 15:13:39benjamin.petersonsetstatus: open -> closed
resolution: not a bug
2009-02-22 07:03:31qwjqwjsetmessages: + msg82594
2009-02-20 15:54:18ajaksu2setnosy: + ajaksu2
messages: + msg82532
components: + Interpreter Core, - None
stage: test needed
2009-02-20 08:49:51qwjqwjcreate