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

Remote debugging connection establishment is slow #39

Open
frandragomanovic opened this issue May 3, 2022 · 12 comments
Open

Remote debugging connection establishment is slow #39

frandragomanovic opened this issue May 3, 2022 · 12 comments

Comments

@frandragomanovic
Copy link

While using remote debugging both in Eclipse and in Intellij we've noticed that connection establishment works much faster with Intellij.

  • Eclipse: ~30sec
  • Intellij Idea: less then 1sec

Additionally there is a rather large difference between package count sent to the server in both cases:

  • Eclipse: 2849
  • Intellij Idea: 20

Also, we unchecked all of the following options:

  • Debug View -> Java -> Show Monitors
  • Debug View -> Java -> Show Running Threads
  • Debug View -> Java -> Show System Threads
  • Debug View -> Java -> Show Qualified Names
  • Debug View -> Java -> Show Thread Groups

In the attachment network snapshots (with Wireshark) for both are provided.
network-snapshots.zip

Versions used:

  • Eclipse: 2021-09 (4.21.0), Build id: 20210910-1417
  • Java: openjdk 11.0.14 2022-01-18 LTS
    OpenJDK Runtime Environment Zulu11.54+23-CA (build 11.0.14+9-LTS)
    OpenJDK 64-Bit Server VM Zulu11.54+23-CA (build 11.0.14+9-LTS, mixed mode)

We also tried it out with the latest Eclipse (2022-03) but the behavior is the same.

Could you please tell us how could we speed this up? Is there some kind of setting which could be adjusted?

Thank you in advance!

@iloveeclipse
Copy link
Member

Have no idea how to read attached network snapshots.

Could you provide steps to reproduce?

@gsustek
Copy link

gsustek commented May 3, 2022

@iloveeclipse
Copy link
Member

@iloveeclipse with https://www.wireshark.org/download.html :-)

No, really?
What I've meant is: I have zero experience eith wireshark and so have no idea how to read attached snapshots. If you have such experience, please be so kind and explain it.

Still open: could you provide steps to reproduce? That is more important as reading network dumps.

@cheorges
Copy link

cheorges commented May 4, 2022

You can reproduce this behiavour, if you try to connact over vpn with your local running eclipse to the application which is running on a server.

  1. Start an Java based application on a server
  2. Start on your local machine Eclipse
  3. Connect you to vpn, so you can reach the server over vpn
  4. Create remote debug connection and launch remote debugging (this step takes around ~30sec, with some latency it can grow over 2min)

The same setup but with idea can connect the remote session under 1sec.

Environment is:
Local: MacOS Monterey 12.3.1 (MacBook Pro M1)
Server: RedHat 8.5 x86_64 Linux

About the network dumps. You can look into the TCP stream if you follow these steps: screenshots.zip

  1. Open the network dumps with wireshark
  2. Add a filter
    for eclipse dump: tcp.stream eq 1
    for idea dump: tcp.stream eq 5
  3. Right click on a table entry -> Follow -> TCP Stream
  4. You will see the communication between server and client

@SarikaSinha
Copy link
Member

I have not looked at the dumps, but just to understand what kind of breakpoints do you have? Any method exit breakpoints which can slow down? How many breakpoints are there approximately?
By default "Show method result after step operation" is switched off for remote launch, but please conform.
Are you observing a regression ?

@cheorges
Copy link

Hi @SarikaSinha, there are no breakpoints. It takes time for Eclipse to create a debug connection. During debugging the speed is ok, if all monitoring stuff is disabled like described by @frandragomanovic.

Unchecked all of the following options:

Debug View -> Java -> Show Monitors
Debug View -> Java -> Show Running Threads
Debug View -> Java -> Show System Threads
Debug View -> Java -> Show Qualified Names
Debug View -> Java -> Show Thread Groups

The main problem is that the connection establishment.

@JLeenk
Copy link

JLeenk commented Jul 21, 2022

Hello all)
I also have the same issues with remote debugging like @frandragomanovic described.
And not only connection establishment (it could takes more than minute) and even after that the step by step debugging works extremely slow in comparing with IntelliJ IDEA Community Edition and Apache NetBeans. The delay could take 5 and more seconds.
If you need some more info I can give you it but provide me instructions how I can collect necessary for you info.

@rksharma1401
Copy link

rksharma1401 commented Oct 15, 2023

Same issue seems eclipse is too slow to connect no logs or error just the connection takes too much time and even after connecting debug is too slow every steps takes time.
Java debugger command line is connecting instantaneously and works fine but eclipse takes more than 10-20 Sec .

@iloveeclipse any pointer would be helpful in code, exactly where too look for connection issue

@rksharma1401
Copy link

@SarikaSinha can you please help

@SarikaSinha
Copy link
Member

As far as I see, Eclipse uses java.net.ServerSocket to setup the connection and that should not take extra time for Eclipse alone. Can you attach the Screenshots with filtering tcp.stream eq 1 and tcp.stream eq 5 ?
This will give me a quick view to understand if the problem is at which level?
I will also try to add some logs to trace this based on these screenshots.

@rksharma1401
Copy link

my network admin team doesn't allow me to install wireshark or tcpdump as well , if possible can we try with logs
May be existing screenshots can be used .
Or can you suggest how else can I help

@rksharma1401
Copy link

@SarikaSinha did we get any new build with logs , if you can provide , I can share logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants