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

got an error while stopping in post-mortem: <type 'exceptions.RuntimeError'> #3439

Closed
zy871125746 opened this issue Nov 22, 2018 · 6 comments
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@zy871125746
Copy link

zy871125746 commented Nov 22, 2018

Environment data

  • VS Code version: 1.29.1
  • Extension version: 2018.10.1
  • OS and version: Ubuntu 16.04 (docker)
  • Python version:2.7.12
  • Relevant/affected Python packages and their versions:
    absl-py==0.6.1
    astor==0.7.1
    backports.functools-lru-cache==1.5
    backports.shutil-get-terminal-size==1.0.0
    backports.weakref==1.0.post1
    bleach==3.0.2
    certifi==2018.10.15
    chardet==3.0.4
    cloudpickle==0.6.1
    configparser==3.5.0
    cycler==0.10.0
    dask==0.20.2
    decorator==4.3.0
    defusedxml==0.5.0
    entrypoints==0.2.3
    enum34==1.1.6
    funcsigs==1.0.2
    functools32==3.2.3.post2
    futures==3.2.0
    gast==0.2.0
    grpcio==1.16.1
    h5py==2.8.0
    idna==2.7
    imageio==2.4.1
    ipaddress==1.0.22
    ipykernel==4.10.0
    ipython==5.8.0
    ipython-genutils==0.2.0
    ipywidgets==7.4.2
    Jinja2==2.8
    jsonschema==2.6.0
    jupyter==1.0.0
    jupyter-client==5.2.3
    jupyter-console==5.2.0
    jupyter-core==4.4.0
    Keras-Applications==1.0.6
    Keras-Preprocessing==1.0.5
    kiwisolver==1.0.1
    lxml==3.5.0
    Markdown==3.0.1
    MarkupSafe==0.23
    matplotlib==2.2.3
    mistune==0.8.4
    mock==2.0.0
    nbconvert==5.4.0
    nbformat==4.4.0
    networkx==2.2
    notebook==5.7.2
    numpy==1.15.4
    opencv-contrib-python==3.4.3.18
    opencv-python==3.4.3.18
    pandas==0.23.4
    pandocfilters==1.4.2
    pathlib2==2.3.2
    pbr==5.1.1
    pexpect==4.0.1
    pickleshare==0.7.5
    Pillow==5.3.0
    plyfile==0.6
    prometheus-client==0.4.2
    prompt-toolkit==1.0.15
    protobuf==3.6.1
    ptyprocess==0.5
    pycurl==7.43.0
    Pygments==2.2.0
    pygobject==3.20.0
    PyMySQL==0.7.2
    pyparsing==2.3.0
    python-dateutil==2.7.5
    pytz==2018.7
    PyWavelets==1.0.1
    PyYAML==3.13
    pyzmq==17.1.2
    qtconsole==4.4.3
    requests==2.20.1
    scandir==1.9.0
    scikit-image==0.14.1
    scikit-learn==0.20.0
    scipy==1.1.0
    Send2Trash==1.5.0
    simplegeneric==0.8.1
    six==1.11.0
    sklearn==0.0
    subprocess32==3.5.3
    tensorboard==1.12.0
    tensorboard-logger==0.1.0
    tensorflow==1.12.0
    termcolor==1.1.0
    terminado==0.8.1
    testpath==0.4.2
    toolz==0.9.0
    torch==0.3.0.post4
    torchfile==0.1.0
    torchnet==0.0.1
    torchvision==0.2.1
    tornado==4.2.1
    traitlets==4.3.2
    urllib3==1.24.1
    visdom==0.1.8.5
    wcwidth==0.1.7
    webencodings==0.5.1
    websocket-client==0.54.0
    Werkzeug==0.14.1
    widgetsnbextension==3.4.2

Actual behavior

$ cd /home/joey/code ; env "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1" /usr/bin/python /home/joey/.vscode/extensions/ms-python.python-2018.10.1/pythonFiles/experimental/ptvsd_launcher.py --client --host localhost --port 42851 /home/joey/code/training_tutorial.py
Using SpartanDataset:
   - in train mode
   - number of scenes 9
   - total images:     3730
training descriptor of dimension 3
INFO:root:Loading pose data for scene 2018-04-16-14-25-19
INFO:root:Loading pose data for scene 2018-04-16-14-40-25
INFO:root:Loading pose data for scene 2018-04-16-14-42-26
INFO:root:Loading pose data for scene 2018-04-16-14-44-53
INFO:root:Loading pose data for scene 2018-04-16-14-49-22
INFO:root:Loading pose data for scene 2018-04-16-15-23-41
INFO:root:Loading pose data for scene 2018-04-16-15-25-38
INFO:root:Loading pose data for scene 2018-04-16-15-28-45
INFO:root:Loading pose data for scene 2018-04-16-15-30-50
INFO:root:enabling domain randomization
using SINGLE_OBJECT_WITHIN_SCENE
INFO:root:setting up tensorboard_logger
INFO:root:tensorboard logger started
/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py:482: UserWarning: src is not broadcastable to dst, but they have the same number of elements.  Falling back to deprecated pointwise behavior.
  own_state[name].copy_(param)
