Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyunittests-pyroot-pyz-ttree-setbranchaddress segfaults with Python 3.13 #15799

Closed
1 task done
ellert opened this issue Jun 8, 2024 · 4 comments · Fixed by #15807
Closed
1 task done

pyunittests-pyroot-pyz-ttree-setbranchaddress segfaults with Python 3.13 #15799

ellert opened this issue Jun 8, 2024 · 4 comments · Fixed by #15807
Assignees

Comments

@ellert
Copy link
Contributor

ellert commented Jun 8, 2024

Check duplicate issues.

  • Checked for duplicates

Description

The pyunittests-pyroot-pyz-ttree-setbranchaddress test segfaults with Python 3.13:

  41/1342 Test   #31: pyunittests-pyroot-pyz-ttree-setbranchaddress .............................***Failed   57.97 sec
test_array_branch (ttree_setbranchaddress.TTreeSetBranchAddress.test_array_branch) ... ok
test_basic_type_branch (ttree_setbranchaddress.TTreeSetBranchAddress.test_basic_type_branch) ... ok
test_class_with_array_member (ttree_setbranchaddress.TTreeSetBranchAddress.test_class_with_array_member) ... ok
test_fallback_case (ttree_setbranchaddress.TTreeSetBranchAddress.test_fallback_case) ...  *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f3f13f12e87 in wait4 () from /lib64/libc.so.6
#1  0x00007f3f13e664fb in do_system () from /lib64/libc.so.6
#2  0x00007f3f13322cf0 in TUnixSystem::Exec (this=0x5619b6bb82b0, shellcmd=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:2151
#3  TUnixSystem::StackTrace (this=0x5619b6bb82b0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:2442
#4  0x00007f3f13511c5f in (anonymous namespace)::do_trace (sig=1) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:189
#5  (anonymous namespace)::TExceptionHandlerImp::HandleException (this=<optimized out>, sig=1) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:202
#6  0x00007f3f133203b9 in TUnixSystem::DispatchSignals (this=0x5619b6bb82b0, sig=kSigSegmentationViolation) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:3657
#7  <signal handler called>
#8  CPyCppyy::VoidArrayConverter::SetArg (this=0x5619bcb4fd10, pyobject=<optimized out>, para=..., ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:1513
#9  0x00007f3f00e7a068 in CPyCppyy::CPPMethod::ConvertAndSetArgs (this=this
entry=0x5619bc8a1b80, args=0x7f3f00328a98, nargsf=<optimized out>, ctxt=ctxt
entry=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:934
#10 0x00007f3f00e7a23c in CPyCppyy::CPPMethod::Call (this=0x5619bc8a1b80, self=
0x7fffe41c52d8: 0x7f3eff3870d0, args=<optimized out>, nargsf=<optimized out>, kwds=<optimized out>, ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:991
#11 0x00007f3f00e7f540 in CPyCppyy::(anonymous namespace)::mp_vectorcall (pymeth=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx:699
#12 0x00007f3f00eb7cde in CPyCppyy_tp_call (cb=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h:321
#13 CPyCppyy::SelectAndForward (pytmpl=pytmpl
entry=0x7f3e9b93ef70, pymeth=0x7f3f1384ce80, args=args
entry=0x7f3f00328a98, nargsf=nargsf
entry=3, kwds=kwds
entry=0x0, implicitOkay=implicitOkay
entry=true, use_targs=false, sighash=9465071328407200440, errors=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/TemplateProxy.cxx:481
#14 0x00007f3f00eba9fd in CPyCppyy::tpp_vectorcall (pytmpl=0x7f3e9b93ef70, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /usr/include/c++/14/bits/shared_ptr_base.h:1666
#15 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#16 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#17 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#18 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#19 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#20 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#21 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#22 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#23 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#24 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#25 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#26 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#27 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#28 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#29 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#30 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#31 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#32 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#33 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#34 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#35 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#36 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#37 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#38 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#39 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#40 0x00007f3f141a5d0b in slot_tp_init () from /lib64/libpython3.13.so.1.0
#41 0x00007f3f1415e9c5 in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#42 0x00007f3f1417d188 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#43 0x00007f3f1423f8eb in PyEval_EvalCode () from /lib64/libpython3.13.so.1.0
#44 0x00007f3f1425afe4 in builtin_exec () from /lib64/libpython3.13.so.1.0
#45 0x00007f3f1418e3e7 in cfunction_vectorcall_FASTCALL_KEYWORDS () from /lib64/libpython3.13.so.1.0
#46 0x00007f3f14160f57 in PyObject_Vectorcall () from /lib64/libpython3.13.so.1.0
#47 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#48 0x00007f3f142797ed in pymain_run_module () from /lib64/libpython3.13.so.1.0
#49 0x00007f3f1427500c in Py_RunMain () from /lib64/libpython3.13.so.1.0
#50 0x00007f3f1422bcbc in Py_BytesMain () from /lib64/libpython3.13.so.1.0
#51 0x00007f3f13e3c1c8 in __libc_start_call_main () from /lib64/libc.so.6
#52 0x00007f3f13e3c28b in __libc_start_main_impl () from /lib64/libc.so.6
#53 0x00005619b4d2b095 in _start ()
===========================================================


