[
https://issues.apache.org/jira/browse/DISPATCH-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17908967#comment-17908967
]
ASF subversion and git services commented on DISPATCH-2360:
-----------------------------------------------------------
Commit ad53d675d2d2a3f51af7baa82483ee00cbca1f1d in qpid-dispatch's branch
refs/heads/dependabot/github_actions/actions/checkout-4 from Jiri Daněk
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=ad53d675 ]
DISPATCH-2360: call Py_Initialize before any other python C (#1671)
This is a backport of a skupper-router fix from
* https://github.com/skupperproject/skupper-router/pull/1307
> Router might crash during initialization due to improper CPython API usage
> --------------------------------------------------------------------------
>
> Key: DISPATCH-2360
> URL: https://issues.apache.org/jira/browse/DISPATCH-2360
> Project: Qpid Dispatch
> Issue Type: Bug
> Affects Versions: 1.19.0
> Reporter: Jiri Daněk
> Assignee: Jiri Daněk
> Priority: Major
> Fix For: 1.20.0
>
>
> The following is a stacktrace from skupper-router, but as code inspection
> reveals, dispatch suffers from the same invalid API usage that is causing this
> {noformat}
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007f9a8b9da771 in _PyInterpreterState_GET () at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_pystate.h:118
> 118 return tstate->interp;
> (gdb) bt
> #0 0x00007f9a8b9da771 in _PyInterpreterState_GET () at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_pystate.h:118
> #1 get_state () at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:866
> #2 _PyObject_Malloc (ctx=<optimized out>, nbytes=77) at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:1563
> #3 0x00007f9a8b9e206b in PyObject_Malloc (size=<optimized out>) at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:801
> #4 PyUnicode_New (size=36, maxchar=<optimized out>) at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:1208
> #5 0x00007f9a8b9e145c in unicode_decode_utf8 (s=<optimized out>, size=36,
> error_handler=error_handler@entry=_Py_ERROR_UNKNOWN, errors=errors@entry=0x0,
> consumed=consumed@entry=0x0)
> at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:4647
> #6 0x00007f9a8b9e13e9 in PyUnicode_DecodeUTF8Stateful (consumed=0x0,
> errors=0x0, size=<optimized out>, s=<optimized out>) at
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:4780
> #7 0x0000000000467b50 in qd_python_initialize (python_pkgdir=0x4c2848
> "/usr/local/lib/skupper-router/python", qd=<optimized out>) at
> /root/work/skupper-router/src/python_embedded.c:52
> #8 qd_dispatch (python_pkgdir=0x4c2848
> "/usr/local/lib/skupper-router/python", test_hooks=<optimized out>) at
> /root/work/skupper-router/src/dispatch.c:137
> #9 0x000000000042cea7 in main_process
> (config_path=config_path@entry=0x4c27d0
> "/usr/local/etc/skupper-router/skrouterd.conf",
> python_pkgdir=python_pkgdir@entry=0x4c2848
> "/usr/local/lib/skupper-router/python", test_hooks=false,
> fd=fd@entry=2) at /root/work/skupper-router/router/src/main.c:97
> #10 0x0000000000428e50 in main (argc=1, argv=0x7ffef77c64e8) at
> /root/work/skupper-router/router/src/main.c:365
> (gdb) p tstate
> $1 = (PyThreadState *) 0x0
> {noformat}
> See the fix in skupper-router at
> https://github.com/skupperproject/skupper-router/pull/1307
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]