pythonfinder icon indicating copy to clipboard operation
pythonfinder copied to clipboard

Hard hang in find_python_version()

Open mathrick opened this issue 4 years ago • 4 comments

I'm not sure what's causing this, and what details of my environment might be relevant, but I'm encountering a hard hang when calling Finder.find_python_version or Finder.find_all_python_versions. The Python process becomes entirely unresponsive, ignoring Ctrl+C, Ctrl+Z and the like. Killing it from another terminal is the only way to quit.

Environment:

  • Ubuntu 20.04
  • Python 3.x (tried with 3.6.8 and 3.8.5)
  • Using pyenv with pyenv-virtualenv
  • Seems to affect all virtualenvs equally

mathrick avatar Sep 07 '21 05:09 mathrick

Try Ctrl-d.

I am seeing this with pyrepl being installed (via pdb++), which ships pythoni, which gets picked up / tried by pythonfinder, but acts as an interactive shell always (ignoring --version etc).

I think pythonfinder maybe should close stdin when trying out existing python interpreters maybe at least.

Of course, try also strace, pstree etc to figure out what happens really.

blueyed avatar Sep 07 '21 09:09 blueyed

@blueyed: you're right, I do have pdb++ installed. Ctrl+D didn't help (I'm assuming because pythonfinder doesn't attach the TTY when spawning subprocesses), but that sounds very likely.

mathrick avatar Sep 07 '21 15:09 mathrick

Now that you mention it, I see pythoni in the ps output, so you're definitely right.

mathrick avatar Sep 07 '21 15:09 mathrick

You might need it several times: press it and wait a few seconds, before pressing it again (to not accidentally close the terminal).

blueyed avatar Sep 07 '21 17:09 blueyed