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

Debugpy Server Disconnects Unexpectedly when Inspecting Variable #1338

Open
Ekhao opened this issue Jul 28, 2023 · 4 comments
Open

Debugpy Server Disconnects Unexpectedly when Inspecting Variable #1338

Ekhao opened this issue Jul 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Ekhao
Copy link

Ekhao commented Jul 28, 2023

  • debugpy version: 1.6.7
  • OS and version: macOS Ventura 13.4.1
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.10.11 set up using miniforge.
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Inspecting a variable will show me the contents of that variable

Expected behavior

A short message "Server[1] disconnected unexpectedly" is shown, followed by the debug session crashing.

Steps to reproduce:

  1. Use the following code:
import tensorflow as tf
a = []
for element in range(3):
    a.append(tf.random.uniform([60,144,80,1]))

c = 0
  1. set a breakpoint at c = 0
  2. Inspect the contents of a[0]

See below for log files captured during a crashed debugging session:
debugger.vscode_2ab32481-8c72-4e77-a1a8-e763da6858ba.log
debugpy.adapter-1716.log
debugpy.launcher-1719.log
debugpy.pydevd.1722.log
debugpy.server-1722.log

@int19h int19h added the bug Something isn't working label Sep 12, 2023
@int19h
Copy link
Contributor

int19h commented Sep 12, 2023

Exit code 245 is SIGSEGV, so it likely crashed somewhere in native code. Unfortunately, there isn't enough info in the logs to diagnose this - they just terminate abruptly while trying to evaluate a[0]. Do you know if there's anything unusual about that variable?

If there isn't anything obvious, we'll need a dump file to diagnose the crash.

@NateAGeek
Copy link

NateAGeek commented Oct 31, 2023

I am also receiving this issue. I do wonder if it has to do with Tensorflow data types, in this case an EagerTensor. As when I am doing debugging on a numpy array in the same debug context and was able to view it. Maybe since tensorflow does some autograph it is not mapping correctly or the debugger is crashing accessing some memory? I'm not too sure, but will see if I can pull more info on why this is crashing. Please do share any tips on where to find log files to maybe see where and why this crash is happening. I do feel like this debugger was working with TF before...

Update: Nope, I tried versions of this extension as back as far as a year, and it still was not working...

@Ekhao
Copy link
Author

Ekhao commented Oct 31, 2023

I apologize for not answering the first message - I must have missed it. As Nate mentions it likely has to do with the Tensorflow data types. I'll also be happy to provide more log files/dump files if you can provide me instructions for how to generate these!

@StarGate01
Copy link

StarGate01 commented Sep 20, 2024

Has there been any progress on this? I am also experiencing this issue with tensorflow / numpy data variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants