Closed
Description
I have reported #22714 but as I ran the test suite I can still see more segfaults. I am opening this to collect all of them since I don't know how to name the issue for every segfault since I don't know the proper reason. Kindly let me know if I need to use separate issues. I am using master branch of Pandas for testing against CPython master branch which will be released as Python 3.8
(pandas-venv) ~/pandas/pandas/tests$ pytest -vv indexing/test_indexing.py::TestFancy::test_setitem_list
======================================== test session starts ========================================
platform linux -- Python 3.8.0a0, pytest-3.8.0, py-1.6.0, pluggy-0.7.1 -- /home/karthi/pandas-venv/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/karthi/pandas/pandas/tests/.hypothesis/examples')
rootdir: /home/karthi/pandas, inifile: setup.cfg
plugins: hypothesis-3.71.3
collected 1 item
indexing/test_indexing.py::TestFancy::test_setitem_list Aborted (core dumped)
segfault code
from warnings import catch_warnings
from pandas import DataFrame
df = DataFrame(index=[0, 1], columns=[0])
with catch_warnings(record=True):
df.ix[1, 0] = [1, 2, 3]
df.ix[1, 0] = [1, 2] # Segfaults here
stacktrace
python: Objects/typeobject.c:3094: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff7115428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7115428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff711702a in __GI_abort () at abort.c:89
#2 0x00007ffff710dbd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5fa699 "!PyErr_Occurred()", file=file@entry=0x607e24 "Objects/typeobject.c", line=line@entry=3094, function=function@entry=0x60b368 <__PRETTY_FUNCTION__.14075> "_PyType_Lookup") at assert.c:92
#3 0x00007ffff710dc82 in __GI___assert_fail (assertion=assertion@entry=0x5fa699 "!PyErr_Occurred()", file=file@entry=0x607e24 "Objects/typeobject.c", line=line@entry=3094, function=function@entry=0x60b368 <__PRETTY_FUNCTION__.14075> "_PyType_Lookup") at assert.c:101
#4 0x0000000000482522 in _PyType_Lookup (type=type@entry=0x8c6380 <PyList_Type>, name=0x7ffff7faf7b0) at Objects/typeobject.c:3094
#5 0x00000000004826f1 in _PyType_LookupId (type=0x8c6380 <PyList_Type>, name=name@entry=0x90f880 <PyId___trunc__.13447>) at Objects/typeobject.c:3137
#6 0x0000000000485ecf in _PyObject_LookupSpecial (self=self@entry=0x7fffe96aa9a8, attrid=attrid@entry=0x90f880 <PyId___trunc__.13447>) at Objects/typeobject.c:1429
#7 0x00000000005a66e9 in PyNumber_Long (o=o@entry=0x7fffe96aa9a8) at Objects/abstract.c:1372
#8 0x00007ffff6886204 in MyPyLong_AsLong (obj=obj@entry=0x7fffe96aa9a8) at numpy/core/src/multiarray/arraytypes.c.src:116
#9 0x00007ffff6899eca in LONG_setitem (op=0x7fffe96aa9a8, ov=ov@entry=0xdada68, vap=vap@entry=0x7fffe8f204c0) at numpy/core/src/multiarray/arraytypes.c.src:241
#10 0x00007ffff689a139 in OBJECT_to_LONG (input=<optimized out>, output=<optimized out>, n=2, __NPY_UNUSED_TAGGEDaip=<optimized out>, aop=0x7fffe8f204c0) at numpy/core/src/multiarray/arraytypes.c.src:1495
#11 0x00007ffff68e1c95 in _aligned_contig_to_contig_cast (dst=<optimized out>, __NPY_UNUSED_TAGGEDdst_stride=<optimized out>, src=<optimized out>, __NPY_UNUSED_TAGGEDsrc_stride=<optimized out>, N=<optimized out>, __NPY_UNUSED_TAGGEDitemsize=<optimized out>, data=0x12786b0) at numpy/core/src/multiarray/dtype_transfer.c:696
#12 0x00007ffff68ab8ff in raw_array_assign_array (ndim=1, shape=0x99cbc0, dst_dtype=0x7ffff6c2c8a0 <LONG_Descr>, dst_data=0xdada60 "\002", dst_strides=0x99cbd0, src_dtype=<optimized out>, src_data=0xe4b940 "\020\023\202\366\377\177", src_strides=0x7fffffffcc00) at numpy/core/src/multiarray/array_assign_array.c:96
#13 0x00007ffff68ac36f in PyArray_AssignArray (dst=dst@entry=0x7fffe8f202c0, src=src@entry=0x7fffe8f203c0, wheremask=wheremask@entry=0x0, casting=casting@entry=NPY_UNSAFE_CASTING) at numpy/core/src/multiarray/array_assign_array.c:367
#14 0x00007ffff68c1d45 in PyArray_CopyInto (dst=dst@entry=0x7fffe8f202c0, src=src@entry=0x7fffe8f203c0) at numpy/core/src/multiarray/ctors.c:2922
#15 0x00007ffff6960e4a in array_astype (self=self@entry=0x7fffe8f203c0, args=args@entry=0x7ffff6ecde90, kwds=kwds@entry=0x0) at numpy/core/src/multiarray/methods.c:821
#16 0x00000000004315cd in _PyMethodDef_RawFastCallKeywords (method=0x7ffff6c3b660 <array_methods+608>, self=self@entry=0x7fffe8f203c0, args=args@entry=0x1295348, nargs=nargs@entry=1, kwnames=kwnames@entry=0x0) at Objects/call.c:690
#17 0x00000000005be89b in _PyMethodDescr_FastCallKeywords (descrobj=descrobj@entry=0x7ffff681dc20, args=args@entry=0x1295340, nargs=nargs@entry=2, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:288
#18 0x00000000004ea914 in call_function (kwnames=0x0, oparg=2, pp_stack=<synthetic pointer>) at Python/ceval.c:4600
#19 _PyEval_EvalFrameDefault (f=0x1295150, throwflag=<optimized out>) at Python/ceval.c:3186
#20 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1295150, throwflag=throwflag@entry=0) at Python/ceval.c:536
#21 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffec12eb80, globals=globals@entry=0x7fffec11b9f0, locals=locals@entry=0x0, args=args@entry=0x7fffffffd220, argcount=argcount@entry=1, kwnames=kwnames@entry=0x7fffe8f32210, kwargs=0x7fffe8f32218, kwcount=6, kwstep=2, defs=0x7fffec139498, defcount=1, kwdefs=0x0, closure=0x0, name=0x7ffff612ce10, qualname=0x7fffec12f350) at Python/ceval.c:3951
#22 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffeb67e520, args=args@entry=0x7fffffffd220, nargs=nargs@entry=1, kwargs=kwargs@entry=0x7fffe8f40b40) at Objects/call.c:376
#23 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffeb67e520, args=args@entry=0x7fffffffd220, nargs=nargs@entry=1, kwargs=kwargs@entry=0x7fffe8f40b40) at Objects/call.c:98
#24 0x00000000004325ee in _PyObject_Call_Prepend (callable=0x7fffeb67e520, obj=0x7fffe8f41500, args=0x7ffff7fa5050, kwargs=0x7fffe8f40b40) at Objects/call.c:904
#25 0x00000000005b7bd4 in method_call (method=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/classobject.c:306
#26 0x000000000043364b in PyObject_Call (callable=0x7fffe966d390, args=0x7ffff7fa5050, kwargs=0x7fffe8f40b40) at Objects/call.c:245
#27 0x00000000004dee12 in do_call_core (func=func@entry=0x7fffe966d390, callargs=callargs@entry=0x7ffff7fa5050, kwdict=kwdict@entry=0x7fffe8f40b40) at Python/ceval.c:4652
#28 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x1294ea0, throwflag=<optimized out>) at Python/ceval.c:3267
#29 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1294ea0, throwflag=throwflag@entry=0) at Python/ceval.c:536
#30 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffeb68f580, globals=globals@entry=0x7fffec11bc90, locals=locals@entry=0x0, args=args@entry=0x7fffffffd5e0, argcount=argcount@entry=2, kwnames=kwnames@entry=0x7ffff6ed7618, kwargs=0x7ffff6ed7620, kwcount=4, kwstep=2, defs=0x7fffeb69f870, defcount=4, kwdefs=0x0, closure=0x0, name=0x7ffff0b5d380, qualname=0x7fffeb68ab08) at Python/ceval.c:3951
#31 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffeb645b50, args=args@entry=0x7fffffffd5e0, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7fffe8f352f0) at Objects/call.c:376
#32 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffeb645b50, args=args@entry=0x7fffffffd5e0, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7fffe8f352f0) at Objects/call.c:98
#33 0x00000000004325ee in _PyObject_Call_Prepend (callable=0x7fffeb645b50, obj=0x7fffe8f0fb90, args=0x7fffeb68ecb0, kwargs=0x7fffe8f352f0) at Objects/call.c:904
#34 0x00000000005b7bd4 in method_call (method=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/classobject.c:306
#35 0x000000000043364b in PyObject_Call (callable=0x7ffff7ed5c80, args=0x7fffeb68ecb0, kwargs=0x7fffe8f352f0) at Objects/call.c:245
#36 0x00000000004dee12 in do_call_core (func=func@entry=0x7ffff7ed5c80, callargs=callargs@entry=0x7fffeb68ecb0, kwdict=kwdict@entry=0x7fffe8f352f0) at Python/ceval.c:4652
#37 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x7fffe8caf228, throwflag=<optimized out>) at Python/ceval.c:3267
#38 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x7fffe8caf228, throwflag=throwflag@entry=0) at Python/ceval.c:536
#39 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=0x7fffeb68fe80, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x1294df8, argcount=1, kwnames=0x7fffec096690, kwargs=0x1294e00, kwcount=2, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x7ffff612ce10, qualname=0x7fffeb68ae50) at Python/ceval.c:3951
#40 0x00000000004310a8 in _PyFunction_FastCallKeywords (func=func@entry=0x7fffeb645f70, stack=stack@entry=0x1294df8, nargs=nargs@entry=1, kwnames=kwnames@entry=0x7fffec096668) at Objects/call.c:433
#41 0x00000000004eb599 in call_function (kwnames=0x7fffec096668, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4623
#42 _PyEval_EvalFrameDefault (f=0x1294b50, throwflag=<optimized out>) at Python/ceval.c:3215
#43 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1294b50, throwflag=throwflag@entry=0) at Python/ceval.c:536
#44 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=0x7fffec0a6640, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x7fffe8f431f8, argcount=3, kwnames=0x0, kwargs=0x7fffe8f43210, kwcount=0, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x7fffec097f40, qualname=0x7fffec09f8c0) at Python/ceval.c:3951
#45 0x00000000004310a8 in _PyFunction_FastCallKeywords (func=func@entry=0x7fffec1139f0, stack=stack@entry=0x7fffe8f431f8, nargs=nargs@entry=3, kwnames=kwnames@entry=0x0) at Objects/call.c:433
#46 0x00000000004ea9e0 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4623
#47 _PyEval_EvalFrameDefault (f=0x7fffe8f43050, throwflag=<optimized out>) at Python/ceval.c:3186
#48 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x7fffe8f43050, throwflag=throwflag@entry=0) at Python/ceval.c:536
#49 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffec0a1880, globals=globals@entry=0x7fffec084c90, locals=locals@entry=0x0, args=args@entry=0x7fffffffde10, argcount=argcount@entry=3, kwnames=kwnames@entry=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x7ffff7fa96d0, qualname=0x7fffec09d9c0) at Python/ceval.c:3951
#50 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffec113310, args=args@entry=0x7fffffffde10, nargs=nargs@entry=3, kwargs=kwargs@entry=0x0) at Objects/call.c:376
#51 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffec113310, args=args@entry=0x7fffffffde10, nargs=nargs@entry=3, kwargs=kwargs@entry=0x0) at Objects/call.c:98
#52 0x00000000004324dd in _PyObject_FastCall_Prepend (callable=callable@entry=0x7fffec113310, obj=obj@entry=0x7fffe8f3c2a8, args=args@entry=0x7fffffffded0, nargs=3, nargs@entry=2) at Objects/call.c:866
#53 0x0000000000479dbb in call_unbound (unbound=<optimized out>, func=func@entry=0x7fffec113310, self=self@entry=0x7fffe8f3c2a8, args=args@entry=0x7fffffffded0, nargs=nargs@entry=2) at Objects/typeobject.c:1481
#54 0x0000000000482998 in call_method (obj=0x7fffe8f3c2a8, name=name@entry=0x8d2400 <PyId___setitem__>, args=args@entry=0x7fffffffded0, nargs=nargs@entry=2) at Objects/typeobject.c:1513
#55 0x0000000000482c24 in slot_mp_ass_subscript (self=<optimized out>, key=<optimized out>, value=<optimized out>) at Objects/typeobject.c:6158
#56 0x00000000005a770a in PyObject_SetItem (o=o@entry=0x7fffe8f3c2a8, key=key@entry=0x7ffff7e8f6d0, value=value@entry=0x7fffe96aa9a8) at Objects/abstract.c:198
#57 0x00000000004e3db7 in _PyEval_EvalFrameDefault (f=0x9a7bd0, throwflag=<optimized out>) at Python/ceval.c:1584
#58 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x9a7bd0, throwflag=throwflag@entry=0) at Python/ceval.c:536
#59 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=0x7ffff7e9a640, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=argcount@entry=0, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3951
#60 0x00000000004e09a4 in PyEval_EvalCodeEx (_co=_co@entry=0x7ffff7e9a640, globals=globals@entry=0x7ffff7eb2fa0, locals=locals@entry=0x7ffff7eb2fa0, args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3980
#61 0x00000000004e09cd in PyEval_EvalCode (co=co@entry=0x7ffff7e9a640, globals=globals@entry=0x7ffff7eb2fa0, locals=locals@entry=0x7ffff7eb2fa0) at Python/ceval.c:513
#62 0x0000000000521840 in run_mod (mod=mod@entry=0x9bc7c8, filename=filename@entry=0x7ffff6ec3bf8, globals=globals@entry=0x7ffff7eb2fa0, locals=locals@entry=0x7ffff7eb2fa0, flags=flags@entry=0x7fffffffe350, arena=arena@entry=0x7ffff7e88040) at Python/pythonrun.c:1031
#63 0x000000000052448a in PyRun_FileExFlags (fp=fp@entry=0x9ba3a0, filename_str=filename_str@entry=0x7ffff6ed1f10 "foo_setitem_list.py", start=start@entry=257, globals=globals@entry=0x7ffff7eb2fa0, locals=locals@entry=0x7ffff7eb2fa0, closeit=closeit@entry=1, flags=0x7fffffffe350) at Python/pythonrun.c:984
#64 0x000000000052481f in PyRun_SimpleFileExFlags (fp=fp@entry=0x9ba3a0, filename=<optimized out>, filename@entry=0x7ffff6ed1f10 "foo_setitem_list.py", closeit=closeit@entry=1, flags=flags@entry=0x7fffffffe350) at Python/pythonrun.c:425
#65 0x00000000005249db in PyRun_AnyFileExFlags (fp=fp@entry=0x9ba3a0, filename=0x7ffff6ed1f10 "foo_setitem_list.py", closeit=closeit@entry=1, flags=flags@entry=0x7fffffffe350) at Python/pythonrun.c:84
#66 0x0000000000420c3b in pymain_run_file (pymain=pymain@entry=0x7fffffffe3b0, config=config@entry=0x948438, cf=cf@entry=0x7fffffffe350) at Modules/main.c:1159
#67 0x0000000000421146 in pymain_run_python (pymain=pymain@entry=0x7fffffffe3b0, interp=0x9483b0) at Modules/main.c:1607
#68 0x0000000000422da0 in pymain_main (pymain=pymain@entry=0x7fffffffe3b0) at Modules/main.c:1755
#69 0x0000000000422e74 in _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:1792
#70 0x000000000041f96f in main (argc=<optimized out>, argv=<optimized out>) at ./Programs/python.c:15
(pandas-venv) ~/pandas/pandas/tests$ pytest -vv io/json/test_ujson.py::TestNumpyJSONTests::test_0d_array
======================================== test session starts ========================================
platform linux -- Python 3.8.0a0, pytest-3.8.0, py-1.6.0, pluggy-0.7.1 -- /home/karthi/pandas-venv/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/karthi/pandas/pandas/tests/.hypothesis/examples')
rootdir: /home/karthi/pandas, inifile: setup.cfg
plugins: hypothesis-3.71.3
collected 1 item
io/json/test_ujson.py::TestNumpyJSONTests::test_0d_array Aborted (core dumped)
(pandas-venv) ~/pandas/pandas/tests$ pytest -vv indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast
======================================== test session starts ========================================
platform linux -- Python 3.8.0a0, pytest-3.8.0, py-1.6.0, pluggy-0.7.1 -- /home/karthi/pandas-venv/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/karthi/pandas/pandas/tests/.hypothesis/examples')
rootdir: /home/karthi/pandas, inifile: setup.cfg
plugins: hypothesis-3.71.3
collected 20 items
indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast[index0-int64] PASSED [ 5%]
indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast[index0-uint64] PASSED [ 10%]
indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast[index0-float64] PASSED [ 15%]
indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast[index0-complex128] PASSED [ 20%]
indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast[index0-period[M]] PASSED [ 25%]
indexes/interval/test_astype.py::TestIntSubtype::test_astype_cannot_cast[index0-timedelta64] Aborted (core dumped)
Thanks