Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when doing some list iteration #49578

Closed
qwjqwj mannequin opened this issue Feb 20, 2009 · 3 comments
Closed

Crash when doing some list iteration #49578

qwjqwj mannequin opened this issue Feb 20, 2009 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@qwjqwj
Copy link
Mannequin

qwjqwj mannequin commented Feb 20, 2009

BPO 5328
Nosy @devdanzin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2009-02-22.15:13:39.733>
created_at = <Date 2009-02-20.08:49:51.479>
labels = ['interpreter-core', 'invalid', 'type-crash']
title = 'Crash when doing some list iteration'
updated_at = <Date 2009-02-22.15:13:39.732>
user = 'https://bugs.python.org/qwjqwj'

bugs.python.org fields:

activity = <Date 2009-02-22.15:13:39.732>
actor = 'benjamin.peterson'
assignee = 'none'
closed = True
closed_date = <Date 2009-02-22.15:13:39.733>
closer = 'benjamin.peterson'
components = ['Interpreter Core']
creation = <Date 2009-02-20.08:49:51.479>
creator = 'qwjqwj'
dependencies = []
files = []
hgrepos = []
issue_num = 5328
keywords = []
message_count = 3.0
messages = ['82522', '82532', '82594']
nosy_count = 2.0
nosy_names = ['ajaksu2', 'qwjqwj']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'test needed'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue5328'
versions = ['Python 2.5']

@qwjqwj
Copy link
Mannequin Author

qwjqwj mannequin commented Feb 20, 2009

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

@qwjqwj qwjqwj mannequin added the type-crash A hard crash of the interpreter, possibly with a core dump label Feb 20, 2009
@devdanzin
Copy link
Mannequin

devdanzin mannequin commented Feb 20, 2009

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.

@devdanzin devdanzin mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Feb 20, 2009
@qwjqwj
Copy link
Mannequin Author

qwjqwj mannequin commented Feb 22, 2009

I used the script from bpo-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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

1 participant