Segmentation fault in HP-UX.
Created originally on Bitbucket by dumol
Hi,
And thank you for CFFI!
I get segmentation faults trying to run PyCryptodome's suite of self tests on HP-UX Itanium. They seem to be related to CFFI.
At first I've tried latest stable release of libffi
(3.2.1) with latest stable release of cffi
(1.11.5). As per your documentation I've also tried an updated libffi
, below backtrace is for libffi 3.3-rc0 and latest cffi
from master (rev 68933f0ea99a
):
-bash-4.4$ ./build/python2.7-hpux1131-ia64/bin/python -m Crypto.SelfTest
Segmentation fault (core dumped)
-bash-4.4$
-bash-4.4$ gdb build/python2.7-hpux1131-ia64/bin/python core
HP gdb 6.3 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2011 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.3 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `python'.
Program terminated with signal 11, Segmentation fault.
SEGV_MAPERR - Address not mapped to object
#0 0x60000000c40607b0:0 in ffi_call_unix+0x1d0 ()
from /srv/buildslave/runtime/build-hpux1131-ia64/slave/python-package-hpux-dev/build/build/python2.7-hpux1131-ia64/lib/python2.7/site-packages/cffi-1.12.0-py2.7-hp-ux-B.11.31-ia64.egg/_cffi_backend.so
(gdb) bt
#0 0x60000000c40607b0:0 in ffi_call_unix+0x1d0 ()
from /srv/buildslave/runtime/build-hpux1131-ia64/slave/python-package-hpux-dev/build/build/python2.7-hpux1131-ia64/lib/python2.7/site-packages/cffi-1.12.0-py2.7-hp-ux-B.11.31-ia64.egg/_cffi_backend.so
#1 0x60000000c405f6c0:0 in ffi_call+0x540 ()
from /srv/buildslave/runtime/build-hpux1131-ia64/slave/python-package-hpux-dev/build/build/python2.7-hpux1131-ia64/lib/python2.7/site-packages/cffi-1.12.0-py2.7-hp-ux-B.11.31-ia64.egg/_cffi_backend.so
#2 0x60000000c401c4f0:0 in cdata_call (kwds=<not available>)
at c/_cffi_backend.c:3031
#3 0x40f57f0:0 in PyObject_Call (func=<not available>, arg=<not available>,
kw=<not available>) at Objects/abstract.c:2547
#4 0x42913a0:0 in do_call (func=0x200000007ecb00e0, pp_stack=<not available>,
na=<not available>, nk=<not available>) at Python/ceval.c:4584
#5 0x428d0e0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
#6 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ec9d498,
throwflag=<not available>) at Python/ceval.c:3009
#7 0x4290e70:0 in fast_function (func=<not available>,
pp_stack=<not available>, n=<not available>, na=<not available>,
nk=<not available>) at Python/ceval.c:4457
#8 0x428d0c0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
---Type <return> to continue, or q <return> to quit---
#9 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ec9d320,
throwflag=<not available>) at Python/ceval.c:3009
#10 0x4290e70:0 in fast_function (func=<not available>,
pp_stack=<not available>, n=<not available>, na=<not available>,
nk=<not available>) at Python/ceval.c:4457
#11 0x428d0c0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
#12 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ec9e030,
throwflag=<not available>) at Python/ceval.c:3009
#13 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#14 0x4276740:0 in PyEval_EvalCode (co=<not available>,
globals=<not available>, locals=<not available>) at Python/ceval.c:669
#15 0x42cb4c0:0 in PyImport_ExecCodeModuleEx (
name=0x2000000040124670 "Crypto.Cipher._mode_gcm", co=<not available>,
pathname=<not available>) at Python/import.c:731
#16 0x42cd510:0 in load_source_module (name=<not available>,
pathname=<not available>, fp=<not available>) at Python/import.c:1121
#17 0x42cfb40:0 in load_module (name=<not available>, fp=<not available>,
pathname=<not available>, type=<not available>, loader=<not available>)
at Python/import.c:1972
---Type <return> to continue, or q <return> to quit---
#18 0x42d5780:0 in import_submodule (mod=0x200000007edf9570,
subname=0x200000004012467e "_mode_gcm",
fullname=0x2000000040124670 "Crypto.Cipher._mode_gcm")
at Python/import.c:2725
#19 0x42d45f0:0 in load_next (mod=<not available>, altmod=0x200000007edf9570,
p_name=<not available>, buf=0x2000000040124670 "Crypto.Cipher._mode_gcm",
p_buflen=<not available>) at Python/import.c:2539
#20 0x42d2f30:0 in import_module_level (name=0x0, globals=<not available>,
fromlist=0x200000007edf9970, level=<not available>) at Python/import.c:2256
#21 0x42d5390:0 in PyImport_ImportModuleLevel (name=<not available>,
globals=<not available>, locals=<not available>, fromlist=<not available>,
level=<not available>) at Python/import.c:2312
#22 0x4264d90:0 in builtin___import__ (args=<not available>,
kwds=<not available>) at Python/bltinmodule.c:46
#23 0x43c17d0:0 in PyCFunction_Call (func=<not available>,
arg=<not available>, kw=<not available>) at Objects/methodobject.c:116
#24 0x40f57f0:0 in PyObject_Call (func=<not available>, arg=<not available>,
kw=<not available>) at Objects/abstract.c:2547
#25 0x42895c0:0 in PyEval_CallObjectWithKeywords (func=<not available>,
arg=<not available>, kw=<not available>) at Python/ceval.c:4234
#26 0x4284e70:0 in PyEval_EvalFrameEx (f=0x200000007ecefa50,
throwflag=<not available>) at Python/ceval.c:2643
#27 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
---Type <return> to continue, or q <return> to quit---
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#28 0x4276740:0 in PyEval_EvalCode (co=<not available>,
globals=<not available>, locals=<not available>) at Python/ceval.c:669
#29 0x42cb4c0:0 in PyImport_ExecCodeModuleEx (
name=0x2000000040123a10 "Crypto.Cipher", co=<not available>,
pathname=<not available>) at Python/import.c:731
#30 0x42cd510:0 in load_source_module (name=<not available>,
pathname=<not available>, fp=<not available>) at Python/import.c:1121
#31 0x42cfb40:0 in load_module (name=<not available>, fp=<not available>,
pathname=<not available>, type=<not available>, loader=<not available>)
at Python/import.c:1972
#32 0x42cdce0:0 in load_package (name=<not available>,
pathname=<not available>) at Python/import.c:1188
#33 0x42cfa40:0 in load_module (name=<not available>, fp=<not available>,
pathname=<not available>, type=<not available>, loader=<not available>)
at Python/import.c:1943
#34 0x42d5780:0 in import_submodule (mod=0x200000007ee70e30,
subname=0x2000000040123a17 "Cipher",
fullname=0x2000000040123a10 "Crypto.Cipher") at Python/import.c:2725
#35 0x42d45f0:0 in load_next (mod=<not available>, altmod=0x200000007ee70e30,
p_name=<not available>, buf=0x2000000040123a10 "Crypto.Cipher",
---Type <return> to continue, or q <return> to quit---
p_buflen=<not available>) at Python/import.c:2539
#36 0x42d2f30:0 in import_module_level (name=0x0, globals=<not available>,
fromlist=0x200000007edd5ef0, level=<not available>) at Python/import.c:2256
#37 0x42d5390:0 in PyImport_ImportModuleLevel (name=<not available>,
globals=<not available>, locals=<not available>, fromlist=<not available>,
level=<not available>) at Python/import.c:2312
#38 0x4264d90:0 in builtin___import__ (args=<not available>,
kwds=<not available>) at Python/bltinmodule.c:46
#39 0x43c17d0:0 in PyCFunction_Call (func=<not available>,
arg=<not available>, kw=<not available>) at Objects/methodobject.c:116
#40 0x40f57f0:0 in PyObject_Call (func=<not available>, arg=<not available>,
kw=<not available>) at Objects/abstract.c:2547
#41 0x42895c0:0 in PyEval_CallObjectWithKeywords (func=<not available>,
arg=<not available>, kw=<not available>) at Python/ceval.c:4234
#42 0x4284e70:0 in PyEval_EvalFrameEx (f=0x2000000040123290,
throwflag=<not available>) at Python/ceval.c:2643
#43 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#44 0x4276740:0 in PyEval_EvalCode (co=<not available>,
globals=<not available>, locals=<not available>) at Python/ceval.c:669
#45 0x42cb4c0:0 in PyImport_ExecCodeModuleEx (
---Type <return> to continue, or q <return> to quit---
name=0x20000000400b9da0 "Crypto.SelfTest.Cipher.test_AES",
co=<not available>, pathname=<not available>) at Python/import.c:731
#46 0x42cd510:0 in load_source_module (name=<not available>,
pathname=<not available>, fp=<not available>) at Python/import.c:1121
#47 0x42cfb40:0 in load_module (name=<not available>, fp=<not available>,
pathname=<not available>, type=<not available>, loader=<not available>)
at Python/import.c:1972
#48 0x42d5780:0 in import_submodule (mod=0x200000007edd5990,
subname=0x200000007edd5a54 "test_AES",
fullname=0x20000000400b9da0 "Crypto.SelfTest.Cipher.test_AES")
at Python/import.c:2725
#49 0x42d4f10:0 in ensure_fromlist (mod=0x200000007edd5990,
fromlist=0x200000007edd5a10,
buf=0x20000000400b9da0 "Crypto.SelfTest.Cipher.test_AES", buflen=22,
recursive=0) at Python/import.c:2631
#50 0x42d30a0:0 in import_module_level (name=0x0, globals=<not available>,
fromlist=<not available>, level=<not available>) at Python/import.c:2293
#51 0x42d5390:0 in PyImport_ImportModuleLevel (name=<not available>,
globals=<not available>, locals=<not available>, fromlist=<not available>,
level=<not available>) at Python/import.c:2312
#52 0x4264d90:0 in builtin___import__ (args=<not available>,
kwds=<not available>) at Python/bltinmodule.c:46
#53 0x43c17d0:0 in PyCFunction_Call (func=<not available>,
---Type <return> to continue, or q <return> to quit---
arg=<not available>, kw=<not available>) at Objects/methodobject.c:116
#54 0x40f57f0:0 in PyObject_Call (func=<not available>, arg=<not available>,
kw=<not available>) at Objects/abstract.c:2547
#55 0x42895c0:0 in PyEval_CallObjectWithKeywords (func=<not available>,
arg=<not available>, kw=<not available>) at Python/ceval.c:4234
#56 0x4284e70:0 in PyEval_EvalFrameEx (f=0x200000007ee353a0,
throwflag=<not available>) at Python/ceval.c:2643
#57 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#58 0x42909e0:0 in fast_function (func=<not available>,
pp_stack=<not available>, n=<not available>, na=<not available>,
nk=<not available>) at Python/ceval.c:4465
#59 0x428d0c0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
#60 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ee22340,
throwflag=<not available>) at Python/ceval.c:3009
#61 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#62 0x42909e0:0 in fast_function (func=<not available>,
---Type <return> to continue, or q <return> to quit---
pp_stack=<not available>, n=<not available>, na=<not available>,
nk=<not available>) at Python/ceval.c:4465
#63 0x428d0c0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
#64 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ef58930,
throwflag=<not available>) at Python/ceval.c:3009
#65 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#66 0x42909e0:0 in fast_function (func=<not available>,
pp_stack=<not available>, n=<not available>, na=<not available>,
nk=<not available>) at Python/ceval.c:4465
#67 0x428d0c0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
#68 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ee1d468,
throwflag=<not available>) at Python/ceval.c:3009
#69 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#70 0x4276740:0 in PyEval_EvalCode (co=<not available>,
globals=<not available>, locals=<not available>) at Python/ceval.c:669
---Type <return> to continue, or q <return> to quit---
#71 0x428a870:0 in exec_statement (f=0x200000007eeb9e40, prog=<not available>,
globals=<not available>, locals=<not available>) at Python/ceval.c:5090
#72 0x427ded0:0 in PyEval_EvalFrameEx (f=0x200000007eeb9e40,
throwflag=<not available>) at Python/ceval.c:2118
#73 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#74 0x42909e0:0 in fast_function (func=<not available>,
pp_stack=<not available>, n=<not available>, na=<not available>,
nk=<not available>) at Python/ceval.c:4465
#75 0x428d0c0:0 in call_function (pp_stack=<not available>,
oparg=<not available>) at Python/ceval.c:4391
#76 0x42800c0:0 in PyEval_EvalFrameEx (f=0x200000007ee70b60,
throwflag=<not available>) at Python/ceval.c:3009
#77 0x4277860:0 in PyEval_EvalCodeEx (locals=<not available>,
args=<not available>, argcount=<not available>, kws=<not available>,
kwcount=<not available>, defs=<not available>, defcount=<not available>,
closure=<not available>) at Python/ceval.c:3592
#78 0x43b8700:0 in function_call (func=<not available>, arg=<not available>,
kw=<not available>) at Objects/funcobject.c:523
#79 0x40f57f0:0 in PyObject_Call (func=<not available>, arg=<not available>,
kw=<not available>) at Objects/abstract.c:2547
---Type <return> to continue, or q <return> to quit---
#80 0x40d2dc0:0 in RunModule (module=<not available>,
set_argv0=<not available>) at Modules/main.c:197
#81 0x40d4590:0 in Py_Main (argc=<not available>, argv=<not available>)
at Modules/main.c:592
#82 0x40d26d0:0 in main (argc=<not available>, argv=<not available>)
at ./Modules/python.c:20
If you have the hardware, you should be able to reproduce this issue with the 5017-hpux-cffi-crash
branch from https://github.com/chevah/python-package/ by running:
./chevah_build build
./chevah_build test