The lines below might hint at the cause of the crash. If you see question
marks as part of the stack trace, try to recompile with debugging information
enabled and export CLING_DEBUG=1 environment variable before running.
You may get help by asking at the ROOT forum https://root.cern/forum
preferably using the command (.forum bug) in the ROOT prompt.
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs or (preferably) using the command (.gh bug) in
the ROOT prompt. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#8  CPyCppyy::VoidArrayConverter::SetArg (this=0x5619bcb4fd10, pyobject=<optimized out>, para=..., ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:1513
#9  0x00007f3f00e7a068 in CPyCppyy::CPPMethod::ConvertAndSetArgs (this=this
entry=0x5619bc8a1b80, args=0x7f3f00328a98, nargsf=<optimized out>, ctxt=ctxt
entry=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:934
#10 0x00007f3f00e7a23c in CPyCppyy::CPPMethod::Call (this=0x5619bc8a1b80, self=
0x7fffe41c52d8: 0x7f3eff3870d0, args=<optimized out>, nargsf=<optimized out>, kwds=<optimized out>, ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:991
#11 0x00007f3f00e7f540 in CPyCppyy::(anonymous namespace)::mp_vectorcall (pymeth=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx:699
#12 0x00007f3f00eb7cde in CPyCppyy_tp_call (cb=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h:321
#13 CPyCppyy::SelectAndForward (pytmpl=pytmpl
entry=0x7f3e9b93ef70, pymeth=0x7f3f1384ce80, args=args
entry=0x7f3f00328a98, nargsf=nargsf
entry=3, kwds=kwds
entry=0x0, implicitOkay=implicitOkay
entry=true, use_targs=false, sighash=9465071328407200440, errors=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/TemplateProxy.cxx:481
#14 0x00007f3f00eba9fd in CPyCppyy::tpp_vectorcall (pytmpl=0x7f3e9b93ef70, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /usr/include/c++/14/bits/shared_ptr_base.h:1666
#15 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#16 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#17 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#18 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#19 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#20 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#21 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#22 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#23 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#24 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#25 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#26 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#27 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#28 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#29 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#30 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#31 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#32 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#33 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#34 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#35 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#36 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#37 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#38 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#39 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#40 0x00007f3f141a5d0b in slot_tp_init () from /lib64/libpython3.13.so.1.0
#41 0x00007f3f1415e9c5 in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#42 0x00007f3f1417d188 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#43 0x00007f3f1423f8eb in PyEval_EvalCode () from /lib64/libpython3.13.so.1.0
#44 0x00007f3f1425afe4 in builtin_exec () from /lib64/libpython3.13.so.1.0
#45 0x00007f3f1418e3e7 in cfunction_vectorcall_FASTCALL_KEYWORDS () from /lib64/libpython3.13.so.1.0
#46 0x00007f3f14160f57 in PyObject_Vectorcall () from /lib64/libpython3.13.so.1.0
#47 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#48 0x00007f3f142797ed in pymain_run_module () from /lib64/libpython3.13.so.1.0
#49 0x00007f3f1427500c in Py_RunMain () from /lib64/libpython3.13.so.1.0
#50 0x00007f3f1422bcbc in Py_BytesMain () from /lib64/libpython3.13.so.1.0
#51 0x00007f3f13e3c1c8 in __libc_start_call_main () from /lib64/libc.so.6
#52 0x00007f3f13e3c28b in __libc_start_main_impl () from /lib64/libc.so.6
#53 0x00005619b4d2b095 in _start ()
===========================================================


 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f3f13f12e87 in wait4 () from /lib64/libc.so.6
