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

Hook handling blocks EventLoop by searching for regex matches in a loop #598

Open
hiddenalpha opened this issue Jun 17, 2024 · 0 comments
Open

Comments

@hiddenalpha
Copy link
Member

hiddenalpha commented Jun 17, 2024

2024-06-17T16:59:30,636 int houston WARN BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-1,5,main] has been blocked for 177 ms, time limit is 8 ms
io.vertx.core.VertxException: Thread blocked
        at java.util.regex.Matcher.reset(Matcher.java:406) ~[?:?]
        at java.util.regex.Matcher.<init>(Matcher.java:253) ~[?:?]
        at java.util.regex.Pattern.matcher(Pattern.java:1134) ~[?:?]
        at org.swisspush.gateleen.hook.ListenerRepositoryBase.filter(ListenerRepositoryBase.java:59) ~[gateleen-hook-2.1.8.jar:?]
        at org.swisspush.gateleen.hook.ListenerRepositoryBase.findListeners(ListenerRepositoryBase.java:37) ~[gateleen-hook-2.1.8.jar:?]
        at org.swisspush.gateleen.hook.LocalListenerRepository.findListeners(LocalListenerRepository.java:65) ~[gateleen-hook-2.1.8.jar:?]
        at org.swisspush.gateleen.hook.LocalListenerRepository.findListeners(LocalListenerRepository.java:115) ~[gateleen-hook-2.1.8.jar:?]
        at org.swisspush.gateleen.hook.HookHandler.handle(HookHandler.java:575) ~[gateleen-hook-2.1.8.jar:?]
        at ch.post.it.paisa.houston.process.main.MainVerticle.lambda$createRouter$4(MainVerticle.java:643) ~[houston-process-02.01.63.00.jar:?]
        at ch.post.it.paisa.houston.process.main.MainVerticle$$Lambda$1537/0x0000000840786c40.handle(Unknown Source) ~[?:?]
        at org.swisspush.gateleen.security.authorization.Authorizer.authorize(Authorizer.java:142) ~[gateleen-security-2.1.8.jar:?]
        at ch.post.it.paisa.houston.process.main.MainVerticle.lambda$createRouter$5(MainVerticle.java:606) ~[houston-process-02.01.63.00.jar:?]
        at ch.post.it.paisa.houston.process.main.MainVerticle$$Lambda$1296/0x00000008406fdc40.handle(Unknown Source) ~[?:?]
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285) ~[vertx-web-4.5.1.jar:4.5.1]
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177) ~[vertx-web-4.5.1.jar:4.5.1]
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:143) ~[vertx-web-4.5.1.jar:4.5.1]
        at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:68) ~[vertx-web-4.5.1.jar:4.5.1]
        at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37) ~[vertx-web-4.5.1.jar:4.5.1]
        at io.vertx.core.http.impl.Http1xServerRequestHandler.handle(Http1xServerRequestHandler.java:67) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.vertx.core.http.impl.Http1xServerRequestHandler.handle(Http1xServerRequestHandler.java:30) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:335) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.vertx.core.impl.DuplicatedContext.emit(DuplicatedContext.java:176) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:174) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.vertx.core.net.impl.ConnectionBase.read(ConnectionBase.java:159) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:153) ~[vertx-core-4.5.1.jar:4.5.1]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.onHttpRequestChannelRead(WebSocketServerExtensionHandler.java:160) ~[netty-codec-http-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.channelRead(WebSocketServerExtensionHandler.java:83) ~[netty-codec-http-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333) ~[netty-codec-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454) ~[netty-codec-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[netty-codec-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.103.Final.jar:4.1.103.Final]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.103.Final.jar:4.1.103.Final]
        at java.lang.Thread.run(Thread.java:829) ~[?:?]

Update 2024-10-08: Not seen for a while. Maybe this had to do with some GarbageCollecting issues? If so, the error message here is more misleading than helpful.

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

No branches or pull requests

1 participant