classification
Title: A crash in do_richcompare
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, kuraga
Priority: normal Keywords:

Created on 2020-11-16 15:25 by kuraga, last changed 2020-11-18 09:20 by kuraga. This issue is now closed.

Files
File name Uploaded Description Edit
issue.zip kuraga, 2020-11-16 15:25 Code, data and crash log
Messages (4)
msg381113 - (view) Author: Alexander Kurakin (kuraga) Date: 2020-11-16 15:25
Sometimes test.py causes a crash in 3.7.9 (and lower to 2018 year or more) on Linux.

See also: https://github.com/pandas-dev/pandas/issues/21968
msg381130 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-11-16 17:30
The Pandas bug links to a traceback:

Program received signal SIGSEGV, Segmentation fault.
0x000055555589b0a0 in PyUnicode_Type ()
(gdb) bt
#0  0x000055555589b0a0 in PyUnicode_Type ()
#1  0x000055555567d8b3 in do_richcompare (op=2, w=0x7ffff77a4b20, v=0x7fffe73b57b0) at /tmp/build/80754af9/python_1598874792229/work/Objects/object.c:698
#2  PyObject_RichCompare (v=0x7fffe73b57b0, w=0x7ffff77a4b20, op=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/object.c:746
#3  0x000055555567d9c0 in PyObject_RichCompareBool (v=<optimized out>, w=<optimized out>, op=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/object.c:768
#4  0x00007fffe90713a7 in __pyx_f_6pandas_5_libs_9hashtable_17PyObjectHashTable_get_item () from /home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/hashtable.cpython-37m-x86_64-linux-gnu.so
#5  0x00007fffe90716ae in __pyx_pw_6pandas_5_libs_9hashtable_17PyObjectHashTable_11get_item () from /home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/hashtable.cpython-37m-x86_64-linux-gnu.so
#6  0x00007fffe849aff4 in __Pyx_PyObject_CallOneArg () from /home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/index.cpython-37m-x86_64-linux-gnu.so
#7  0x00007fffe84e6740 in __pyx_f_6pandas_5_libs_5index_11IndexEngine_get_loc () from /home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/index.cpython-37m-x86_64-linux-gnu.so
#8  0x00007fffe84e75ce in __pyx_pw_6pandas_5_libs_5index_11IndexEngine_5get_loc () from /home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/index.cpython-37m-x86_64-linux-gnu.so
#9  0x00005555556b972d in _PyMethodDef_RawFastCallKeywords (method=0x7fffe84fd9c0 <__pyx_methods_6pandas_5_libs_5index_IndexEngine>, self=0x7fffe734d830, args=0x555556158448, nargs=<optimized out>, kwnames=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:647
#10 0x00005555556c07af in _PyMethodDescr_FastCallKeywords (descrobj=0x7fffe8530b90, args=0x555556158440, nargs=2, kwnames=0x0) at /tmp/build/80754af9/python_1598874792229/work/Objects/descrobject.c:288
#11 0x0000555555725c7c in call_function (kwnames=0x0, oparg=2, pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4593
#12 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3110
#13 0x0000555555668829 in _PyEval_EvalCodeWithName (_co=0x7fffe85038a0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x555556150f30, kwcount=0, kwstep=1, 
    defs=0x7fffe85221a8, defcount=2, kwdefs=0x0, closure=0x0, name=0x7fffe86303f0, qualname=0x7fffe85055b0) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3930
#14 0x00005555556b90a5 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x555556150f20, nargs=2, kwnames=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:433
#15 0x0000555555721740 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4616
#16 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3110
#17 0x0000555555668829 in _PyEval_EvalCodeWithName (_co=0x7fffe7e13b70, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x7fffe7e863d8, kwargs=0x7fffe73503e8, kwcount=2, kwstep=1,


The problem is probably a bug in Pandas or another C extension. The stacktrace does not contain enough information to see the type and value of v and w.
msg381142 - (view) Author: Alexander Kurakin (kuraga) Date: 2020-11-16 18:58
Thanks for reply!

Is it call of NULL? If so, shoudn't do_richcompare check it?
msg381319 - (view) Author: Alexander Kurakin (kuraga) Date: 2020-11-18 09:20
Ok, close.
History
Date User Action Args
2020-11-18 09:20:37kuragasetstatus: open -> closed

messages: + msg381319
stage: resolved
2020-11-16 18:58:00kuragasetmessages: + msg381142
2020-11-16 17:30:46christian.heimessetnosy: + christian.heimes
messages: + msg381130
2020-11-16 15:25:17kuragacreate