[
https://issues.jboss.org/browse/WFLY-3962?page=com.atlassian.jira.plugin....
]
John Sanda commented on WFLY-3962:
----------------------------------
We hit the issue again with 9.0.0.Beta1. Here is the exception we see,
{noformat}
2015-03-26 07:09:00,535 SEVERE [com.google.common.util.concurrent.ExecutionList]
(MetricsThreadPool-3) RuntimeException while executing runnable
com.google.common.util.concurrent.Futures$4@7d226165 with executor
com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService@791dea19:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) [rt.jar:1.8.0_20]
at java.util.HashMap$KeyIterator.next(HashMap.java:1453) [rt.jar:1.8.0_20]
at io.undertow.servlet.util.IteratorEnumeration.nextElement(IteratorEnumeration.java:44)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.weld.util.collections.EnumerationList.<init>(EnumerationList.java:42)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
org.jboss.weld.context.beanstore.http.RequestBeanStore.getAttributeNames(RequestBeanStore.java:48)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
org.jboss.weld.context.beanstore.AttributeBeanStore.getPrefixedAttributeNames(AttributeBeanStore.java:198)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.context.beanstore.AttributeBeanStore.attach(AttributeBeanStore.java:95)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
org.jboss.weld.context.http.HttpRequestContextImpl.associate(HttpRequestContextImpl.java:57)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
org.jboss.weld.context.http.HttpRequestContextImpl.associate(HttpRequestContextImpl.java:38)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
org.jboss.weld.servlet.HttpContextLifecycle.requestInitialized(HttpContextLifecycle.java:214)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
org.jboss.weld.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:160)
[weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at
io.undertow.servlet.core.ApplicationListeners.requestInitialized(ApplicationListeners.java:216)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at
io.undertow.servlet.spec.AsyncContextImpl.setupRequestContext(AsyncContextImpl.java:681)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.AsyncContextImpl.onAsyncComplete(AsyncContextImpl.java:591)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.AsyncContextImpl.complete(AsyncContextImpl.java:269)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.resteasy.plugins.server.servlet.Servlet3AsyncHttpRequest$Servlet3ExecutionContext$Servle3AsychronousResponse.resume(Servlet3AsyncHttpRequest.java:97)
[async-http-servlet-3.0-3.0.10.Final.jar:]
at org.hawkular.metrics.api.jaxrs.util.ApiUtils$1.onSuccess(ApiUtils.java:73) [classes:]
at org.hawkular.metrics.api.jaxrs.util.ApiUtils$1.onSuccess(ApiUtils.java:70) [classes:]
at com.google.common.util.concurrent.Futures$4.run(Futures.java:1181)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
[guava-16.0.1.jar:]
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
[guava-16.0.1.jar:]
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.Futures$ChainingListenableFuture$1.run(Futures.java:872)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.Futures$ImmediateFuture.addListener(Futures.java:102)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:868)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
[guava-16.0.1.jar:]
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
[guava-16.0.1.jar:]
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.Futures$ChainingListenableFuture$1.run(Futures.java:872)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.Futures$ImmediateFuture.addListener(Futures.java:102)
[guava-16.0.1.jar:]
at
com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:868)
[guava-16.0.1.jar:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_20]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_20]
{noformat}
At this point I cannot rule out the possibility that it is something in our application
code, so we will try to reproduce with something simpler.
https://issues.jboss.org/browse/WFLY-4352 is mentioned, and I see that it is marked
resolved for beta 2. How similar are these issues?
onComplete for async listeners not always called
------------------------------------------------
Key: WFLY-3962
URL:
https://issues.jboss.org/browse/WFLY-3962
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Affects Versions: 8.0.0.Final, 8.1.0.Final
Reporter: Heiko Rupp
Assignee: Stuart Douglas
Fix For: 8.2.0.Final, 9.0.0.Beta1
I have a servlet filter that does
chain.doFilter(requestWrapper, responseWrapper);
if (request.isAsyncStarted()) {
asyncListener =
request.getAsyncContext().createListener(JsonPAsyncListener.class);
request.getAsyncContext().addListener(asyncListener, requestWrapper,
responseWrapper);
}
And (sometimes) this works well so that the onComplete() method of the listener is
called.
But this does not happen always. In some (repeatable) condition none of the callback
methods in my AsyncListener are called.
I was first thinking that the servlet (resteasy) behind chain.doFilter() is so fast that
it completes
before I can add the listener.
But then I tried adding a Thread.sleep() in the RE code which did not change anything.
Similar when I do a startAsync() and add the listener before calling chain.doFilter()
This happens both on Wfly 8.0 and 8.1
Basically it boils down that if the "backend" uses
Futures.immediateFuture(result) , onComplete is not called.
I have created a as small as possible war file + a read me on how to drive that via
curl.
See
https://github.com/pilhuhn/misc/tree/master/web-goo
I just added 2 examples to the readme file that show that if no
wrapping by the filter is requested, the resteasy code works with
both Futures.immediate... and Futures.transform(...)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)