Backend TkAgg is interactive backend. Turning interactive mode on.
Backend TkAgg is interactive backend. Turning interactive mode on.
Backend TkAgg is interactive backend. Turning interactive mode on.
Backend TkAgg is interactive backend. Turning interactive mode on.
We've got an error while stopping in post-mortem: <type 'exceptions.RuntimeError'>
We've got an error while stopping in post-mortem: <type 'exceptions.RuntimeError'>
We've got an error while stopping in post-mortem: <type 'exceptions.RuntimeError'>
We've got an error while stopping in post-mortem: <type 'exceptions.RuntimeError'>
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):



Traceback (most recent call last):

Error in atexit._run_exitfuncs:Error in sys.exitfunc:
Error in sys.exitfunc:
Error in atexit._run_exitfuncs:Error in sys.exitfunc:
Error in sys.exitfunc:

Expected behavior

when I directly ran the same python file in terminal, I got the following output:

joey@Joey:~/code$ python training_tutorial.py 
Using SpartanDataset:
   - in train mode
   - number of scenes 9
   - total images:     3730
training descriptor of dimension 3
INFO:root:Loading pose data for scene 2018-04-16-14-25-19
INFO:root:Loading pose data for scene 2018-04-16-14-40-25
INFO:root:Loading pose data for scene 2018-04-16-14-42-26
INFO:root:Loading pose data for scene 2018-04-16-14-44-53
INFO:root:Loading pose data for scene 2018-04-16-14-49-22
INFO:root:Loading pose data for scene 2018-04-16-15-23-41
INFO:root:Loading pose data for scene 2018-04-16-15-25-38
INFO:root:Loading pose data for scene 2018-04-16-15-28-45
INFO:root:Loading pose data for scene 2018-04-16-15-30-50
INFO:root:enabling domain randomization
using SINGLE_OBJECT_WITHIN_SCENE
INFO:root:setting up tensorboard_logger
INFO:root:tensorboard logger started
/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py:482: UserWarning: src is not broadcastable to dst, but they have the same number of elements.  Falling back to deprecated pointwise behavior.
  own_state[name].copy_(param)
Same scene, same object
Same scene, same object
Same scene, same object
Same scene, same object
Same scene, same object
scene_name is 2018-04-16-15-25-38
scene_name is 2018-04-16-15-30-50
scene_name is 2018-04-16-15-23-41
scene_name is 2018-04-16-15-23-41
scene_name is 2018-04-16-15-25-38
Same scene, same object
scene_name is 2018-04-16-14-40-25
Same scene, same object
scene_name is 2018-04-16-14-49-22
Same scene, same object
scene_name is 2018-04-16-15-25-38
Same scene, same object
scene_name is 2018-04-16-14-49-22
Same scene, same object
scene_name is 2018-04-16-14-40-25
Same scene, same object
scene_name is 2018-04-16-15-23-41
....

Steps to reproduce:

  1. XXX

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

XXX
@brettcannon
Copy link
Member

What is "post-mortem"? We are not generating that information. And the fact that Error in atexit._run_exitfuncs is showing up is suggesting that whatever tool you're running doesn't like the debugger running.

Can you provide code to replicate your issue?

@brettcannon brettcannon self-assigned this Nov 22, 2018
@brettcannon brettcannon added triage info-needed Issue requires more information from poster labels Nov 22, 2018
@zy871125746
Copy link
Author

This code is from pytorch-dense-correspondence. I converted the raining_tutorial.ipynb to .py file and run it via vscode and got the above errors.

By running program line by line, I found that this error happend when I use a pytorch loader

self._data_loader = torch.utils.data.DataLoader(self._dataset, batch_size=batch_size,
                                          shuffle=True, num_workers=num_workers, drop_last=True)

@brettcannon brettcannon removed the info-needed Issue requires more information from poster label Nov 26, 2018
@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug area-debugging upstream-ptvsd and removed triage labels Nov 28, 2018
@brettcannon brettcannon removed their assignment Nov 28, 2018
@MaxxRe3
Copy link

MaxxRe3 commented Dec 25, 2018

I have a similar issue. When I try to iterate over my torch.utils.data.DataLoader, I get an Error in atexit._run_exitfuncs as well (Along with some other errors. Butt the atext error seems to be the root).

VS Code version: Code 1.30.0 (c6e592b, 2018-12-11T22:22:15.793Z)
OS version: Darwin x64 18.2.0
Python: Python 3.6.7 :: Anaconda, Inc.

@microsoft microsoft locked and limited conversation to collaborators Jan 3, 2019
@brettcannon
Copy link
Member

@MaxxRe3 please provide any info to help to microsoft/ptvsd#1056.

@luabud
Copy link
Member

luabud commented Sep 11, 2019

@int19h do you know if this is fixed?

@luabud
Copy link
Member

luabud commented Sep 19, 2019

Closing in favour of microsoft/ptvsd#943.

@luabud luabud closed this as completed Sep 19, 2019
@ghost ghost removed the needs upstream fix label Sep 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants