[
https://issues.apache.org/jira/browse/WICKET-6966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719479#comment-17719479
]
ASF subversion and git services commented on WICKET-6966:
---------------------------------------------------------
Commit bd13a77cbccdd37ff058225ea1d0c06e257c9bdf in wicket's branch
refs/heads/wicket-9.x from dr0ps
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=bd13a77cbc ]
WICKET-6966, WICKET-7013: prevent unsynchronized access to pages (#587)
* Wicket-6966: prevent unsynchronized access to pages
* Added concurrency test case
---------
Co-authored-by: dr0ps <[email protected]>
(cherry picked from commit 125fe8ab96ce54565aaadaa3ba911b57439b85e1)
> 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)