For now I would recommend upgrading to Undertow 1.4.1.Final when once
it is out (soonish). For the most part it should be a drop in
replacement for 1.3.x, except with improved ALPN support for HTTP/2.
I will get back to you about a possible merge into 1.3.x, I am still
figuring out a few things with regard to how to best manage this
branch.
Also with regards to tests if you make sure you close all websocket
connections before shutting down the worker this should not be an
issue.
Stuart
On Wed, Aug 3, 2016 at 10:47 PM, electrotype <electrotype(a)gmail.com> wrote:
Do I understand that this won't be fixed in the 1.3.X branch? If
not, I may
have to try to extend "AbstractFramedChannel" and apply your fix (
https://github.com/undertow-io/undertow/commit/e7b3f0342e60ad445e18ccde65...
). Not sure how easy this will be...
I agree it's not a major issue when running in production. The real problem
is that when the issue occures my tests take forever to complete.
Thanks Stuart!
Julien
On 2016-08-02 22:56, Stuart Douglas wrote:
>
> Looks like it is an exception that can occur when a server is being
> shut down. The close listener attempts to queue a task in the IO
> thread, but it is rejected because of the shutdown. It then executes
> it directly in the current thread, which results in another attempted
> dispatch.
>
> I have created:
https://issues.jboss.org/browse/UNDERTOW-791
>
> Should be an easy fix, and should not actually cause any issues
> because the server is being shut down anyway (at worst you might miss
> an OnClose notification).
>
> Stuart
>
> On Wed, Aug 3, 2016 at 12:34 PM, electrotype <electrotype(a)gmail.com>
> wrote:
>>
>> Hi,
>>
>> Using Undertow 1.3.23.Final, I sometimes get this error, when running my
>> WebSocket tests :
>>
>> ------------------------------------------
>>
>> 2016-08-02 21:56:15 [ERROR] XNIO001007: A channel event listener threw an
>> exception ~ Caller+0 at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:94)
>> java.lang.StackOverflowError: null
>> at
>>
>>
ch.qos.logback.classic.pattern.ThrowableProxyConverter.subjoinSTEPArray(ThrowableProxyConverter.java:197)
>> at
>>
>>
ch.qos.logback.classic.pattern.ThrowableProxyConverter.recursiveAppend(ThrowableProxyConverter.java:161)
>> at
>>
>>
ch.qos.logback.classic.pattern.ThrowableProxyConverter.throwableProxyToString(ThrowableProxyConverter.java:151)
>> at
>>
>>
ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(ThrowableProxyConverter.java:145)
>> at
>>
>>
ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(ThrowableProxyConverter.java:1)
>> at
>>
>>
ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:36)
>> at
>>
>>
ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:114)
>> at
>> ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:141)
>> at
>> ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:1)
>> at
>>
>>
ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:130)
>> at
>>
>> ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:187)
>> at
>>
>>
ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:212)
>> at
>>
>> ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:100)
>> at
>>
>>
ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:84)
>> at
>>
>>
ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48)
>> at
>> ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270)
>> at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257)
>> at
>> ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
>> at
>> ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
>> at ch.qos.logback.classic.Logger.log(Logger.java:765)
>> at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
>> at
>>
>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:497)
>> at
>>
>>
org.jboss.logging.Slf4jLocationAwareLogger.doLog(Slf4jLocationAwareLogger.java:89)
>> at
>>
>>
org.jboss.logging.Slf4jLocationAwareLogger.doLogf(Slf4jLocationAwareLogger.java:82)
>> at org.jboss.logging.Logger.logf(Logger.java:2445)
>> at
>>
>> org.xnio._private.Messages_$logger.listenerException(Messages_$logger.java:923)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:94)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener$2.run(AbstractFramedChannel.java:981)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel.runInIoThread(AbstractFramedChannel.java:235)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:978)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:937)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener$2.run(AbstractFramedChannel.java:981)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel.runInIoThread(AbstractFramedChannel.java:235)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:978)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:937)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener$2.run(AbstractFramedChannel.java:981)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel.runInIoThread(AbstractFramedChannel.java:235)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:978)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:937)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener$2.run(AbstractFramedChannel.java:981)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel.runInIoThread(AbstractFramedChannel.java:235)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:978)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:937)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener$2.run(AbstractFramedChannel.java:981)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel.runInIoThread(AbstractFramedChannel.java:235)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:978)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:937)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
>> ...
>> ------------------------------------------
>>
>> The
>> ------------------------------------------
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener$2.run(AbstractFramedChannel.java:981)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel.runInIoThread(AbstractFramedChannel.java:235)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:978)
>> at
>>
>>
io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:937)
>> at
>> org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
>> ------------------------------------------
>>
>> part is repeated a lot of times before a stack overflow is reached.
>>
>> I'm currently not able to reproduce the error on demand, most of the time
>> it
>> works just fine. I'm still investigating.
>>
>> I'd like to know if someone has already seen this? Any potential causes
>> you
>> may think of?
>>
>> Thanks,
>>
>> Julien
>>
>>
>>
>> _______________________________________________
>> undertow-dev mailing list
>> undertow-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/undertow-dev