[
https://issues.apache.org/jira/browse/WICKET-6966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17717262#comment-17717262
]
ASF GitHub Bot commented on WICKET-6966:
----------------------------------------
dr0ps commented on PR #587:
URL: https://github.com/apache/wicket/pull/587#issuecomment-1525869235
> You could try to make it 100% reliable with executorservice and Threadpool
like here for a similar Testcase:
>
>
https://github.com/apache/wicket/blob/5d46ca58cc835b2ac925c14190260c6253db2c3e/wicket-spring/src/test/java/org/apache/wicket/spring/injection/bytebuddy/ParallelInjectionTest.java#L115
That is just as reliable as my test. AbstractExecutorService#invokeAll uses
a loop to execute each tests. In no way it guarantees parallel execution as in
the end this is very much depending on the underlying OS and hardware. So for
consistency reasons I think my test should look like the ParallelInjectionTest.
But both tests do not actually prove the absence of a problem.
> IndexOutOfBounds in InSessionPageStore
> --------------------------------------
>
> Key: WICKET-6966
> URL: https://issues.apache.org/jira/browse/WICKET-6966
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 9.8.0
> Reporter: Youri de Boer
> Assignee: Sven Meier
> Priority: Major
> Fix For: 10.0.0, 9.9.1
>
>
> Recently (since wicket 9?) we are seeing the following exception in our log.
> {{ERROR | [default task-43] | 2022-03-28 10:19:03,978 |
> org.apache.wicket.util.listener.ListenerCollection$1.java:124 | Error
> invoking listener: org.apache.wicket.Application$2@6e1ac438 "mdw=152293"}}
> {{java.lang.IndexOutOfBoundsException: Index: 0, Size: -1}}
> {{ at
> java.base/java.util.LinkedList.checkPositionIndex(LinkedList.java:564)}}
> {{ at java.base/java.util.LinkedList.listIterator(LinkedList.java:871)}}
> {{ at
> java.base/java.util.AbstractList.listIterator(AbstractList.java:311)}}
> {{ at
> java.base/java.util.AbstractSequentialList.iterator(AbstractSequentialList.java:238)}}
> {{ at
> org.apache.wicket.pageStore.InSessionPageStore$SessionData.remove(InSessionPageStore.java:226)}}
> {{ at
> org.apache.wicket.pageStore.InSessionPageStore$SessionData.add(InSessionPageStore.java:212)}}
> {{ at
> org.apache.wicket.pageStore.InSessionPageStore$CountLimitedData.add(InSessionPageStore.java:320)}}
> {{ at
> org.apache.wicket.pageStore.InSessionPageStore.addPage(InSessionPageStore.java:127)}}
> {{ at
> org.apache.wicket.pageStore.CachingPageStore.addPage(CachingPageStore.java:71)}}
> {{ at
> org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:114)}}
> {{ at org.apache.wicket.page.PageManager.detach(PageManager.java:91)}}
> {{ at org.apache.wicket.Application$2.onDetach(Application.java:1582)}}
> {{ at
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105)}}
> {{ at
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)}}
> {{ at
> org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:120)}}
> {{ at
> org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)}}
> {{ at
> org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:113)}}
> {{ at
> org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100)}}
> {{ at
> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:670)}}
> {{ at
> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:625)}}
> {{ at
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:285)}}
> {{ at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:208)}}
> {{ at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)}}
> {{ at
> [email protected]//javax.servlet.http.HttpServlet.service(HttpServlet.java:503)}}
>
> When this occurs it typically appears about 100 times in a very short time
> span. The users experiences a hanging page.
> Obviously, the size of a list can not be -1; I believe this to be a result of
> a race condition between one of the public methods (which are synchronized)
> and the writeObject method, which is not synchronized.
>
> One additional note: we are running 2 wars (with wicket) on the same
> container.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)