#1  0x00007f3f13e664fb in do_system () from /lib64/libc.so.6
#2  0x00007f3f13322cf0 in TUnixSystem::Exec (this=0x5619b6bb82b0, shellcmd=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:2151
#3  TUnixSystem::StackTrace (this=0x5619b6bb82b0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:2442
#4  0x00007f3f13511b7d in (anonymous namespace)::do_trace (sig=1) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:189
#5  (anonymous namespace)::TExceptionHandlerImp::HandleException (this=<optimized out>, sig=1) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:208
#6  0x00007f3f133203b9 in TUnixSystem::DispatchSignals (this=0x5619b6bb82b0, sig=kSigSegmentationViolation) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:3657
#7  <signal handler called>
#8  CPyCppyy::VoidArrayConverter::SetArg (this=0x5619bcb4fd10, pyobject=<optimized out>, para=..., ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:1513
#9  0x00007f3f00e7a068 in CPyCppyy::CPPMethod::ConvertAndSetArgs (this=this
entry=0x5619bc8a1b80, args=0x7f3f00328a98, nargsf=<optimized out>, ctxt=ctxt
entry=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:934
#10 0x00007f3f00e7a23c in CPyCppyy::CPPMethod::Call (this=0x5619bc8a1b80, self=
0x7fffe41c52d8: 0x7f3eff3870d0, args=<optimized out>, nargsf=<optimized out>, kwds=<optimized out>, ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:991
#11 0x00007f3f00e7f540 in CPyCppyy::(anonymous namespace)::mp_vectorcall (pymeth=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx:699
#12 0x00007f3f00eb7cde in CPyCppyy_tp_call (cb=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h:321
#13 CPyCppyy::SelectAndForward (pytmpl=pytmpl
entry=0x7f3e9b93ef70, pymeth=0x7f3f1384ce80, args=args
entry=0x7f3f00328a98, nargsf=nargsf
entry=3, kwds=kwds
entry=0x0, implicitOkay=implicitOkay
entry=true, use_targs=false, sighash=9465071328407200440, errors=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/TemplateProxy.cxx:481
#14 0x00007f3f00eba9fd in CPyCppyy::tpp_vectorcall (pytmpl=0x7f3e9b93ef70, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /usr/include/c++/14/bits/shared_ptr_base.h:1666
#15 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#16 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#17 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#18 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#19 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#20 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#21 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#22 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#23 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#24 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#25 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#26 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#27 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#28 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#29 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#30 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#31 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#32 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#33 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#34 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#35 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#36 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#37 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#38 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#39 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#40 0x00007f3f141a5d0b in slot_tp_init () from /lib64/libpython3.13.so.1.0
#41 0x00007f3f1415e9c5 in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#42 0x00007f3f1417d188 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#43 0x00007f3f1423f8eb in PyEval_EvalCode () from /lib64/libpython3.13.so.1.0
#44 0x00007f3f1425afe4 in builtin_exec () from /lib64/libpython3.13.so.1.0
#45 0x00007f3f1418e3e7 in cfunction_vectorcall_FASTCALL_KEYWORDS () from /lib64/libpython3.13.so.1.0
#46 0x00007f3f14160f57 in PyObject_Vectorcall () from /lib64/libpython3.13.so.1.0
#47 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#48 0x00007f3f142797ed in pymain_run_module () from /lib64/libpython3.13.so.1.0
#49 0x00007f3f1427500c in Py_RunMain () from /lib64/libpython3.13.so.1.0
#50 0x00007f3f1422bcbc in Py_BytesMain () from /lib64/libpython3.13.so.1.0
#51 0x00007f3f13e3c1c8 in __libc_start_call_main () from /lib64/libc.so.6
#52 0x00007f3f13e3c28b in __libc_start_main_impl () from /lib64/libc.so.6
#53 0x00005619b4d2b095 in _start ()
===========================================================


