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: Segfault in pandas that works fine on 3.7
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: v2m, xtreak
Priority: normal Keywords:

Created on 2018-09-14 19:52 by xtreak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (5)
msg325392 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-14 19:52
I have tried running pandas test suite under Python 3.8 and the below code segfault as part of the test suite. Pandas uses Python 3.7 in Travis and it runs fine. There is also NumPy related code in the trace but it also seems to run fine under Python 3.7. I suppose this is a crash in CPython master and I didn't try latest Python 3.7 branch yet. Attaching the sample program and stack trace as below : 

# Program 

from pandas import DataFrame
import pandas as pd

df = DataFrame({'A': [1, 2, 3],
                'B': [1., 2., 3.],
                'C': ['foo', 'bar', 'baz'],
                'D': pd.date_range('20130101', periods=3)})

print(df.agg('sum'))

# Python 3.7 output

$ virtualenv -p /usr/bin/python3.7 py-37-venv
$ source py-37-venv/bin/activate
$ python
Python 3.7.0 (default, Jun 28 2018, 02:32:19)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

$ pip install pandas

$ python foo.py
A            6
B            6
C    foobarbaz
dtype: object


# Crash on Python 3.8 (CPython master)

$ ./python -m venv ../pandas-venv
$ cd ../ && source pandas-venv/bin/activate
$ python
Python 3.8.0a0 (heads/master:73820a6, Sep 14 2018, 18:33:26)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ pip install pandas
$ python foo.py
<frozen importlib._bootstrap>:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
/home/karthi/pandas/pandas/core/dtypes/inference.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable
/home/karthi/pandas/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
python: Objects/call.c:90: _PyObject_FastCallDict: Assertion `!PyErr_Occurred()' failed.


# Stack trace

$ gdb --args python foo.py
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
warning: File "/home/karthi/cpython/python-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /home/karthi/cpython/python-gdb.py
line to your configuration file "/home/karthi/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/karthi/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
(gdb)
(gdb) set pagination off
(gdb) r
Starting program: /home/karthi/pandas-venv/bin/python foo.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
<frozen importlib._bootstrap>:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
/home/karthi/pandas/pandas/core/dtypes/inference.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable
/home/karthi/pandas/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
python: Objects/call.c:90: _PyObject_FastCallDict: 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=0x5fa650 "Objects/call.c", line=line@entry=90, function=function@entry=0x5fade0 <__PRETTY_FUNCTION__.13021> "_PyObject_FastCallDict") at assert.c:92
#3  0x00007ffff710dc82 in __GI___assert_fail (assertion=assertion@entry=0x5fa699 "!PyErr_Occurred()", file=file@entry=0x5fa650 "Objects/call.c", line=line@entry=90, function=function@entry=0x5fade0 <__PRETTY_FUNCTION__.13021> "_PyObject_FastCallDict") at assert.c:101
#4  0x0000000000432229 in _PyObject_FastCallDict (callable=callable@entry=0x7fffe8f33350, args=0x7fffffffba90, nargs=nargs@entry=1, kwargs=kwargs@entry=0x0) at Objects/call.c:90
#5  0x0000000000479dcd in call_unbound (unbound=<optimized out>, func=func@entry=0x7fffe8f33350, self=self@entry=0x7fffe8f284e8, args=args@entry=0x7fffffffba90, nargs=nargs@entry=1) at Objects/typeobject.c:1484
#6  0x0000000000483783 in call_maybe (obj=obj@entry=0x7fffe8f284e8, name=name@entry=0x8cf800 <op_id>, args=args@entry=0x7fffffffba90, nargs=nargs@entry=1) at Objects/typeobject.c:1534
#7  0x00000000004851d2 in slot_nb_add (self=0x7fffe8f284e8, other=0x7fffe8f28638) at Objects/typeobject.c:6167
#8  0x00000000005a47cc in binary_op1 (v=v@entry=0x7fffe8f284e8, w=w@entry=0x7fffe8f28638, op_slot=op_slot@entry=0) at Objects/abstract.c:804
#9  0x00000000005a5d2c in PyNumber_Add (v=0x7fffe8f284e8, w=0x7fffe8f28638) at Objects/abstract.c:954
#10 0x00007ffff61db5bb in PyUFunc_OO_O (args=<optimized out>, dimensions=<optimized out>, steps=<optimized out>, func=0x5a5d18 <PyNumber_Add>) at numpy/core/src/umath/loops.c.src:592
#11 0x00007ffff6332c24 in reduce_loop (iter=0x1295500, dataptrs=dataptrs@entry=0x12955e0, strides=strides@entry=0x12955d0, countptr=0x12955a8, iternext=iternext@entry=0x7ffff6971611 <npyiter_buffered_reduce_iternext_iters2>, needs_api=1, skip_first_count=<optimized out>, data=0x994fa0) at numpy/core/src/umath/ufunc_object.c:3263
#12 0x00007ffff61d00c5 in PyUFunc_ReduceWrapper (operand=operand@entry=0x7fffe8f16bc0, out=out@entry=0x0, wheremask=wheremask@entry=0x0, operand_dtype=<optimized out>, result_dtype=<optimized out>, casting=casting@entry=NPY_UNSAFE_CASTING, axis_flags=0x7fffffffbda0 "\001", reorderable=1, keepdims=0, subok=0, identity=0x8cb3c0 <_Py_NoneStruct>, loop=0x7ffff6332a23 <reduce_loop>, data=0x994fa0, buffersize=8192, funcname=0x7ffff6375457 "add", errormask=9) at numpy/core/src/umath/reduction.c:567
#13 0x00007ffff633a8a4 in PyUFunc_Reduce (ufunc=ufunc@entry=0x994fa0, arr=arr@entry=0x7fffe8f16bc0, out=0x0, naxes=naxes@entry=1, axes=axes@entry=0x7fffffffbe90, odtype=0x7ffff6c2c1a0 <OBJECT_Descr>, keepdims=0, initial=0x8cb3c0 <_Py_NoneStruct>) at numpy/core/src/umath/ufunc_object.c:3359
#14 0x00007ffff633c9fd in PyUFunc_GenericReduction (ufunc=ufunc@entry=0x994fa0, args=args@entry=0x7ffff6ec62f8, kwds=kwds@entry=0x0, operation=operation@entry=0) at numpy/core/src/umath/ufunc_object.c:4333
#15 0x00007ffff633cef7 in ufunc_reduce (ufunc=ufunc@entry=0x994fa0, args=args@entry=0x7ffff6ec62f8, kwds=kwds@entry=0x0) at numpy/core/src/umath/ufunc_object.c:5251
#16 0x00000000004315cd in _PyMethodDef_RawFastCallKeywords (method=0x7ffff65ba380 <ufunc_methods>, self=0x994fa0, args=args@entry=0x12953e0, nargs=nargs@entry=6, kwnames=<optimized out>) at Objects/call.c:690
#17 0x000000000043175a in _PyCFunction_FastCallKeywords (func=func@entry=0x7ffff5747980, args=args@entry=0x12953e0, nargs=nargs@entry=6, kwnames=kwnames@entry=0x0) at Objects/call.c:730
#18 0x00000000004eaccf in call_function (kwnames=0x0, oparg=6, pp_stack=<synthetic pointer>) at Python/ceval.c:4575
#19 _PyEval_EvalFrameDefault (f=0x1295230, throwflag=<optimized out>) at Python/ceval.c:3200
#20 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1295230, throwflag=throwflag@entry=0) at Python/ceval.c:536
#21 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7ffff5755dc0, globals=globals@entry=0x7ffff5756d00, locals=locals@entry=0x0, args=args@entry=0x7fffe8f3d7c8, argcount=argcount@entry=2, kwnames=kwnames@entry=0x7fffe8f3d760, kwargs=0x7fffe8f3d768, kwcount=2, kwstep=2, defs=0x7ffff573dbf8, defcount=5, kwdefs=0x0, closure=0x0, name=0x7ffff5757c70, qualname=0x7ffff5757c70) at Python/ceval.c:3951
#22 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7ffff57583c0, args=args@entry=0x7fffe8f3d7c8, nargs=2, kwargs=kwargs@entry=0x7fffeb60e7c0) at Objects/call.c:376
#23 0x00000000004335ca in PyObject_Call (callable=callable@entry=0x7ffff57583c0, args=args@entry=0x7fffe8f3d7a0, kwargs=kwargs@entry=0x7fffeb60e7c0) at Objects/call.c:226
#24 0x00007ffff695aff8 in forward_ndarray_method (self=self@entry=0x7fffe8f16bc0, args=args@entry=0x7ffff7e9f050, kwds=kwds@entry=0x7fffeb60e7c0, forwarding_callable=0x7ffff57583c0) at numpy/core/src/multiarray/methods.c:104
#25 0x00007ffff695b0ee in array_sum (self=self@entry=0x7fffe8f16bc0, args=args@entry=0x7ffff7e9f050, kwds=kwds@entry=0x7fffeb60e7c0) at numpy/core/src/multiarray/methods.c:1991
#26 0x00000000004315cd in _PyMethodDef_RawFastCallKeywords (method=0x7ffff6c3bb00 <array_methods+1792>, self=0x7fffe8f16bc0, args=args@entry=0x1294ad8, nargs=nargs@entry=1, kwnames=<optimized out>) at Objects/call.c:690
#27 0x000000000043175a in _PyCFunction_FastCallKeywords (func=func@entry=0x7fffe8f30910, args=args@entry=0x1294ad8, nargs=nargs@entry=1, kwnames=kwnames@entry=0x7fffed36e110) at Objects/call.c:730
#28 0x00000000004eb312 in call_function (kwnames=0x7fffed36e110, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4575
#29 _PyEval_EvalFrameDefault (f=0x1294910, throwflag=<optimized out>) at Python/ceval.c:3215
#30 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1294910, throwflag=throwflag@entry=0) at Python/ceval.c:536
#31 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffed36c7c0, globals=globals@entry=0x7fffed3dae50, locals=locals@entry=0x0, args=args@entry=0x7ffff7fa4438, argcount=argcount@entry=1, kwnames=kwnames@entry=0x7fffe8f31100, kwargs=0x7fffe8f31108, kwcount=6, kwstep=2, defs=0x7fffed3742a8, defcount=3, kwdefs=0x0, closure=0x0, name=0x7ffff34a5248, qualname=0x7ffff34a5248) at Python/ceval.c:3951
#32 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffed37a310, args=args@entry=0x7ffff7fa4438, nargs=1, kwargs=kwargs@entry=0x7fffe8f24f30) at Objects/call.c:376
#33 0x00000000004335ca in PyObject_Call (callable=0x7fffed37a310, args=0x7ffff7fa4410, kwargs=0x7fffe8f24f30) at Objects/call.c:226
#34 0x00000000004dee12 in do_call_core (func=func@entry=0x7fffed37a310, callargs=callargs@entry=0x7ffff7fa4410, kwdict=kwdict@entry=0x7fffe8f24f30) at Python/ceval.c:4652
#35 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x12946b0, throwflag=<optimized out>) at Python/ceval.c:3267
#36 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x12946b0, throwflag=throwflag@entry=0) at Python/ceval.c:536
#37 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffed3657c0, globals=globals@entry=0x7fffed3dae50, locals=locals@entry=0x0, args=args@entry=0x7ffff6eb1f18, argcount=argcount@entry=1, kwnames=kwnames@entry=0x7fffe8f31078, kwargs=0x7fffe8f31080, kwcount=6, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x7fffed378120, name=0x7ffff34a5248, qualname=0x7ffff34a5248) at Python/ceval.c:3951
#38 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffed37a3c0, args=args@entry=0x7ffff6eb1f18, nargs=1, kwargs=kwargs@entry=0x7fffe9e5d750) at Objects/call.c:376
#39 0x00000000004335ca in PyObject_Call (callable=0x7fffed37a3c0, args=0x7ffff6eb1ef0, kwargs=0x7fffe9e5d750) at Objects/call.c:226
#40 0x00000000004dee12 in do_call_core (func=func@entry=0x7fffed37a3c0, callargs=callargs@entry=0x7ffff6eb1ef0, kwdict=kwdict@entry=0x7fffe9e5d750) at Python/ceval.c:4652
#41 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x7fffe8f40850, throwflag=<optimized out>) at Python/ceval.c:3267
#42 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x7fffe8f40850, throwflag=throwflag@entry=0) at Python/ceval.c:536
#43 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=0x7fffeb0df7c0, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x1293920, argcount=1, kwnames=0x0, kwargs=0x1293928, kwcount=0, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x7fffe9f0b2a8, name=0x7ffff7f281e0, qualname=0x7fffeb153d40) at Python/ceval.c:3951
#44 0x00000000004310a8 in _PyFunction_FastCallKeywords (func=func@entry=0x7fffe8f32940, stack=stack@entry=0x1293920, nargs=nargs@entry=1, kwnames=kwnames@entry=0x0) at Objects/call.c:433
#45 0x00000000004eaf60 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4623
#46 _PyEval_EvalFrameDefault (f=0x12936f0, throwflag=<optimized out>) at Python/ceval.c:3200
#47 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x12936f0, throwflag=throwflag@entry=0) at Python/ceval.c:536
#48 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=0x7fffeb0df880, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x1293410, argcount=3, kwnames=0x7fffec0834b0, kwargs=0x1293428, kwcount=4, kwstep=1, defs=0x7fffeb0deb40, defcount=4, kwdefs=0x0, closure=0x0, name=0x7fffed3b4da8, qualname=0x7fffeb0de400) at Python/ceval.c:3951
#49 0x00000000004310a8 in _PyFunction_FastCallKeywords (func=func@entry=0x7fffea4a5ec0, stack=stack@entry=0x1293410, nargs=nargs@entry=3, kwnames=kwnames@entry=0x7fffec083488) at Objects/call.c:433
#50 0x00000000004eb599 in call_function (kwnames=0x7fffec083488, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4623
#51 _PyEval_EvalFrameDefault (f=0x1293250, throwflag=<optimized out>) at Python/ceval.c:3215
#52 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1293250, throwflag=throwflag@entry=0) at Python/ceval.c:536
#53 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffec07ec40, globals=globals@entry=0x7fffec541a60, locals=locals@entry=0x0, args=args@entry=0x7fffffffd0d0, argcount=argcount@entry=1, kwnames=kwnames@entry=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x7fffec0812f8, defcount=5, kwdefs=0x0, closure=0x7fffeb101738, name=0x7ffff7f83588, qualname=0x7fffea4a44a0) at Python/ceval.c:3951
#54 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffea4a6f70, args=args@entry=0x7fffffffd0d0, nargs=nargs@entry=1, kwargs=kwargs@entry=0x7fffe8f308a0) at Objects/call.c:376
#55 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffea4a6f70, args=args@entry=0x7fffffffd0d0, nargs=nargs@entry=1, kwargs=kwargs@entry=0x7fffe8f308a0) at Objects/call.c:98
#56 0x00000000004325ee in _PyObject_Call_Prepend (callable=0x7fffea4a6f70, obj=0x7ffff7e52890, args=0x7ffff7fa5050, kwargs=0x7fffe8f308a0) at Objects/call.c:904
#57 0x00000000005b7bd4 in method_call (method=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/classobject.c:306
#58 0x000000000043364b in PyObject_Call (callable=0x7ffff7ed4d50, args=0x7ffff7fa5050, kwargs=0x7fffe8f308a0) at Objects/call.c:245
#59 0x00000000004dee12 in do_call_core (func=func@entry=0x7ffff7ed4d50, callargs=callargs@entry=0x7ffff7fa5050, kwdict=kwdict@entry=0x7fffe8f308a0) at Python/ceval.c:4652
#60 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x7fffe8f3e248, throwflag=<optimized out>) at Python/ceval.c:3267
#61 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x7fffe8f3e248, throwflag=throwflag@entry=0) at Python/ceval.c:536
#62 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffed3d0400, globals=globals@entry=0x7fffed3c2750, locals=locals@entry=0x0, args=args@entry=0x7fffffffd490, argcount=argcount@entry=2, kwnames=kwnames@entry=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x7fffed3c4dc0, qualname=0x7fffed3c3790) at Python/ceval.c:3951
#63 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffed3883c0, args=args@entry=0x7fffffffd490, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7fffee1bdfa0) at Objects/call.c:376
#64 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffed3883c0, args=args@entry=0x7fffffffd490, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7fffee1bdfa0) at Objects/call.c:98
#65 0x00000000004325ee in _PyObject_Call_Prepend (callable=0x7fffed3883c0, obj=0x7ffff7e52890, args=0x7ffff6ece0b0, kwargs=0x7fffee1bdfa0) at Objects/call.c:904
#66 0x00000000005b7bd4 in method_call (method=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/classobject.c:306
#67 0x000000000043364b in PyObject_Call (callable=0x7ffff7e30258, args=0x7ffff6ece0b0, kwargs=0x7fffee1bdfa0) at Objects/call.c:245
#68 0x00000000004dee12 in do_call_core (func=func@entry=0x7ffff7e30258, callargs=callargs@entry=0x7ffff6ece0b0, kwdict=kwdict@entry=0x7fffee1bdfa0) at Python/ceval.c:4652
#69 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x1292d00, throwflag=<optimized out>) at Python/ceval.c:3267
#70 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1292d00, throwflag=throwflag@entry=0) at Python/ceval.c:536
#71 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffed3d0e80, globals=globals@entry=0x7fffed3c2750, locals=locals@entry=0x0, args=args@entry=0x7fffffffd850, argcount=argcount@entry=2, kwnames=kwnames@entry=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x7fffed3cff90, qualname=0x7fffed3d61c0) at Python/ceval.c:3951
#72 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffed388470, args=args@entry=0x7fffffffd850, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7fffe8f30830) at Objects/call.c:376
#73 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffed388470, args=args@entry=0x7fffffffd850, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7fffe8f30830) at Objects/call.c:98
#74 0x00000000004325ee in _PyObject_Call_Prepend (callable=0x7fffed388470, obj=0x7ffff7e52890, args=0x7ffff7e52ef0, kwargs=0x7fffe8f30830) at Objects/call.c:904
#75 0x00000000005b7bd4 in method_call (method=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/classobject.c:306
#76 0x000000000043364b in PyObject_Call (callable=0x7ffff7f532c0, args=0x7ffff7e52ef0, kwargs=0x7fffe8f30830) at Objects/call.c:245
#77 0x00000000004dee12 in do_call_core (func=func@entry=0x7ffff7f532c0, callargs=callargs@entry=0x7ffff7e52ef0, kwdict=kwdict@entry=0x7fffe8f30830) at Python/ceval.c:4652
#78 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x1292ad0, throwflag=<optimized out>) at Python/ceval.c:3267
#79 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1292ad0, throwflag=throwflag@entry=0) at Python/ceval.c:536
#80 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=_co@entry=0x7fffeb159880, globals=globals@entry=0x7fffec541f30, locals=locals@entry=0x0, args=args@entry=0x7fffffffdc10, argcount=argcount@entry=2, kwnames=kwnames@entry=0x7ffff6ed4690, kwargs=0x7ffff6ed4698, kwcount=2, kwstep=2, defs=0x7fffeb0e60d8, defcount=1, kwdefs=0x0, closure=0x7fffeb0f0890, name=0x7fffed3cff90, qualname=0x7fffeb157b80) at Python/ceval.c:3951
#81 0x0000000000430df7 in _PyFunction_FastCallDict (func=func@entry=0x7fffea4a5520, args=args@entry=0x7fffffffdc10, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7ffff6ed26e0) at Objects/call.c:376
#82 0x00000000004322d9 in _PyObject_FastCallDict (callable=callable@entry=0x7fffea4a5520, args=args@entry=0x7fffffffdc10, nargs=nargs@entry=2, kwargs=kwargs@entry=0x7ffff6ed26e0) at Objects/call.c:98
#83 0x00000000004325ee in _PyObject_Call_Prepend (callable=0x7fffea4a5520, obj=0x7ffff7e52890, args=0x7ffff7e97fb0, kwargs=0x7ffff6ed26e0) at Objects/call.c:904
#84 0x00000000005b7bd4 in method_call (method=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at Objects/classobject.c:306
#85 0x000000000043364b in PyObject_Call (callable=0x7ffff7f3fce8, args=0x7ffff7e97fb0, kwargs=0x7ffff6ed26e0) at Objects/call.c:245
#86 0x00000000004dee12 in do_call_core (func=func@entry=0x7ffff7f3fce8, callargs=callargs@entry=0x7ffff7e97fb0, kwdict=kwdict@entry=0x7ffff6ed26e0) at Python/ceval.c:4652
#87 0x00000000004eba01 in _PyEval_EvalFrameDefault (f=0x1292880, throwflag=<optimized out>) at Python/ceval.c:3267
#88 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x1292880, throwflag=throwflag@entry=0) at Python/ceval.c:536
#89 0x00000000004e07ab in _PyEval_EvalCodeWithName (_co=0x7fffeb1597c0, globals=<optimized out>, locals=locals@entry=0x0, args=args@entry=0x9a7c90, argcount=2, kwnames=0x0, kwargs=0x9a7ca0, kwcount=0, kwstep=1, defs=0x7fffeb0e6078, defcount=1, kwdefs=0x0, closure=0x0, name=0x7fffed3cf510, qualname=0x7fffeb157a90) at Python/ceval.c:3951
#90 0x00000000004310a8 in _PyFunction_FastCallKeywords (func=func@entry=0x7fffea4a5470, stack=stack@entry=0x9a7c90, nargs=nargs@entry=2, kwnames=kwnames@entry=0x0) at Objects/call.c:433
#91 0x00000000004ea4f5 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4623
#92 _PyEval_EvalFrameDefault (f=0x9a7b10, throwflag=<optimized out>) at Python/ceval.c:3169
#93 0x00000000004dfd63 in PyEval_EvalFrameEx (f=f@entry=0x9a7b10, throwflag=throwflag@entry=0) at Python/ceval.c:536
#94 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
#95 0x00000000004e09a4 in PyEval_EvalCodeEx (_co=_co@entry=0x7ffff7e9a640, globals=globals@entry=0x7ffff7eb3fa0, locals=locals@entry=0x7ffff7eb3fa0, 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
#96 0x00000000004e09cd in PyEval_EvalCode (co=co@entry=0x7ffff7e9a640, globals=globals@entry=0x7ffff7eb3fa0, locals=locals@entry=0x7ffff7eb3fa0) at Python/ceval.c:513
#97 0x0000000000521840 in run_mod (mod=mod@entry=0x9bc540, filename=filename@entry=0x7ffff6ed4110, globals=globals@entry=0x7ffff7eb3fa0, locals=locals@entry=0x7ffff7eb3fa0, flags=flags@entry=0x7fffffffe360, arena=arena@entry=0x7ffff7e88040) at Python/pythonrun.c:1031
#98 0x000000000052448a in PyRun_FileExFlags (fp=fp@entry=0x9ba2e0, filename_str=filename_str@entry=0x7ffff7e983e0 "foo.py", start=start@entry=257, globals=globals@entry=0x7ffff7eb3fa0, locals=locals@entry=0x7ffff7eb3fa0, closeit=closeit@entry=1, flags=0x7fffffffe360) at Python/pythonrun.c:984
#99 0x000000000052481f in PyRun_SimpleFileExFlags (fp=fp@entry=0x9ba2e0, filename=<optimized out>, filename@entry=0x7ffff7e983e0 "foo.py", closeit=closeit@entry=1, flags=flags@entry=0x7fffffffe360) at Python/pythonrun.c:425
#100 0x00000000005249db in PyRun_AnyFileExFlags (fp=fp@entry=0x9ba2e0, filename=0x7ffff7e983e0 "foo.py", closeit=closeit@entry=1, flags=flags@entry=0x7fffffffe360) at Python/pythonrun.c:84
#101 0x0000000000420c3b in pymain_run_file (pymain=pymain@entry=0x7fffffffe3c0, config=config@entry=0x9483a8, cf=cf@entry=0x7fffffffe360) at Modules/main.c:1159
#102 0x0000000000421146 in pymain_run_python (pymain=pymain@entry=0x7fffffffe3c0, interp=0x948320) at Modules/main.c:1607
#103 0x0000000000422da0 in pymain_main (pymain=pymain@entry=0x7fffffffe3c0) at Modules/main.c:1755
#104 0x0000000000422e74 in _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:1792
#105 0x000000000041f96f in main (argc=<optimized out>, argv=<optimized out>) at ./Programs/python.c:15



Thanks
msg325420 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-15 03:43
Copying my GitHub comment here : 

If I have only D or no D then there is no segfault. It occurs when I have either A, D or B, D, or C, D.

**Leaving out column D**

```python
from pandas import DataFrame
import pandas as pd

