Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

ptvsd_subprocess is not received on linux with py2.7 #935

Closed
karthiknadig opened this issue Oct 18, 2018 · 3 comments
Closed

ptvsd_subprocess is not received on linux with py2.7 #935

karthiknadig opened this issue Oct 18, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@karthiknadig
Copy link
Member

Environment data

  • PTVSD version: master
  • OS and version: ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): 2.7
  • Using VS Code or Visual Studio: console tests
  • Package: Flask

Actual behavior

Cannot debug Flask subprocess on linux.

Expected behavior

Should be able to debug Flask subprocess on linux with python 2.7

Steps to reproduce:

Clone ptvsd the following test:

python -m pytest -vvs ./pytests/func/test_flask.py::test_flask_breakpoint_multiproc[launch]

Log

@00.250000: ptvsd#60053 ERR  * Restarting with stat
@00.250000: ptvsd#60053 ERR Traceback (most recent call last):
@00.250000: ptvsd#60053 ERR
@00.343750: ptvsd#60053 ERR Exception in thread ptvsd.EventLoop (most likely raised during interpreter shutdown):Killed
@karthiknadig
Copy link
Member Author

Note this can be reproed with subprocess.Popen on linux py2.7

@karthiknadig
Copy link
Member Author

karthiknadig commented Oct 18, 2018

Re-enable following tests for linux py 2.7 after this bug is fixed:

test_flask.py::test_flask_breakpoint_multiproc
test_multiproc.py::test_subprocess

@karthiknadig karthiknadig changed the title Flask: ptvsd_subprocess is not received on linux with py2.7 ptvsd_subprocess is not received on linux with py2.7 Oct 18, 2018
@int19h int19h self-assigned this Oct 18, 2018
@karthiknadig karthiknadig added this to the Nov 2018.1 milestone Oct 24, 2018
@int19h
Copy link
Contributor

int19h commented Nov 1, 2018

The short story is that subprocess.Popen uses fork() on Unix in Python 2.7. So this is basically a dupe of #943.

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

No branches or pull requests

2 participants