The lines below might hint at the cause of the crash. If you see question
marks as part of the stack trace, try to recompile with debugging information
enabled and export CLING_DEBUG=1 environment variable before running.
You may get help by asking at the ROOT forum https://root.cern/forum
preferably using the command (.forum bug) in the ROOT prompt.
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs or (preferably) using the command (.gh bug) in
the ROOT prompt. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#8  CPyCppyy::VoidArrayConverter::SetArg (this=0x5619bcb4fd10, pyobject=<optimized out>, para=..., ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx:1513
#9  0x00007f3f00e7a068 in CPyCppyy::CPPMethod::ConvertAndSetArgs (this=this
entry=0x5619bc8a1b80, args=0x7f3f00328a98, nargsf=<optimized out>, ctxt=ctxt
entry=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:934
#10 0x00007f3f00e7a23c in CPyCppyy::CPPMethod::Call (this=0x5619bc8a1b80, self=
0x7fffe41c52d8: 0x7f3eff3870d0, args=<optimized out>, nargsf=<optimized out>, kwds=<optimized out>, ctxt=0x7fffe41c5300) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.cxx:991
#11 0x00007f3f00e7f540 in CPyCppyy::(anonymous namespace)::mp_vectorcall (pymeth=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx:699
#12 0x00007f3f00eb7cde in CPyCppyy_tp_call (cb=0x7f3e9b952140, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyy.h:321
#13 CPyCppyy::SelectAndForward (pytmpl=pytmpl
entry=0x7f3e9b93ef70, pymeth=0x7f3f1384ce80, args=args
entry=0x7f3f00328a98, nargsf=nargsf
entry=3, kwds=kwds
entry=0x0, implicitOkay=implicitOkay
entry=true, use_targs=false, sighash=9465071328407200440, errors=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/bindings/pyroot/cppyy/CPyCppyy/src/TemplateProxy.cxx:481
#14 0x00007f3f00eba9fd in CPyCppyy::tpp_vectorcall (pytmpl=0x7f3e9b93ef70, args=0x7f3f00328a98, nargsf=3, kwds=0x0) at /usr/include/c++/14/bits/shared_ptr_base.h:1666
#15 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#16 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#17 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#18 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#19 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#20 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#21 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#22 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#23 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#24 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#25 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#26 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#27 0x00007f3f14173ef1 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#28 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#29 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#30 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#31 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#32 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#33 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#34 0x00007f3f141ca25d in method_vectorcall () from /lib64/libpython3.13.so.1.0
#35 0x00007f3f14178546 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#36 0x00007f3f1423d53d in _PyObject_VectorcallDictTstate () from /lib64/libpython3.13.so.1.0
#37 0x00007f3f14291f67 in slot_tp_call () from /lib64/libpython3.13.so.1.0
#38 0x00007f3f1415ea6b in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#39 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#40 0x00007f3f141a5d0b in slot_tp_init () from /lib64/libpython3.13.so.1.0
#41 0x00007f3f1415e9c5 in _PyObject_MakeTpCall () from /lib64/libpython3.13.so.1.0
#42 0x00007f3f1417d188 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#43 0x00007f3f1423f8eb in PyEval_EvalCode () from /lib64/libpython3.13.so.1.0
#44 0x00007f3f1425afe4 in builtin_exec () from /lib64/libpython3.13.so.1.0
#45 0x00007f3f1418e3e7 in cfunction_vectorcall_FASTCALL_KEYWORDS () from /lib64/libpython3.13.so.1.0
#46 0x00007f3f14160f57 in PyObject_Vectorcall () from /lib64/libpython3.13.so.1.0
#47 0x00007f3f14173894 in _PyEval_EvalFrameDefault () from /lib64/libpython3.13.so.1.0
#48 0x00007f3f142797ed in pymain_run_module () from /lib64/libpython3.13.so.1.0
#49 0x00007f3f1427500c in Py_RunMain () from /lib64/libpython3.13.so.1.0
#50 0x00007f3f1422bcbc in Py_BytesMain () from /lib64/libpython3.13.so.1.0
#51 0x00007f3f13e3c1c8 in __libc_start_call_main () from /lib64/libc.so.6
#52 0x00007f3f13e3c28b in __libc_start_main_impl () from /lib64/libc.so.6
#53 0x00005619b4d2b095 in _start ()
===========================================================


CMake Error at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/cmake/modules/RootTestDriver.cmake:232 (message):
  error code: 129

Reproducer

Compile root with Python 3.13. Run tests.

ROOT version

6.32.00

Installation method

RPM package build from source

Operating system

Fedora 41 (rawhide)

Additional context

No response

@ellert ellert added the bug label Jun 8, 2024
@guitargeek guitargeek self-assigned this Jun 10, 2024
guitargeek added a commit to guitargeek/root that referenced this issue Jun 10, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
@guitargeek
Copy link
Contributor

Thanks for the report! Once the CI is green, can you maybe check if this PR fixes the problem?

guitargeek added a commit to guitargeek/root that referenced this issue Jun 10, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
guitargeek added a commit to guitargeek/root that referenced this issue Jun 10, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
@guitargeek
Copy link
Contributor

I also checked with Python 3.13 on Arch Linux: the test is passing now.

guitargeek added a commit to guitargeek/root that referenced this issue Jun 10, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
guitargeek added a commit to guitargeek/root that referenced this issue Jun 10, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
guitargeek added a commit that referenced this issue Jun 10, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes #15799.
@ellert
Copy link
Contributor Author

ellert commented Jun 11, 2024

I also checked with Python 3.13 on Arch Linux: the test is passing now.

It also works on Fedora. Thank you for addressing this.

Copy link

Hi @guitargeek,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

guitargeek added a commit to guitargeek/root that referenced this issue Jun 13, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
guitargeek added a commit that referenced this issue Jun 13, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes #15799.
silverweed pushed a commit to silverweed/root that referenced this issue Aug 19, 2024
The pythonization of `TTree::SetBranchAddress` was implemented in C++,
hacking into CPyCppy by using implementation details like data member
caches (this call: `((CPPInstance *)address)GetDatamemberCache()`). Not
too surprising that it apparently breaks with the upcoming Python 3.13.

It's better to implement the pythonizations in Python and also manage
the lifetime of the necessary data in Python. This is done in this
commit.

The pythonization is extensively tested in `ttree_setbranchaddress.py`.

Possible closes root-project#15799.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants