pinocchio: Segfault importing Pinocchio 3.3.0 Python bindings from Humble binaries

Bug description

After upgrading to the ROS Humble December 20, 2024 sync, which upgrades from 2.6.21 to 3.3.0. importing the Python bindings segfaults.

These binaries are specifically from the ros-humble-pinocchio apt install.

Expected behavior

Importing should not segfault.

Reproduction steps

Steps to reproduce the behavior:

  1. python3
  2. import pinocchio

Before upgrade:

>>> import pinocchio
>>> pinocchio.__version__
'2.6.21'

After upgrade

sudo apt update && sudo apt install --upgrade ros-humble-pinocchio -y

>>> import pinocchio
Segmentation fault (core dumped)

System

  • OS: Ubuntu 22.04
  • Pinocchio version: 3.3.0
  • Install from binaries: ros-humble-pinocchio

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (17 by maintainers)

Most upvoted comments

the fix has reached ros2-testing:

$ docker run --rm -it ros:humble
# sed -i s=/ros2/=/ros2-testing/= /etc/apt/sources.list.d/ros2-latest.list
# apt update && apt install -qy ros-humble-pinocchio
# python3 -c "import pinocchio; print(pinocchio.__version__)"
3.4.0

Finally fixed:

$ docker run --rm -it ros:humble
# apt update && apt install -qy ros-humble-pinocchio
# python3 -c "import pinocchio; print(pinocchio.__version__)"
3.4.0

I think we found the issue. It’s clang a 14 compiler bug with Boost.Python.

I found a really close issue here. It’s patched in more recent clang version, but I don’t think we can manage that on the ROS CI.

There is no issue when building it with GCC so we will try to remove this patch