Bug 250968 - lang/python37: Python 3.7.9 dumps core repeatedly on r367349 riscv64
Summary: lang/python37: Python 3.7.9 dumps core repeatedly on r367349 riscv64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: riscv Any
: --- Affects Some People
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-08 21:29 UTC by Dennis Clarke
Modified: 2021-01-04 16:42 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (python)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Clarke 2020-11-08 21:29:13 UTC
The machine doines testing was a QEMU instance : 

ijiraq# 
ijiraq# uname -apKU
FreeBSD ijiraq 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r367349: Wed Nov  4 22:48:25 UTC 2020     root@FreeBSD-head-riscv64-build.jail.ci.FreeBSD.org:/usr/obj/usr/src/riscv.riscv64/sys/QEMU  riscv riscv64 1300125 1300125
ijiraq# 

Bootable image and kernel are from :

    https://artifact.ci.freebsd.org/snapshot/head/r367349/riscv/riscv64/


Originally I was trying to build subversion from ports but a dependency
seems to be devel/py-setuptools wherein I see : 

ijiraq# pid 57234 (python3.7), jid 0, uid 0: exited on signal 6 (core dumped)

During this : 

ijiraq# cd /usr/ports/devel/py-setuptools
ijiraq# ls 
distinfo        files           Makefile        pkg-descr       work-py37
ijiraq# 
ijiraq# make config 
===> No options to configure
ijiraq# 
ijiraq# make 
===>   py37-setuptools-44.0.0 depends on file: /usr/local/bin/python3.7 - found
===>  Configuring for py37-setuptools-44.0.0
*** Signal 6

Stop.
make: stopped in /usr/ports/devel/py-setuptools
ijiraq# 

I attached the core file.  At this time I have no debugger and no way
to inspect it. 


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
Comment 1 Dennis Clarke 2020-11-08 21:33:53 UTC
I can not add the core file as even compressed with xz it is 1.8MB in size.

Therefore it may be found at : 

    https://beta.genunix.com/riscv/core/work-py37_setuptools-44.0.0_python3.7.core.xz

Also the SHA512 hash data is there for both the compressed and the 
decompressed core file.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2020-11-13 02:03:24 UTC
^Triage: give this a better Summary.

