Open mliudev opened 2 months ago
Some more info is that there appears to be an infinite loop of port forwarding. Not sure what this port is being forwarded for:
devcontainer log
[21274 ms] Port forwarding 52905 > 58319 > 58319 stderr: Connection established
[21282 ms] Port forwarding connection from 52907 > 58319 > 58319 in the container.
[21282 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21358 ms] Port forwarding 52907 > 58319 > 58319 stderr: Connection established
[21377 ms] Port forwarding connection from 52909 > 58319 > 58319 in the container.
[21377 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21442 ms] Port forwarding 52909 > 58319 > 58319 stderr: Connection established
[21452 ms] Port forwarding connection from 52911 > 58319 > 58319 in the container.
[21452 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21597 ms] Port forwarding 52911 > 58319 > 58319 stderr: Connection established
[21608 ms] Port forwarding connection from 52913 > 58319 > 58319 in the container.
[21608 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21706 ms] Port forwarding 52913 > 58319 > 58319 stderr: Connection established
[21716 ms] Port forwarding connection from 52916 > 58319 > 58319 in the container.
[21716 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21769 ms] Port forwarding 52916 > 58319 > 58319 stderr: Connection established
[21801 ms] Port forwarding connection from 52918 > 58319 > 58319 in the container.
[21801 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21903 ms] Port forwarding 52918 > 58319 > 58319 stderr: Connection established
[21911 ms] Port forwarding connection from 52924 > 58319 > 58319 in the container.
[21911 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[21988 ms] Port forwarding 52924 > 58319 > 58319 stderr: Connection established
[21995 ms] Port forwarding connection from 52926 > 58319 > 58319 in the container.
[21996 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22063 ms] Port forwarding 52926 > 58319 > 58319 stderr: Connection established
[22075 ms] Port forwarding connection from 52928 > 58319 > 58319 in the container.
[22075 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22145 ms] Port forwarding 52928 > 58319 > 58319 stderr: Connection established
[22155 ms] Port forwarding connection from 52930 > 58319 > 58319 in the container.
[22155 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22253 ms] Port forwarding 52930 > 58319 > 58319 stderr: Connection established
[22333 ms] Port forwarding connection from 52932 > 58319 > 58319 in the container.
[22333 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22417 ms] Port forwarding 52932 > 58319 > 58319 stderr: Connection established
[22422 ms] Port forwarding connection from 52934 > 58319 > 58319 in the container.
[22423 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22514 ms] Port forwarding 52934 > 58319 > 58319 stderr: Connection established
[22523 ms] Port forwarding connection from 52936 > 58319 > 58319 in the container.
[22523 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22634 ms] Port forwarding 52936 > 58319 > 58319 stderr: Connection established
[22639 ms] Port forwarding connection from 52938 > 58319 > 58319 in the container.
[22640 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22701 ms] Port forwarding 52938 > 58319 > 58319 stderr: Connection established
[22707 ms] Port forwarding connection from 52940 > 58319 > 58319 in the container.
[22708 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22765 ms] Port forwarding 52940 > 58319 > 58319 stderr: Connection established
[22773 ms] Port forwarding connection from 52942 > 58319 > 58319 in the container.
[22773 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22856 ms] Port forwarding 52942 > 58319 > 58319 stderr: Connection established
[22907 ms] Port forwarding connection from 52948 > 58319 > 58319 in the container.
[22908 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[22973 ms] Port forwarding 52948 > 58319 > 58319 stderr: Connection established
[22979 ms] Port forwarding connection from 52950 > 58319 > 58319 in the container.
[22979 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[23034 ms] Port forwarding 52950 > 58319 > 58319 stderr: Connection established
[23043 ms] Port forwarding connection from 52952 > 58319 > 58319 in the container.
[23043 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
[23146 ms] Port forwarding 52952 > 58319 > 58319 stderr: Connection established
[23157 ms] Port forwarding connection from 52954 > 58319 > 58319 in the container.
[23157 ms] Start: Run in container: /root/.vscode-server/bin/4849ca9bdf9666755eb463db297b69e5385090e3/node -e
Not sure how this gets triggered, but removing "runArgs": ["--network=host"],
from the config probably works around it. Could you try that?
Does the Ports
view show a port being forwarded?
Could you append the full log?
Is the --network=host
not necessary? We actually do want the docker container to have host networking. If it happens again I'll try to get the full log but it happens intermittently.
Also, how exactly do I open the DevContainer logs if I miss the notification? It doesn't look like I can go to Output
and select it as one of the logs.
I tried to get the full log but it's incredibly spammy and couldn't fit into my clipboard. It's just opening ports repeatedly as fast as it possibly can.
The port does appear to be auto forwarded in a container that doesn't have the issue. I'm not actually sure if it is in a buggy container.
You can use F1
> Dev Containers Developer: Show All Logs...
to get at the history of logs. It would be interesting to see the start of the log until it goes into the loop. Does rebuilding the dev container help? It looks like it is trying to connect to the VS Code Server, but just ends up in that loop, not sure why this wouldn't happen with all containers using host networking.
Is there log folder that I might be able to find these logs in after closing the container? It basically drains all the resources of the docker engine and makes it really slow and eventually crashes it when it uses all allocated memory.
That command should also be available in a new window and include logs from previous sessions.
I've uploaded the log.
Somehow the connection inside the container always picks up the forwarded port from the host and not the VS Code Server in the container. Host networking is triggering it.
Is this a VSCode or Docker problem?
Just FYI, this is happening on a daily basis now. I've had it happen multiple times per session even.
Original issue #214673 described similar behavior as mine. These vscode-server/bin processes seem to be infinitely spinning up until OOM.
Originally posted by @mliudev in https://github.com/microsoft/vscode/issues/214673#issuecomment-2164001700
devcontainer.json