df = DataFrame({'A': [1, 2, 3],
                'B': [1., 2., 3.],
                'C': ['foo', 'bar', 'baz'],
                #'D': pd.date_range('20130101', periods=3)
})

print(df.agg('sum'))
```

**output**

```
A            6
B            6
C    foobarbaz
dtype: object
```

**Only with Column D**

```python
from pandas import DataFrame
import pandas as pd

df = DataFrame({'D': pd.date_range('20130101', periods=3)})

print(df.agg('sum'))
```

**output**

```
Series([], dtype: float64)
```

Thanks
msg325558 - (view) Author: Vladimir Matveev (v2m) * Date: 2018-09-17 17:20
somewhat shortened repro that fails with the same error on master:
```
import pandas
import numpy

now = pandas.Timestamp.now()
arr = numpy.array([ ['a', now] for i in range(0, 3)])
arr.sum(0)
```
msg325561 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-17 18:29
Pandas issue that contains other segfaults : https://github.com/pandas-dev/pandas/issues/22714

Thanks
msg354721 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-10-15 13:00
This has an issue in GitHub and pandas is also tested with 3.8 from https://github.com/pandas-dev/pandas/pull/28730. I am closing this as third party.
History
Date User Action Args
2022-04-11 14:59:05adminsetgithub: 78869
2019-10-15 13:00:12xtreaksetstatus: open -> closed
resolution: third party
messages: + msg354721

stage: resolved
2018-09-17 18:29:56xtreaksetmessages: + msg325561
2018-09-17 17:20:25v2msetnosy: + v2m
messages: + msg325558
2018-09-15 03:43:58xtreaksetmessages: + msg325420
2018-09-14 19:52:29xtreakcreate