Debugging and Vert.x thread blocked

1,114 views
Skip to first unread message

Guillaume Smet

unread,
Nov 27, 2019, 11:23:07 AM11/27/19
to Quarkus Development mailing list
Hi,

So when debugging, we have a lot of warnings like that (with the full stacktrace):
2019-11-27 17:20:08,284 WARNING [io.ver.cor.imp.BlockedThreadChecker] (vertx-blocked-thread-checker) Thread Thread[vert.x-worker-thread-0,5,main]=Thread[vert.x-worker-thread-0,5,main] has been blocked for 108607 ms, time limit is 60000 ms: io.vertx.core.VertxException: Thread

Shouldn't we maybe set the default to a much higher limit if we are in debug mode and this is set to the default value?

I can see it could be confusing if you're trying to debug what's going on with this warning but it's really annoying when trying to debug a totally unrelated issue.

Thoughts?

--
Guillaume

Stephane Epardaud

unread,
Nov 27, 2019, 11:50:37 AM11/27/19
to Guillaume Smet, Quarkus Development mailing list
We discussed that many times, and we always failed to find a way to tell if a debugger is attached.

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo-j0JxNU3EHO1JMo0opPKKBQ5kOgcG58ez8RdpD2MbxAQ%40mail.gmail.com.


--
Stéphane Épardaud

Martin Kouba

unread,
Nov 27, 2019, 11:52:40 AM11/27/19
to stephane...@gmail.com, Guillaume Smet, Quarkus Development mailing list
Dne 27. 11. 19 v 17:50 Stephane Epardaud napsal(a):
> We discussed that many times, and we always failed to find a way to tell
> if a debugger is attached.

We could just set a bigger limit if the debug mode is not disabled in
the dev mode?

>
> On Wed, 27 Nov 2019 at 17:23, Guillaume Smet <guillau...@gmail.com
> <mailto:guillau...@gmail.com>> wrote:
>
> Hi,
>
> So when debugging, we have a lot of warnings like that (with the
> full stacktrace):
> 2019-11-27 17:20:08,284 WARNING
> [io.ver.cor.imp.BlockedThreadChecker] (vertx-blocked-thread-checker)
> Thread
> Thread[vert.x-worker-thread-0,5,main]=Thread[vert.x-worker-thread-0,5,main]
> has been blocked for 108607 ms, time limit is 60000 ms:
> io.vertx.core.VertxException: Thread
>
> Shouldn't we maybe set the default to a much higher limit if we are
> in debug mode and this is set to the default value?
>
> I can see it could be confusing if you're trying to debug what's
> going on with this warning but it's really annoying when trying to
> debug a totally unrelated issue.
>
> Thoughts?
>
> --
> Guillaume
>
> --
> You received this message because you are subscribed to the Google
> Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to quarkus-dev...@googlegroups.com
> <mailto:quarkus-dev...@googlegroups.com>.
> <https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo-j0JxNU3EHO1JMo0opPKKBQ5kOgcG58ez8RdpD2MbxAQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Stéphane Épardaud
>
> --
> You received this message because you are subscribed to the Google
> Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to quarkus-dev...@googlegroups.com
> <mailto:quarkus-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9tg4jm%2Bho-8rRRRrky4fJ7c5Sh22MyKhbFTnZE8Uqs9gQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9tg4jm%2Bho-8rRRRrky4fJ7c5Sh22MyKhbFTnZE8Uqs9gQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic

Guillaume Smet

unread,
Nov 27, 2019, 11:59:59 AM11/27/19
to Martin Kouba, Stephane Epardaud, Quarkus Development mailing list
On Wed, Nov 27, 2019 at 5:52 PM Martin Kouba <mko...@redhat.com> wrote:
Dne 27. 11. 19 v 17:50 Stephane Epardaud napsal(a):
> We discussed that many times, and we always failed to find a way to tell
> if a debugger is attached.

We could just set a bigger limit if the debug mode is not disabled in
the dev mode?

And in test mode if possible.

--
Guillaume

clement escoffier

unread,
Nov 27, 2019, 1:43:35 PM11/27/19
to Guillaume Smet, Martin Kouba, Stephane Epardaud, Quarkus Development mailing list
Hello,

I guess we can increase the timeout - even disable it (setting it to Long.MAX):

- in tests
- in dev mode when debug is enabled (-Ddebug so we could potentially check the existence of this system property - that would not work in debug is enabled from the Maven/Gradle config).

Clement

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo-k9zez5qQOD_aX-8v_fHLSq_6wSD1E9k2ZbG%3DDdXJxZA%40mail.gmail.com.

Lin Gao

unread,
Nov 27, 2019, 9:29:05 PM11/27/19
to Quarkus Development mailing list
Disable the checker by setting it to Long.MAX_VALUE does not sound good, I think the BlockedThreadChecker should not be created in Vert.x in this case?

Best Regards
Lin Gao


On Thursday, November 28, 2019 at 2:43:35 AM UTC+8, clement escoffier wrote:
Hello,

I guess we can increase the timeout - even disable it (setting it to Long.MAX):

- in tests
- in dev mode when debug is enabled (-Ddebug so we could potentially check the existence of this system property - that would not work in debug is enabled from the Maven/Gradle config).

Clement

Le mer. 27 nov. 2019 à 17:59, Guillaume Smet <guilla...@gmail.com> a écrit :
On Wed, Nov 27, 2019 at 5:52 PM Martin Kouba <mko...@redhat.com> wrote:
Dne 27. 11. 19 v 17:50 Stephane Epardaud napsal(a):
> We discussed that many times, and we always failed to find a way to tell
> if a debugger is attached.

We could just set a bigger limit if the debug mode is not disabled in
the dev mode?

And in test mode if possible.

--
Guillaume

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.

Thomas SEGISMONT

unread,
Nov 28, 2019, 4:22:44 AM11/28/19
to Quarkus Development mailing list
Hi,

I wasn't aware of past discussions about this, so sorry if the following has been said before.


> In development mode, Quarkus starts by default with debug mode enabled, listening to port 5005 without suspending the JVM.
> This behavior can be changed by giving the debug system property one of the following values:

So it seems to me that the debug property value is the way to detect if the blocked thread checker should be active or disabled (with timeout set to Long.MAX_VALUE)

The vertx maven plugin works similarly.

Regards,
Thomas


To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/e8be4745-6419-4f8c-a552-98d11f074995%40googlegroups.com.

Max Rydahl Andersen

unread,
Nov 28, 2019, 3:01:34 PM11/28/19
to stephane...@gmail.com, Guillaume Smet, Quarkus Development mailing list
Hi Stephane,

Since this would be in plain VM mode couldn't we do something like the following?

boolean isDebug = java.lang.management.ManagementFactory.getRuntimeMXBean().
getInputArguments().toString().indexOf("-agentlib:jdwp") > 0;

?
Reply all
Reply to author
Forward
0 new messages