Menu

#3 segfault on python-2.7

closed
nobody
None
bug
2020-01-23
2020-01-23
No

I run it as follows:

PYTHONPATH=build/lib.linux-x86_64-2.7 python2 /usr/bin/py.test
======================================================== test session starts =========================================================
platform linux2 -- Python 2.7.10, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9, inifile: 
collected 98 items 

test/test_dictviews.py ..
test/test_ordereddict.py ..............................................................................................Abgebrochen (Speicherabzug geschrieben)

and the (first part of the) backtrace from the coredump:

Core was generated by `python2 /usr/bin/py.test'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f9013cc584b in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
55  ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00007f9013cc584b in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007f9013cc6ed1 in __GI_abort () at abort.c:89
#2  0x00007f9013cbdeb8 in __assert_fail_base (fmt=0x7f9013e07f90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x7f900e84a4ef "newotablep != oldotablep", file=file@entry=0x7f900e84a230 "ordereddict.c", 
    line=line@entry=807, function=function@entry=0x7f900e84b201 <__PRETTY_FUNCTION__.9730> "dictresize") at assert.c:92
#3  0x00007f9013cbdf76 in __GI___assert_fail (assertion=0x7f900e84a4ef "newotablep != oldotablep", 
    file=0x7f900e84a230 "ordereddict.c", line=807, function=0x7f900e84b201 <__PRETTY_FUNCTION__.9730> "dictresize") at assert.c:101
#4  0x00007f900e840fb8 in dictresize ()
   from /home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9/build/lib.linux-x86_64-2.7/_ordereddict.so
#5  0x00007f900e8419bc in PyOrderedDict_InsertItem ()
   from /home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9/build/lib.linux-x86_64-2.7/_ordereddict.so
#6  0x00007f900e846bbd in dict_insert ()
   from /home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9/build/lib.linux-x86_64-2.7/_ordereddict.so
#7  0x00007f901435bce5 in call_function (oparg=<optimized out>, pp_stack=0x7ffe589b0480)
    at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Python/ceval.c:4035
#8  PyEval_EvalFrameEx (
    f=f@entry=Frame 0x7f900f5ac7d0, for file /home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9/test/test_ordereddict.py, line 737, in test_multiple_inserts_then_deletes (self=<TestOrderedDict(x={'a': 1, 'c': 3, 'b': 2, 'd': 4}, part={'i': 8, 'h': 7, 'j': 9, 'g': 6, 'f': 5}, z={'a': 0, 'c': 2, 'b': 1, 'e': 4, 'd': 3, 'g': 6, 'f': 5, 'i': 8, 'h': 7, 'k': 10, 'j': 9, 'm': 12, 'l': 11, 'o': 14, 'n': 13, 'q': 16, 'p': 15, 's': 18, 'r': 17, 'u': 20, 't': 19, 'w': 22, 'v': 21, 'y': 24, 'x': 23, 'z': 25}, e={}, upperlower={'A': 1, 'a': 2, 'B': 4, 'b': 4}) at remote 0x7f900f86ee18>, d={0: 'will this crash?'}, i=5), throwflag=throwflag@entry=0)
    at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Python/ceval.c:2681
#9  0x00007f901435d759 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, 
    args=args@entry=0x7f900f64ca28, argcount=1, kws=kws@entry=0x7f901482d068, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Python/ceval.c:3267
#10 0x00007f90142d6380 in function_call (func=<function at remote 0x7f900f4e4848>, 
    arg=(<TestOrderedDict(x={'a': 1, 'c': 3, 'b': 2, 'd': 4}, part={'i': 8, 'h': 7, 'j': 9, 'g': 6, 'f': 5}, z={'a': 0, 'c': 2, 'b': 1, 'e': 4, 'd': 3, 'g': 6, 'f': 5, 'i': 8, 'h': 7, 'k': 10, 'j': 9, 'm': 12, 'l': 11, 'o': 14, 'n': 13, 'q': 16, 'p': 15, 's': 18, 'r': 17, 'u': 20, 't': 19, 'w': 22, 'v': 21, 'y': 24, 'x': 23, 'z': 25}, e={}, upperlower={'A': 1, 'a': 2, 'B': 4, 'b': 4}) at remote 0x7f900f86ee18>,), kw={}) at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Objects/funcobject.c:526
#11 0x00007f90142a82d6 in PyObject_Call (func=func@entry=<function at remote 0x7f900f4e4848>, 
    arg=arg@entry=(<TestOrderedDict(x={'a': 1, 'c': 3, 'b': 2, 'd': 4}, part={'i': 8, 'h': 7, 'j': 9, 'g': 6, 'f': 5}, z={'a': 0, 'c': 2, 'b': 1, 'e': 4, 'd': 3, 'g': 6, 'f': 5, 'i': 8, 'h': 7, 'k': 10, 'j': 9, 'm': 12, 'l': 11, 'o': 14, 'n': 13, 'q': 16, 'p': 15, 's': 18, 'r': 17, 'u': 20, 't': 19, 'w': 22, 'v': 21, 'y': 24, 'x': 23, 'z': 25}, e={}, upperlower={'A': 1, 'a': 2, 'B': 4, 'b': 4}) at remote 0x7f900f86ee18>,), kw=kw@entry={}) at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Objects/abstract.c:2529
#12 0x00007f9014359000 in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=0x7ffe589b0760, 
    func=<function at remote 0x7f900f4e4848>) at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Python/ceval.c:4348
#13 PyEval_EvalFrameEx (
    f=f@entry=Frame 0x7f900f5e37f0, for file /usr/lib64/python2.7/site-packages/_pytest/python.py, line 274, in pytest_pyfunc_call (pyfuncitem=<Function(_location=('test/test_ordereddict.py', 727, 'TestOrderedDict.test_multiple_inserts_then_deletes'), name='test_multiple_inserts_then_deletes', parent=<Instance(name='()', parent=<Class(name='TestOrderedDict', parent=<Module(name='test/test_ordereddict.py', parent=<Session(session=<...>, testsfailed=0, keywords=<NodeKeywords(node=<...>, _markers={'ruamel.ordereddict-0.4.9': True}, parent=None) at remote 0x7f900f6c09d0>, _setupstate=<SetupState(stack=[<...>, <...>, <...>, <...>, <...>], _finalizers={<...>: [<function at remote 0x7f900f574320>]}) at remote 0x7f900f899c10>, exitstatus=0, extra_keyword_matches=set([]), _notfound=[], trace=<_TagTracerSub(root=<_TagTracer(_tag2proc={}, writer=None, indent=0) at remote 0x7f900f93e2d8>, tags=('collection',)) at remote 0x7f900f6c7878>, testscollected=98, startdir=<LocalPath(strpath='/home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9'...(truncated), 
    throwflag=throwflag@entry=0) at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Python/ceval.c:2720
#14 0x00007f901435d759 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, 
    args=args@entry=0x7f900f4f5568, argcount=1, kws=kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at /var/tmp/paludis/dev-lang-python-2.7.10-r3/work/Python-2.7.10/Python/ceval.c:3267
#15 0x00007f90142d62a8 in function_call (func=<function at remote 0x7f900f7c3f50>, 
    arg=(<Function(_location=('test/test_ordereddict.py', 727, 'TestOrderedDict.test_multiple_inserts_then_deletes'), name='test_multiple_inserts_then_deletes', parent=<Instance(name='()', parent=<Class(name='TestOrderedDict', parent=<Module(name='test/test_ordereddict.py', parent=<Session(session=<...>, testsfailed=0, keywords=<NodeKeywords(node=<...>, _markers={'ruamel.ordereddict-0.4.9': True}, parent=None) at remote 0x7f900f6c09d0>, _setupstate=<SetupState(stack=[<...>, <...>, <...>, <...>, <...>], _finalizers={<...>: [<function at remote 0x7f900f574320>]}) at remote 0x7f900f899c10>, exitstatus=0, extra_keyword_matches=set([]), _notfound=[], trace=<_TagTracerSub(root=<_TagTracer(_tag2proc={}, writer=None, indent=0) at remote 0x7f900f93e2d8>, tags=('collection',)) at remote 0x7f900f6c7878>, testscollected=98, startdir=<LocalPath(strpath='/home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9') at remote 0x7f900f6c0a90>, _fs2hookproxy={<LocalPath(strpath='/home/tiziano/work/gentoo/ruamel.ordereddict-0.4.9/build') at re...(truncated), kw=0x0)

This is version 0.4.9 from pypi with the only change as follows:

sed -i -e 's|from ruamel.ordereddict|from _ordereddict|' test/*.py

(originally posted on 2015-11-27 at 14:02:51 by Tiziano Müller <dev-zero@bitbucket>)

Discussion

  • Anthon van der Neut

    Does this work without the change?

    (originally posted on 2016-08-22 at 07:42:26)

     
  • Anthon van der Neut

    • status set to closed

    No feedback

    (originally posted on 2016-09-29 at 05:30:15)

     

Log in to post a comment.

MongoDB Logo MongoDB