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
Ubuntu 20.04.1 - multiple processes launched and memory full using docker container with python and ROS1 #4922
Comments
I would like to double on this bug: it is still happening. It seems this is a bug of two extensions clashing, Remote-Containers and ROS. Also, I use no Python, but I develop C++ nodes, so, between me and the topicstarter, this bug is not connected, apparently, neither to Python extensions nor to C++ extensions. Steps to reproduce:
Workaround to those who love to develop ROS nodes in VS Code inside docker containers: My software versions, on which this stuff does happen:
|
I'm the development lead for the Azure Edge Robotics team at Microsoft- who maintain the VSCode ROS extension. I'm currently tracking this down and will follow up internally with the VSCode team if needed. |
I confirmed that this occurs without the ROS extension. Repro Steps:
Result - memory growth goes exponential. Expect - no memory growth |
Hello @chrmarti, I can confirm that the problem occurs on all on my computers with my students. But the configuration is always the same:
I had also the problems many months ago with WSL2 on windows 10 insiders. With no solution for this problem, I remove Vscode from Windows 10 and launch Vscode directly inside the container. So sorry, I no longer have the configuration in Windows 10. I think I had Remote-Containers, Remote-ssh, Remote-WSL and Remote Development + python, pylance, ROS, Jupyter I tried 2 days ago to find the easiest way for Lou to reproduce the problem. See details on ms-iot/vscode-ros#393 Hope this helps Goupil |
Please provide the command line you are using to start the container. |
I used this command: docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth -e XAUTHORITY=/tmp/.docker.xauth --net=host ros:noetic-ros-base |
I disabled Autoforward ports, which did not fix this issue - still see the rapid memory growth. |
I can confirm that the automatic port forwarding does not trigger on its own ports when running with net=host. What seems to happen is that the port forwarding for the 11311 port starts listening on 11311 on localhost and with net=host that is also the container's port 11311. So when a client connects to 11311, the forwarding connects to itself, resulting in an endless loop of connections. |
Hello Christof, Thanks for finding the problem of port 11311. But I'm not sure if it's related to ROS extension of Vscode or related to option net=host. In practice when I'm using Vscode on the host, I have no problem until I open the catkin_ws directory in Vscode with ROS extension loaded. The memory grows when ROS appearing in the bottom of Vscode window. If I connect from another terminal using docker exec -it $CONTAINER_NAME /bin/bash, I have no problem. So it seems that for me the problem only occurs in that conditions:
Is there a solution for this problem ? Goupil |
@goupil35000 We need to track this down further. I think the 11311 port repro might give us the right lead. Could you try the following:
|
I only find Remote-Containers: Open Attached Container Configuration File, but I think it's the same. I opened the image for ros:noetic-ros-base. I remove in the ros:noetic-ros-base.json I disable automatic port forwarding and disable restoring forwarded ports. I then "Attach Visual Code" to my running container. Here the result in this Terminal after typing: F1 > Remote-Containers: Show Log[3 ms] Remote-Containers 0.166.1 in VS Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d).
Extension host agent listening on 41379 [443 ms] Start: Run in container: echo 41379 >/root/.vscode-server/data/Machine/.devport I include below the same before disabling automatic port forwarding and disabling restoring forwarded ports ============ Before unclick Disable automatic port forwarding and Disable restoring forwarded ports======== [18377 ms] Forwarding connection from port 37554 on local port 35259 to container port 41379 |
I just want to confirm - 11311 is the default ROS port, but this repros without ROS in the picture. |
@goupil35000 This doesn’t repro without —net=host, correct? Could you retry with VS Code Insiders and the latest Remote-Containers this comes with and set Remote-Containers Log Level in the user settings to trace? The log output from that might give us additional information on which process is initiating the connection. |
@chrmarti Yes it seems the problem appears only when you have the option --net=host. I installed last VS Code Insiders 1.56.0-insider ant latest Remote-Containers 0.171.0 In containers I installed these extensions: C/C++, Jupyter, Pylance, Python and ROS. [2021-04-25 09:57:36.624] [remoteagent] [trace] Remote configuration data at /root/.vscode-server-insiders
[2021-04-25 09:57:36.624] [remoteagent] [info] Extension host agent started. Tell me if you need other tests. Goupil |
Does it occur again when you enable auto port forwarding or does that not affect it? |
@chrmarti When will it be available to everyone ? Thanks for all. |
VS Code Insiders and the latest Remote-Containers will become stable releases when VS Code 1.56 ships. That should be first or second week of May. Closing as fixed. Thanks! |
Docker container: python / ROS 1 noetic full.
Steps to Reproduce (2. is independant of problem presented in 1. I had the same problem before when the problem 1. was not occuring).
Does this issue occur when all extensions are disabled?: I need to have extensions opened because the problem occurs for a docker container.
We don't know if vscode is the problem or an extension. But it seems that the problems occur after the last updates of vscode (but docker extension also changes theses last days). The problem was tested on 4 differents hardware with Ubuntu 20.04.1 and tested by 2 different users. The problem does not occur in Windows (insider -- wsl2 with gpu support).
Full configuration (tested on AMD 3700X/32GB and I9 9900K/32GB/RTX2070).
Docker 1.8.0 (also tested with 1.7.0 version)
Jupyter v2020.11.3728319
Python v2020.11.3715265
Pylance v2020.11.2
Remote Containers v0.148.1
Remote SSH v0.56.0
Remote - SSH: Editing Configuration Files v0.56.0
Remote - WSL v0.51.4
Remote Development v0.20.0
ROS 0.6.4 [Edit]
-------------- [Edit] -------------
Line of the Processes launched:
/home/util1/.vscode-server/bin/e5a624b788d92b8d34d1392e4c4d9789406efe8f/node -e ????const net = require('net'); ????process.stdin.pause(); ????const client = net.createConnection({ port: 34751 }, () => { ?????c
The text was updated successfully, but these errors were encountered: