Error using python3 nodes on ARM64 & CoreDX

Do you happen to have a backtrace?

I can’t seem to create one. No core dump is produced even with ulimit -c unlimited. The error must be caught (but subscription not created).

Does it fail when you create a subscription or when you try to deserialize a message?

Definitely when creating the subscription.

Do you have the same problem with message types that are of known size (like uint64t) ?

Yes, I do.

Can you reproduce it with a pure C communication?

No, I cannot.

running test_messages_c…

All the rclcpp tests from test_communications pass and all the rclpy tests fail with the same error:
[test_subscriber] *** Error in /usr/bin/python3’: free(): invalid pointer: 0x0000007f9753f768 ***`

I question the PyMem_Free call here (and in similar contexts throughout the file): rclpy/rclpy/src/rclpy/_rclpy.c at ec2220239d089f7b5d03a6ed1f6a3136e7c4d049 · ros2/rclpy · GitHub
I’m no Python extension expert, but surely it’s not a best-practice to destroy objects passed in by the user. That would be the user/caller’s responsibility. What if the same QoS object was passed to multiple subscription calls but the first one destroyed it? In looking around online, it seems that the right approach is to call Py_XDECREF on each object created via PyArg_ParseTuple (every parameter with type “O”, other types having their individual cleanup instructions).
Update: The documentation says that “O” objects are not ref-incremented, so I think the stuff I was reading about decrementing their ref count is not correct.