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

[ros2run]: Segmentation fault #3313

Closed
2 tasks done
xiaojxkevin opened this issue Mar 10, 2025 · 4 comments
Closed
2 tasks done

[ros2run]: Segmentation fault #3313

xiaojxkevin opened this issue Mar 10, 2025 · 4 comments

Comments

@xiaojxkevin
Copy link

xiaojxkevin commented Mar 10, 2025

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Hi, I followed the tutorial about Ros2 and encountered the problem.
To be more specific, my pixi.toml is shown below

[project]
authors = ["xiaojx <xiaojx@shanghaitech.edu.cn>"]
channels = ["robostack-staging", "conda-forge"]
name = "ros2_xarm"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
ros-humble-desktop = ">=0.10.0,<0.11"
ros-humble-turtlesim = ">=1.4.2,<2"

Then when I run pixi run ros2 run turtlesim turtlesim_node, I get the following error:

[ros2run]: Segmentation fault

Issue description

I think it might relate to GPU drivers or something, but when I try pixi shell and then nvidia-smi, I get

output of `nvidia-smi`
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120                Driver Version: 550.120        CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1060 3GB    Off |   00000000:01:00.0  On |                  N/A |
| 33%   29C    P8              9W /  120W |     486MiB /   3072MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2337      G   /usr/lib/xorg/Xorg                            214MiB |
|    0   N/A  N/A      2560      G   /usr/bin/gnome-shell                           29MiB |
|    0   N/A  N/A      3704      G   ...SingBox-linux-amd64/GUI.for.SingBox          1MiB |
|    0   N/A  N/A      3727      G   ...gnu/webkit2gtk-4.1/WebKitWebProcess          7MiB |
|    0   N/A  N/A      5123      G   ...sion,SpareRendererForSitePerProcess         82MiB |
|    0   N/A  N/A      9523      G   ...seed-version=20250307-130002.704000         93MiB |
|    0   N/A  N/A     11277      G   /proc/self/exe                                 50MiB |
+-----------------------------------------------------------------------------------------+

I am wondering where could be wrong.

Expected behavior

The expected behavior would be a window created.

@ruben-arts
Copy link
Contributor

Why do you expect it to be related to the GPU drivers?

Is there anything special about your setup? What often helps us is the following:

  • A pixi info output log
  • Could you share your pixi.lock too?
  • Is this a virtual box or a docker image?

@xiaojxkevin
Copy link
Author

Hi, thanks for your reply! @ruben-arts
Since I have searched the Internet and many answers say that it might be related to GPU issues, thus my first guess would be nvidia GPUs. The following are some more info:

output of `pixi info`
System
------------
       Pixi version: 0.42.1
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=6.8.0=0
                   : __glibc=2.39=0
                   : __cuda=12.4=0
                   : __archspec=1=skylake
          Cache dir: /home/xiaojx/.cache/rattler/cache
       Auth storage: /home/xiaojx/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/xiaojx/.pixi/bin
    Environment dir: /home/xiaojx/.pixi/envs
       Manifest dir: /home/xiaojx/.pixi/manifests/pixi-global.toml

Project
------------
               Name: ros2_ws
            Version: 0.1.0
      Manifest file: /home/xiaojx/codes/ros2_ws/pixi.toml
       Last updated: 11-03-2025 16:03:14

Environments
------------
        Environment: default
           Features: default
           Channels: robostack-staging, conda-forge
   Dependency count: 2
       Dependencies: ros-humble-desktop, ros-humble-turtlesim
   Target platforms: linux-64
  1. I have uploaded my pixi.lock here
  2. I am using ubuntu 24.04 LTS. In order to support multiple versions of Ros, I would like to try it with pixi.

@ruben-arts
Copy link
Contributor

Thanks, on first glance this all looks perfectly normal. Pixi is indeed perfect for that.

Could it be possible that you have another ROS workspace sourced in your shell? e.g. the source setup.bash command?

If so, you might want to try pixi run without sourcing that. It should in theory work but ROS can be very intrusive and make it hard for pixi to avoid hitting one of the binaries outside the pixi environment.

@xiaojxkevin
Copy link
Author

xiaojxkevin commented Mar 11, 2025

Hi, thanks for your reply! @ruben-arts
Actually I may have found a possible solution. The ref page is here.
The key factor is tinyxml2==10.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants