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: BUILD: AIX-64-bit segmentation fault using xlc-v11
Type: crash Stage:
Components: Build Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt, kadler
Priority: normal Keywords:

Created on 2020-11-10 11:44 by Michael.Felt, last changed 2022-04-11 14:59 by admin.

Messages (6)
msg380654 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-11-10 11:44
Successfully built and packaged the Python-3.9.0 distribution tar archive without modification - as 32-bit.

Repeating the same process with the following environment change:

 # export OBJECT_MODE=64

fails with a segmentation fault by the "first-phase" python executable:

```
        ../src/py39-3.9.0/Modules/makexp_aix Modules/python.exp "." libpython3.9.a
         xlc_r     -Wl,-bE:Modules/python.exp -lld -o python Programs/python.o libpython3.9.a -lintl -ldl  -lm   -lm
         ./python -E -S -m sysconfig --generate-posix-vars ; if test $? -ne 0 ; then  echo "generate-posix-vars failed" ;  rm -f ./pybuilddir.txt ;  exit 1 ;  fi
/bin/sh: 6291700 Segmentation fault(coredump)
make: 1254-004 The error code from the last command is 139.


Stop.
root@x066:[/data/prj/python/py39-3.9.0]./python -E -S -m sysconfig --generate-posix-vars
Segmentation fault(coredump)
root@x066:[/data/prj/python/py39-3.9.0]./python
Segmentation fault(coredump)
```

Will try to duplicate in a second environment.
msg380693 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-11-10 18:14
On a different server, different compiler (xlc-v13, mine is xlc-v11) it gets past this point.

So, perhaps it is a compiler issue.

As the second system is missing many 64-bit libraries - still cannot build 64-bit Python-3.9.

Low priority - imho.
msg380951 - (view) Author: Kevin (kadler) * Date: 2020-11-14 01:33
I have not encountered this problem when building Python 3.10 on AIX and PASE with GCC 6.3.
msg381094 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-11-16 12:42
Added "using xlc" to description.

When I have a system that has 64-bit support for gcc - I'll verify that it works, or does not work, for me using gcc.
msg381104 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-11-16 15:04
For now, I am going to suggest closing this - as a bug in the xlc-v11 compiler - and not worth researching.

I am able to build the 3.9 distribution as well as the 3.10 master using the xlC-v13-1.3.2 (Try and Buy) version.

Thanks for thinking together!
msg384511 - (view) Author: Michael Felt (Michael.Felt) * Date: 2021-01-06 16:41
OK - looking at this again.

This looks very similiar to another 'coredump' issue (will have to look for the number later). iirc, when something called 'pgen', or similiar was modified.

Here is a lengthy `dbx` dump.

If I am reading this correctly, it is 'starting' in this area:

_PyPegen_run_parser(p = 0x0fffffffffffcb40), line 1121 in "pegen.c"
_PyPegen_run_parser_from_string(str = "compile", start_rule = 1, filename_ob = 0x00000001100ee2b0, flags = 0x070000000007fb30, arena = 0x07000000000d3330), line 1250 in "pegen.c"
PyPegen_ASTFromStringObject(str = warning: Unable to access address 0x15d4 from core
(invalid char ptr (0x00000000000015d4)), filename = (nil), mode = 268435455, flags = 0x482448c200000000, arena = 0x00000001001a1e3c), line 27 in "peg_api.c"
Py_CompileStringObject(str = "", filename = (nil), start = 268435455, flags = 0x070000000007fb30, optimize = 268435455), line 1274 in "pythonrun.c"
builtin_compile_impl(module = 0x0000000100077a0c, source = (nil), filename = 0x0000000110000e28, mode = "", flags = 1, dont_inherit = 1, optimize = 0, feature_version = 0), line 819 in "bltinmodule.c"
builtin_compile(module = (nil), args = 0x00000001100741c0, nargs = 2, kwnames = 0x07000000000068f0), line 274 in "bltinmodule.c.h"
cfunction_vectorcall_FASTCALL_KEYWORDS(func = 0x0fffffffffffd030, args = 0x0000000000001300, nargsf = 0, kwnames = 0x0000000000000008), line 457 in "methodobject.c"


