facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Increase debugger poll timeout #2588

Closed idanakav closed 3 years ago

idanakav commented 3 years ago

This is a workaround for an issue we recently observed where IntelliJ is failing to attach debugger in some tests.

There is a possible ongoing race condition when running tests with the --debug flag where BUCK will try to attach the debugger too early and in some cases, mainly larger targets, it will fail.

IntelliJ implementation has polling mechanism where it will retry the creation and attaching the debugger, increasing the pooling time to 30s is giving us enough time for BUCK to execute.

Once the polling timeout is reached to 0 and the debugger was not successfully attached the UX is bad since there is no feedback to the end user and the IJ/CLI are stuck in Debugging. Suspending JVM. Connect a JDWP debugger to port 5005 to proceed.

This should not have a negative impact on smaller targets where the debugger is attached almost instantly.

facebook-github-bot commented 3 years ago

Hi @idanakav!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

KapJI commented 3 years ago

3 seconds sounds like a reasonable timeout, probably your issue is with something else. Also we need CI tests to be green. Closing for now.