fabioz / PyDev.Debugger

Sources for the debugger used in PyDev, PyCharm and VSCode Python
Eclipse Public License 1.0
425 stars 122 forks source link

Random disconnects from remote debugger using Jython #77

Open yanivsag opened 7 years ago

yanivsag commented 7 years ago

Hi, I manage to connect to the debugger from a remote Jython script (running in localhost). i can step over the python calls, but at some point the script resumes and continues without me hitting resume. Same happened in both PyCharm and Eclipse. I have also tried using Jython directly or through JSR-223 scripting but got the same results.

Thanks

fabioz commented 7 years ago

This is a duplicate of https://github.com/fabioz/PyDev.Debugger/issues/76

fabioz commented 7 years ago

Reopening since it happens on 5.5.0.

Do you have a sample test case to check it?

yanivsag commented 7 years ago

Not in front of my PC,

But I can describe what I did as it's pretty simple. I have a tomcat webapp that launches jython through JSR223 ( but it also happened when I called Jython directly).

On Wed, 29 Mar 2017 at 18:38 Fabio Zadrozny notifications@github.com wrote:

Reopening since it happens on 5.5.0.

Do you have a sample test case to check it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fabioz/PyDev.Debugger/issues/77#issuecomment-290130271, or mute the thread https://github.com/notifications/unsubscribe-auth/AZhtIw0ROQJ9zu-jYRn2SQ7yxQTLYDkkks5rqnsOgaJpZM4MtEJC .

yanivsag commented 7 years ago

Hi, I have tried it without the embedded tomcat server. It seems to be working. I wonder what tomcat is doing that may cause this disconnect.

yanivsag commented 7 years ago

Hi Fabio, We've just noticed another strange thing. Running our webapp with Jetty instead of Tomcat works flawlessly. Can you think of a something in pydevd that may conflict with Tomcat? Maybe the problem is a pure Tomcat configuration issue.

Thanks in Advance.

fabioz commented 7 years ago

Unfortunately no... my guess is that for some reason the tracing calls (from sys.settrace) are not being called...

The usual culprits are:

yanivsag commented 7 years ago

Thanks Fabio. We only have a single process that calls settrace. Running Wireshark we see a tcp.fin entry originating from the jython side, but I don't know how to trace the Java or Jython call that terminates it. Again, with Jetty as an application server, running the same Jython code it runs flawlessly. I am in the process of verifying whether I can switch to Jetty, but if I'll find a solution to this tomcat issue, I'll keep you posted. On Mon, 5 Jun 2017 at 15:24 Fabio Zadrozny notifications@github.com wrote:

Unfortunately no... my guess is that for some reason the tracing calls (from sys.settrace) are not being called...

The usual culprits are:

  • a stack overflow error is being triggered and automatically disables the tracing (unfortunately, this may not be uncommon and it does break the debugger)
  • some application is using sys.settrace itself (which also breaks the debugger).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fabioz/PyDev.Debugger/issues/77#issuecomment-306175049, or mute the thread https://github.com/notifications/unsubscribe-auth/AZhtI36XL8tF3uQq_6amZAQFaVD5QoAjks5sA_OTgaJpZM4MtEJC .