Here is the complete 'where' status:

(dbx) where
strncmp.strncmp(??, ??, ??) at 0x90000000001b3a0
_get_keyword_or_name_type(p = 0x0000000000000020, name = (nil), name_len = 0), line 535 in "pegen.c"
_PyPegen_fill_token(p = 0x00000001001be088), line 638 in "pegen.c"
_PyPegen_is_memoized(p = 0x0000000000000020, type = 0, pres = 0x0fffffffffffc370), line 716 in "pegen.c"
dotted_name_rule(p = 0x0fffffffffffc400), line 3443 in "parse.c"
dotted_as_name_rule@AF452_298(??), line 3410 in "parse.c"
_gather_36_rule@AF453_127(??), line 17755 in "parse.c"
dotted_as_names_rule@AF454_299(??), line 3368 in "parse.c"
import_name_rule(p = 0x0fffffffffffc660), line 3000 in "parse.c"
import_stmt_rule@AF462_305(??), line 2932 in "parse.c"
small_stmt_rule(p = 0x0fffffffffffc7a0), line 1606 in "parse.c"
unnamed block in simple_stmt_rule(p = 0x00000001000df758), line 1428 in "parse.c"
simple_stmt_rule(p = 0x00000001000df758), line 1428 in "parse.c"
unnamed block in statement_rule(p = 0x00000000000015d5), line 1262 in "parse.c"
statement_rule(p = 0x00000000000015d5), line 1262 in "parse.c"
_loop1_11_rule(p = 0x00000001000df6d4), line 16254 in "parse.c"
statements_rule@AF475_318(??), line 1197 in "parse.c"
file_rule@AF476_324(??), line 730 in "parse.c"
_PyPegen_run_parser(p = 0x0fffffffffffcb40), line 1121 in "pegen.c"
_PyPegen_run_parser_from_string(str = "compile", start_rule = 1, filename_ob = 0x00000001100ee2b0, flags = 0x070000000007fb30, arena = 0x07000000000d3330), line 1250 in "pegen.c"
PyPegen_ASTFromStringObject(str = warning: Unable to access address 0x15d4 from core
(invalid char ptr (0x00000000000015d4)), filename = (nil), mode = 268435455, flags = 0x482448c200000000, arena = 0x00000001001a1e3c), line 27 in "peg_api.c"
Py_CompileStringObject(str = "", filename = (nil), start = 268435455, flags = 0x070000000007fb30, optimize = 268435455), line 1274 in "pythonrun.c"
builtin_compile_impl(module = 0x0000000100077a0c, source = (nil), filename = 0x0000000110000e28, mode = "", flags = 1, dont_inherit = 1, optimize = 0, feature_version = 0), line 819 in "bltinmodule.c"
builtin_compile(module = (nil), args = 0x00000001100741c0, nargs = 2, kwnames = 0x07000000000068f0), line 274 in "bltinmodule.c.h"
cfunction_vectorcall_FASTCALL_KEYWORDS(func = 0x0fffffffffffd030, args = 0x0000000000001300, nargsf = 0, kwnames = 0x0000000000000008), line 457 in "methodobject.c"
PyVectorcall_Call(callable = 0x0fffffffffffd0c0, tuple = 0x07000000000b9900, kwargs = 0x07000000000bf1c8), line 257 in "call.c"
do_call_core(tstate = 0x0000000000000001, func = 0x0000000000000002, callargs = 0x0000000000000001, kwdict = 0x00000001100741c0), line 5092 in "ceval.c"
_PyEval_EvalFrameDefault(tstate = 0x0fffffffffffd370, f = 0x07000000000aced8, throwflag = 1), line 3580 in "ceval.c"
_PyEval_EvalCode(tstate = 0x9f63fdf1699118db, _co = 0x070000000004ed80, globals = 0x07000000000754c0, locals = 0x0700000000051070, args = 0x0fffffffffffd4a0, argcount = 4765972565237396600, kwnames = 0x00000001000bb5e4, kwargs = 0x07000000000683b0, kwcount = 2, kwstep = 0, defs = (nil), defcount = 0, kwdefs = (nil), closure = (nil), name = 0x0700000000055ad0, qualname = 0x0700000000055ad0), line 40 in "pycore_ceval.h"
_PyFunction_Vectorcall(func = 0x0fffffffffffd560, stack = 0x00000001100aefa8, nargsf = 1152921504606836064, kwnames = 0x07000000000b70f0), line 413 in "call.c"
_PyEval_EvalFrameDefault(tstate = 0x000000010001c9c4, f = 0xffffffff000b99c0, throwflag = 268435455), line 621 in "abstract.h"
_PyEval_EvalCode(tstate = 0x07000000000abd00, _co = 0x0700000000080870, globals = 0x0fffffffffffd880, locals = 0x07000000000acd60, args = 0x00000001000774ac, argcount = 5990971936392823232, kwnames = 0x0fffffffffffd880, kwargs = 0x00000001100741c0, kwcount = 0, kwstep = 0, defs = (nil), defcount = 0, kwdefs = 0x070000000008ee80, closure = (nil), name = 0x0700000000080870, qualname = 0x07000000000831c0), line 40 in "pycore_ceval.h"
_PyFunction_Vectorcall(func = 0x070000000005d920, stack = 0x00000001100a7cb0, nargsf = 1152921504606837152, kwnames = 0x4224224400000000), line 413 in "call.c"
_PyEval_EvalFrameDefault(tstate = 0x0000000100079094, f = 0x00000001100741c0, throwflag = 117440512), line 621 in "abstract.h"
function_code_fastcall(tstate = 0x0700000000071790, co = 0x0700000000071788, args = 0x0fffffffffffdc00, nargs = 0, globals = (nil)), line 40 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x0000000100079094, f = 0x00000001100741c0, throwflag = -2147483648), line 621 in "abstract.h"
function_code_fastcall(tstate = 0x07000000000abd30, co = 0x07000000000601b0, args = 0x0000000110010150, nargs = 5198324447627075472, globals = 0x00000001000cfd9c), line 40 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x07000000000642f8, f = 0x0000000000000001, throwflag = 0), line 621 in "abstract.h"
function_code_fastcall(tstate = 0x0700000000066326, co = 0x0700000000066310, args = 0x0700000000067200, nargs = 504403158266200968, globals = (nil)), line 40 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x0000000100079094, f = 0x09fffffff000d4d0, throwflag = 1), line 621 in "abstract.h"
function_code_fastcall(tstate = 0x000000007fffffff, co = 0x00000001100741c0, args = 0x0fffffffffffe2e0, nargs = 0, globals = 0x00000001000639b0), line 40 in "pycore_ceval.h"
_PyEval_EvalFrameDefault(tstate = 0x0fffffffffffe5b0, f = 0x000000011000f7b0, throwflag = 1), line 621 in "abstract.h"
function_code_fastcall(tstate = 0x0fffffffffffe540, co = 0x00000001100741c0, args = 0x00000001000775cc, nargs = 0, globals = (nil)), line 40 in "pycore_ceval.h"
object_vacall(tstate = 0x0fffffffffffe5e0, base = 0x482402c8000b98b0, callable = 0x0000000100093d1c, vargs = (nil)), line 62 in "abstract.h"
_PyObject_CallMethodIdObjArgs(obj = (nil), name = 0x000000011003f360, ... = 0x7000000000b98b0, 0x700000000050950, 0x0, 0x700000000053dc0, 0x700000000053b00, 0x700000000053bc0), line 897 in "call.c"
import_find_and_load(tstate = 0x0000000110068100, abs_name = (nil)), line 1771 in "import.c"
unnamed block in PyImport_ImportModuleLevelObject(name = 0x07000000000af090, globals = (nil), locals = 0x00000001003c75dc, fromlist = 0x000000011005ad00, level = 268435455), line 1887 in "import.c"
unnamed block in PyImport_ImportModuleLevelObject(name = 0x07000000000af090, globals = (nil), locals = 0x00000001003c75dc, fromlist = 0x000000011005ad00, level = 268435455), line 1887 in "import.c"
PyImport_ImportModuleLevelObject(name = 0x07000000000af090, globals = (nil), locals = 0x00000001003c75dc, fromlist = 0x000000011005ad00, level = 268435455), line 1887 in "import.c"
builtin___import__(self = 0x0000000100100c84, args = 0x0fffffffffffe970, kwds = 0xbadc0ffee0ddf00d), line 280 in "bltinmodule.c"
cfunction_call(func = 0x0000000100076e4c, args = 0xbadc0ffee0ddf00d, kwargs = 0x00000001100a7cb0), line 539 in "methodobject.c"
_PyObject_MakeTpCall(tstate = 0x0000000100088f74, callable = (nil), args = (nil), nargs = 4563878336, keywords = 0x0fffffffffffeaa0), line 191 in "call.c"
_PyObject_CallFunctionVa(tstate = 0x0ffffffffffffed0, callable = (nil), format = (nil), va = (nil), is_size_t = 117440512), line 60 in "abstract.h"
PyObject_CallFunction(callable = 0x0700000000050950, format = "OOOOi", ... = 0x7000000000b98b0, 0x7000000000ad400, 0x7000000000ad400, 0x700000000093580, 0x0, 0x0), line 579 in "call.c"
PyImport_Import(module_name = 0x0000000000000001), line 2088 in "import.c"
PyImport_ImportModule(name = "^O(invalid char ptr (0x0fffffffffffecf0))), line 1488 in "import.c"
PyImport_ImportModuleNoBlock(name = "^O(invalid char ptr (0x0fffffffffffedb0))), line 1506 in "import.c"
unnamed block in _PyCodecRegistry_Init(), line 1543 in "codecs.c"
_PyCodecRegistry_Init(), line 1543 in "codecs.c"
_PyCodec_Forget(encoding = ""), line 124 in "codecs.c"
init_stdio_encoding(tstate = 0x0000000000000013), line 16018 in "unicodeobject.c"
init_fs_encoding(tstate = 0x00000001100a7cb0), line 16132 in "unicodeobject.c"
_PyUnicode_InitEncodings(tstate = (nil)), line 16148 in "unicodeobject.c"
init_interp_main(tstate = (nil)), line 1009 in "pylifecycle.c"
pyinit_main(tstate = (nil)), line 1097 in "pylifecycle.c"
Py_InitializeFromConfig(config = 0x0000000110098c70), line 1141 in "pylifecycle.c"
pymain_init(args = 0x09fffffff000c9c8), line 66 in "main.c"
pymain_main(args = 0x09fffffff00009a0), line 698 in "main.c"
Py_BytesMain(argc = -1159983106, argv = 0xbadc0ffee0ddf00d), line 731 in "main.c"
python.main(argc = 0, argv = (nil)), line 15 in "python.c"
(dbx)
History
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86475
2021-01-06 16:41:47Michael.Feltsetmessages: + msg384511
2020-11-16 15:04:37Michael.Feltsetmessages: + msg381104
title: BUILD: AIX-64-bit segmentation fault using xlc -> BUILD: AIX-64-bit segmentation fault using xlc-v11
2020-11-16 12:42:49Michael.Feltsetmessages: + msg381094
title: BUILD: AIX-64-bit segmentation fault -> BUILD: AIX-64-bit segmentation fault using xlc
2020-11-14 01:33:42kadlersetnosy: + kadler
messages: + msg380951
2020-11-10 18:14:25Michael.Feltsetmessages: + msg380693
2020-11-10 11:44:55Michael.Feltcreate