[jira] [Commented] (DISPATCH-2360) Router might crash during initialization due to improper CPython API usage

2023-12-02 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792443#comment-17792443
 ] 

ASF subversion and git services commented on DISPATCH-2360:
---

Commit ad53d675d2d2a3f51af7baa82483ee00cbca1f1d in qpid-dispatch's branch 
refs/heads/main 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.
> 0x7f9a8b9da771 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  0x7f9a8b9da771 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=, nbytes=77) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:1563
> #3  0x7f9a8b9e206b in PyObject_Malloc (size=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:801
> #4  PyUnicode_New (size=36, maxchar=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:1208
> #5  0x7f9a8b9e145c in unicode_decode_utf8 (s=, 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  0x7f9a8b9e13e9 in PyUnicode_DecodeUTF8Stateful (consumed=0x0, 
> errors=0x0, size=, s=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:4780
> #7  0x00467b50 in qd_python_initialize (python_pkgdir=0x4c2848 
> "/usr/local/lib/skupper-router/python", qd=) at 
> /root/work/skupper-router/src/python_embedded.c:52
> #8  qd_dispatch (python_pkgdir=0x4c2848 
> "/usr/local/lib/skupper-router/python", test_hooks=) at 
> /root/work/skupper-router/src/dispatch.c:137
> #9  0x0042cea7 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 0x00428e50 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2360) Router might crash during initialization due to improper CPython API usage

2023-12-02 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792442#comment-17792442
 ] 

ASF GitHub Bot commented on DISPATCH-2360:
--

jiridanek merged PR #1671:
URL: https://github.com/apache/qpid-dispatch/pull/1671




> 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.
> 0x7f9a8b9da771 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  0x7f9a8b9da771 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=, nbytes=77) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:1563
> #3  0x7f9a8b9e206b in PyObject_Malloc (size=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:801
> #4  PyUnicode_New (size=36, maxchar=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:1208
> #5  0x7f9a8b9e145c in unicode_decode_utf8 (s=, 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  0x7f9a8b9e13e9 in PyUnicode_DecodeUTF8Stateful (consumed=0x0, 
> errors=0x0, size=, s=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:4780
> #7  0x00467b50 in qd_python_initialize (python_pkgdir=0x4c2848 
> "/usr/local/lib/skupper-router/python", qd=) at 
> /root/work/skupper-router/src/python_embedded.c:52
> #8  qd_dispatch (python_pkgdir=0x4c2848 
> "/usr/local/lib/skupper-router/python", test_hooks=) at 
> /root/work/skupper-router/src/dispatch.c:137
> #9  0x0042cea7 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 0x00428e50 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2360) Router might crash during initialization due to improper CPython API usage

2023-12-02 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792410#comment-17792410
 ] 

ASF GitHub Bot commented on DISPATCH-2360:
--

jiridanek opened a new pull request, #1671:
URL: https://github.com/apache/qpid-dispatch/pull/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: Improvement
>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.
> 0x7f9a8b9da771 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  0x7f9a8b9da771 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=, nbytes=77) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:1563
> #3  0x7f9a8b9e206b in PyObject_Malloc (size=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:801
> #4  PyUnicode_New (size=36, maxchar=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:1208
> #5  0x7f9a8b9e145c in unicode_decode_utf8 (s=, 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  0x7f9a8b9e13e9 in PyUnicode_DecodeUTF8Stateful (consumed=0x0, 
> errors=0x0, size=, s=) at 
> /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/unicodeobject.c:4780
> #7  0x00467b50 in qd_python_initialize (python_pkgdir=0x4c2848 
> "/usr/local/lib/skupper-router/python", qd=) at 
> /root/work/skupper-router/src/python_embedded.c:52
> #8  qd_dispatch (python_pkgdir=0x4c2848 
> "/usr/local/lib/skupper-router/python", test_hooks=) at 
> /root/work/skupper-router/src/dispatch.c:137
> #9  0x0042cea7 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 0x00428e50 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org