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

Python extensions listens on port 9003 #21929

Closed
pyrello opened this issue Sep 5, 2023 · 9 comments
Closed

Python extensions listens on port 9003 #21929

pyrello opened this issue Sep 5, 2023 · 9 comments

Comments

@pyrello
Copy link

pyrello commented Sep 5, 2023

Type: Bug

Behaviour

Expected vs. Actual

Expected: Python extension listens on a different port than 9003, which is the standard port for Xdebug.

Actual: Python extension listens on port 9003.

Steps to reproduce:

  1. Enable Python extension
  2. lsof -n -i :9003 | grep LISTEN

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

Extension version: 2023.14.0
VS Code version: Code 1.81.1 (Universal) (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:20:33.924Z)
OS version: Darwin arm64 22.6.0
Modes:

System Info
Item Value
CPUs Apple M2 Pro (12 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (0.39GB free)
Process Argv --crash-reporter-id 051a1521-5886-4693-9193-d80906aaf06c
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
f6dab269:30613381
2i9eh265:30646982
showlangstatbar:30737416
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
dsvsc015:30829745

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Sep 5, 2023
@pyrello
Copy link
Author

pyrello commented Sep 5, 2023

So, this happened to me across multiple machine restarts but now it does not appear to be running on port 9003. I'm wondering if maybe it selected 9003 arbitrarily because the port was free when the process was starting? Either way, it would be nice to have it avoid that port.

@karthiknadig karthiknadig self-assigned this Sep 6, 2023
@karthiknadig
Copy link
Member

We do use a port for testing. it could be that the testing server used this port. We generally leave it to select any of the ephemeral ports. May be we should logs this to debug cases where this occurs.

/cc @eleanorjboyd

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug area-testing labels Sep 12, 2023
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Sep 12, 2023
@eleanorjboyd
Copy link
Member

Yes I can add logging for the ports we select for communication!

@eleanorjboyd
Copy link
Member

There are two steps here:

  1. logging should be added to print which ports are being used by the extension. This is a good first issue.
  2. We should stop ports for forwarding if they are used internally, see new issue. Adopt the proposed Port Attributes API for python testing #22021

this issue will track the progress on adding logging to print which ports are used. There are two ports that need to be logged the port that communicates the testIDs then the second that communicates the resulting information from python run.

@eleanorjboyd eleanorjboyd added ghc-osd and removed bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Sep 18, 2023
@luabud luabud added good first issue needs PR Ready to be worked on labels Sep 19, 2023
@BhavyasriVanka
Copy link

BhavyasriVanka commented Sep 22, 2023

@luabud Can you please assign this to me, Thanks!

@lifelearner2
Copy link

Can this also be assigned to me - just want to practice @eleanorjboyd

@karthiknadig
Copy link
Member

@lifelearner2 If you want to just practice on this, then we don't need to assign. You can just try working on it.

@eleanorjboyd
Copy link
Member

this will be resolved by: #22177 as we will no longer have port conflicts.

@eleanorjboyd
Copy link
Member

closing as this is no longer needed- see above

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
@github-actions github-actions bot removed the needs PR Ready to be worked on label Dec 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants