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

ros2 daemon hangs on arch with docker #1531

Open
Sonic803 opened this issue Mar 2, 2024 · 7 comments
Open

ros2 daemon hangs on arch with docker #1531

Sonic803 opened this issue Mar 2, 2024 · 7 comments
Labels
more-information-needed Further information is required

Comments

@Sonic803
Copy link

Sonic803 commented Mar 2, 2024

Bug report

Required Info:

  • Operating System:
    • Arch Linux 6.1.38-1-lts
  • Installation type:
    • Docker
  • Version or commit hash:
    • humble

Steps to reproduce issue

Just run

docker run --rm -it ros:humble /bin/bash -c "ros2 topic list"

Expected behavior

Output something like

/parameter_events
/rosout

Actual behavior

Gets stuck

Additional information

I tried the same thing on Ubuntu and there it works.

Adding --no-daemon makes it work on arch

docker run --rm -it ros:humble /bin/bash -c "ros2 topic list --no-daemon"

On arch I have
docker 1:25.0.3-1

@tfoote tfoote added the more-information-needed Further information is required label Mar 4, 2024
@tfoote
Copy link
Contributor

tfoote commented Mar 4, 2024

I can confirm that it works on my debianish machine with docker Docker version 20.10.21, build baeda1f

I see that docker 25 is much newer, and potentially there's changes in docker's default behavior or how Arch's networking is setup. Arch isn't a standard development platform so we're going to need to rely on more info and debugging from you or other Arch users.

@akssri-sony
Copy link

akssri-sony commented Mar 6, 2024

Can confirm,

  • It doesn't work humble-onwards on Archlinux (tested with iron/rolling); but foxy is fine.

  • Using cyclonedds doesn't fix the issue.

  • It works fine on Ubuntu-22.04

  • On a working older version of osrf/ros:humble-desktop; upgrading ros-humble-ros2cli ( (0.18.7-1jammy.20231117.193530 -> 0.18.9-1jammy.20240217.070501) causes the behavior to reappear.

@akssri-sony
Copy link

@akssri-sony
Copy link

Temporary fix; call,

ulimit -n 1024

in the container before running ros2 cli stuff.

@gavanderhoorn
Copy link

Reminds me of Odd Docker roscore/roslaunch delays with Linux kernel 6.1 on ROS Answers.

@clalancette
Copy link
Contributor

Reminds me of Odd Docker roscore/roslaunch delays with Linux kernel 6.1 on ROS Answers.

Yep, very good point. That also leads to https://stackoverflow.com/questions/899038/getting-the-highest-allocated-file-descriptor/918469#918469 and https://github.com/ruby/ruby/blob/v3_0_2/io.c#L6557-L6597 , which are interesting.

We could change this to try a (Linux-specific) hint, like that Ruby code (but obviously in Python). Basically see if we can get the FDSize from /proc, and if so, use that as the hint on where to stop. Otherwise, we would still fall back to the soft-limit. This won't work for non-Linux, and won't work for systems where /proc isn't mounted, but those should be the minority of systems.

@akssri-sony If you'd like to give that a shot, I'd be happy to review it.

@akssri-sony
Copy link

Thanks for the pointers @clalancette ! I've created a PR here,
ros2/ros2cli#888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

5 participants