PyDev.Debugger icon indicating copy to clipboard operation
PyDev.Debugger copied to clipboard

Random disconnects from remote debugger using Jython

Open yanivsag opened this issue 8 years ago • 7 comments

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

yanivsag avatar Mar 29 '17 14:03 yanivsag

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

fabioz avatar Mar 29 '17 15:03 fabioz

Reopening since it happens on 5.5.0.

Do you have a sample test case to check it?

fabioz avatar Mar 29 '17 15:03 fabioz

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 [email protected] 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 avatar Mar 29 '17 15:03 yanivsag

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 avatar Mar 30 '17 08:03 yanivsag

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.

yanivsag avatar Jun 04 '17 11:06 yanivsag

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).

fabioz avatar Jun 05 '17 12:06 fabioz

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 [email protected] 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 .

yanivsag avatar Jun 05 '17 16:06 yanivsag