To submitter: I doubt that the Python team knows much about RISC-V at this time (nor do most other ports maintainers :-) )  So this is probably going to have to be solved by someone with knowledge of the architecture.
Comment 3 Dennis Clarke 2020-11-13 17:12:18 UTC
(In reply to Mark Linimon from comment #2)

Thank you and oh yes indeed I know that I have wandered well and truely
away from anything that smells tier 1 or even tier 2.  For the sake of
being detailed I will post the backtrace here and then move along to
bother the upstream Python people who will likely tell me to go pound
sand. As they usually do.

Looking in /usr/ports/devel/py-setuptools here : 

ijiraq#
ijiraq# uname -apKU
FreeBSD ijiraq 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r367349: Wed Nov  4 22:48:25 UTC 2020     root@FreeBSD-head-riscv64-build.jail.ci.FreeBSD.org:/usr/obj/usr/src/riscv.riscv64/sys/QEMU  riscv riscv64 1300125 1300125
ijiraq#
ijiraq#
ijiraq# gdb /usr/local/bin/python3.7 ./work-py37/setuptools-44.0.0/python3.7.core
GNU gdb (GDB) 9.2 [GDB v9.2 for FreeBSD]
Copyright (C) 2020 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 "riscv64-portbld-freebsd13.0".
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 /usr/local/bin/python3.7...
(No debugging symbols found in /usr/local/bin/python3.7)
[New LWP 100860]
Core was generated by `/usr/local/bin/python3.7 setup.py config'.
Program terminated with signal SIGABRT, Aborted.
#0  thr_kill () at thr_kill.S:4
4       thr_kill.S: No such file or directory.
warning: File "/usr/local/lib/libpython3.7m.so.1.0-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 /usr/local/lib/libpython3.7m.so.1.0-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/root/.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) where 
#0  thr_kill () at thr_kill.S:4
#1  0x000000004045ec18 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x00000000404f586e in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x0000000042260198 in ?? () from /usr/local/lib/libffi.so.7
#4  0x000000004226018c in ?? () from /usr/local/lib/libffi.so.7
#5  0x000000004225f81a in ffi_prep_closure_loc () from /usr/local/lib/libffi.so.7
#6  0x000000004224d770 in _ctypes_alloc_callback () from /usr/local/lib/python3.7/lib-dynload/_ctypes.so
#7  0x0000000042249470 in ?? () from /usr/local/lib/python3.7/lib-dynload/_ctypes.so
#8  0x000000004018c2f4 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#9  0x000000004014a90c in _PyObject_FastCallKeywords () from /usr/local/lib/libpython3.7m.so.1.0
#10 0x00000000401eeb98 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#11 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#12 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#13 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#14 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#15 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#16 0x00000000401e8f80 in PyEval_EvalCode () from /usr/local/lib/libpython3.7m.so.1.0
#17 0x00000000401e6976 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#18 0x000000004014b0f4 in _PyMethodDef_RawFastCallDict () from /usr/local/lib/libpython3.7m.so.1.0
#19 0x000000004014acd6 in PyCFunction_Call () from /usr/local/lib/libpython3.7m.so.1.0
#20 0x00000000401eb43a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#21 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#22 0x000000004014aa98 in _PyFunction_FastCallKeywords () from /usr/local/lib/libpython3.7m.so.1.0
#23 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#24 0x00000000401ea68e in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#25 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#26 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#27 0x00000000401ea67c in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#28 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#29 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#30 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#31 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#32 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#33 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#34 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#35 0x000000004014bff4 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#36 0x000000004014c098 in _PyObject_CallMethodIdObjArgs () from /usr/local/lib/libpython3.7m.so.1.0
#37 0x0000000040207e70 in PyImport_ImportModuleLevelObject () from /usr/local/lib/libpython3.7m.so.1.0
#38 0x00000000401eb99a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#39 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#40 0x00000000401e8f80 in PyEval_EvalCode () from /usr/local/lib/libpython3.7m.so.1.0
#41 0x00000000401e6976 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
--Type <RET> for more, q to quit, c to continue without paging--
#42 0x000000004014b0f4 in _PyMethodDef_RawFastCallDict () from /usr/local/lib/libpython3.7m.so.1.0
#43 0x000000004014acd6 in PyCFunction_Call () from /usr/local/lib/libpython3.7m.so.1.0
#44 0x00000000401eb43a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#45 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#46 0x000000004014aa98 in _PyFunction_FastCallKeywords () from /usr/local/lib/libpython3.7m.so.1.0
#47 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#48 0x00000000401ea68e in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#49 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#50 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#51 0x00000000401ea67c in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#52 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#53 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#54 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#55 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#56 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#57 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#58 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#59 0x000000004014bff4 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#60 0x000000004014c098 in _PyObject_CallMethodIdObjArgs () from /usr/local/lib/libpython3.7m.so.1.0
#61 0x0000000040207e70 in PyImport_ImportModuleLevelObject () from /usr/local/lib/libpython3.7m.so.1.0
#62 0x00000000401e5e96 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#63 0x000000004014ad4c in PyCFunction_Call () from /usr/local/lib/libpython3.7m.so.1.0
#64 0x00000000401eb43a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#65 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#66 0x000000004014aa98 in _PyFunction_FastCallKeywords () from /usr/local/lib/libpython3.7m.so.1.0
#67 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#68 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#69 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#70 0x000000004014a5a4 in _PyFunction_FastCallDict () from /usr/local/lib/libpython3.7m.so.1.0
#71 0x000000004014bff4 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#72 0x000000004014c098 in _PyObject_CallMethodIdObjArgs () from /usr/local/lib/libpython3.7m.so.1.0
#73 0x0000000040207f40 in PyImport_ImportModuleLevelObject () from /usr/local/lib/libpython3.7m.so.1.0
#74 0x00000000401eb99a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#75 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#76 0x00000000401e8f80 in PyEval_EvalCode () from /usr/local/lib/libpython3.7m.so.1.0
#77 0x00000000401e6976 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#78 0x000000004014b0f4 in _PyMethodDef_RawFastCallDict () from /usr/local/lib/libpython3.7m.so.1.0
#79 0x000000004014acd6 in PyCFunction_Call () from /usr/local/lib/libpython3.7m.so.1.0
#80 0x00000000401eb43a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#81 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#82 0x000000004014aa98 in _PyFunction_FastCallKeywords () from /usr/local/lib/libpython3.7m.so.1.0
#83 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
--Type <RET> for more, q to quit, c to continue without paging--
#84 0x00000000401ea68e in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#85 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#86 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#87 0x00000000401ea67c in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#88 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#89 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#90 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#91 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#92 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#93 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#94 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#95 0x000000004014bff4 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#96 0x000000004014c098 in _PyObject_CallMethodIdObjArgs () from /usr/local/lib/libpython3.7m.so.1.0
#97 0x0000000040207e70 in PyImport_ImportModuleLevelObject () from /usr/local/lib/libpython3.7m.so.1.0
#98 0x00000000401eb99a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#99 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#100 0x00000000401e8f80 in PyEval_EvalCode () from /usr/local/lib/libpython3.7m.so.1.0
#101 0x00000000401e6976 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#102 0x000000004014b0f4 in _PyMethodDef_RawFastCallDict () from /usr/local/lib/libpython3.7m.so.1.0
#103 0x000000004014acd6 in PyCFunction_Call () from /usr/local/lib/libpython3.7m.so.1.0
#104 0x00000000401eb43a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#105 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#106 0x000000004014aa98 in _PyFunction_FastCallKeywords () from /usr/local/lib/libpython3.7m.so.1.0
#107 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#108 0x00000000401ea68e in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#109 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#110 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#111 0x00000000401ea67c in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#112 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#113 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#114 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#115 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#116 0x00000000401eecd2 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#117 0x00000000401eac76 in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#118 0x000000004014aeae in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#119 0x000000004014bff4 in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#120 0x000000004014c098 in _PyObject_CallMethodIdObjArgs () from /usr/local/lib/libpython3.7m.so.1.0
#121 0x0000000040207e70 in PyImport_ImportModuleLevelObject () from /usr/local/lib/libpython3.7m.so.1.0
#122 0x00000000401eb99a in _PyEval_EvalFrameDefault () from /usr/local/lib/libpython3.7m.so.1.0
#123 0x00000000401ef432 in _PyEval_EvalCodeWithName () from /usr/local/lib/libpython3.7m.so.1.0
#124 0x00000000401e8f80 in PyEval_EvalCode () from /usr/local/lib/libpython3.7m.so.1.0
#125 0x0000000040219c46 in PyRun_FileExFlags () from /usr/local/lib/libpython3.7m.so.1.0
--Type <RET> for more, q to quit, c to continue without paging--
#126 0x00000000402192f2 in PyRun_SimpleFileExFlags () from /usr/local/lib/libpython3.7m.so.1.0
#127 0x00000000402352bc in ?? () from /usr/local/lib/libpython3.7m.so.1.0
#128 0x000000004023597e in _Py_UnixMain () from /usr/local/lib/libpython3.7m.so.1.0
#129 0x000000000001171c in __start ()
Backtrace stopped: frame did not save the PC
(gdb) quit
ijiraq#


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
Comment 4 Mitchell Horne freebsd_committer 2021-01-04 16:42:14 UTC
The issue was caused by an intentional abort in libffi. A workaround has been applied, so this is now fixed. See Bug 251564.