Hi,

PageAccessSynchronizer#detach() unlocks all pages.

Is your request logger running after that?

Have fun
Sven


On 13.08.19 07:46, Martin Grigorov wrote:
Hi,

If the page is not unlocked then it is a bug.
But it is strange that no one faced it before. This code is in use since
Wicket 1.5.0.

On Tue, Aug 13, 2019 at 7:38 AM Andrew Kondratev <and...@kondratev.pro>
wrote:

Hi!

My colleague noticed some dodgy behavior, which I think could be a bug.
Just asking here if it's known, befor I try to create a quickstart or PR.

* page is rendered
* user interacts with a page causing ajax request (clicking checkbox)
* the wicket PageAccessSynchronizer locks, renders and unlocks the page
with that id
* after that, custom request logger asks for the className of the current
page
* the PageProvider doesn't have it on hand, so has to ask for the page from
DefaultMapperContext#getPageInstance
* that in turn locks the page again -- without unlocking it
* so subsequent interaction with the same component blows up after a minute
of not being able to get the lock for the page

Wicket 8.5.0

The stack trace
org.apache.wicket.page.CouldNotLockPageException: Could not lock page 86.
Attempt lasted 1 minute
at
org.apache.wicket.page
.PageAccessSynchronizer.lockPage(PageAccessSynchronizer.java:168)
at
org.apache.wicket.page
.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:246)
at

org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:101)
at

org.apache.wicket.core.request.handler.PageProvider$Provision.resolve(PageProvider.java:412)
at

org.apache.wicket.core.request.handler.PageProvider.getProvision(PageProvider.java:163)
at

org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
at

org.apache.wicket.core.request.handler.PageProvider.getPageClass(PageProvider.java:257)
at

org.apache.wicket.core.request.handler.ListenerRequestHandler.getPageClass(ListenerRequestHandler.java:108)
at

org.apache.wicket.protocol.https.HttpsMapper.getDesiredSchemeFor(HttpsMapper.java:199)
at

org.apache.wicket.protocol.https.HttpsMapper.mapRequest(HttpsMapper.java:103)
at

org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:147)
at

org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:193)
at

org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:243)
at

com.mycompany.core.web.framework.MyRequestCycle.processRequest(MyRequestCycle.java:129)
at

org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
at

org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:275)
at

org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:206)
at

org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:299)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

com.mycompany.core.web.filter.ResponseHeadersFilter.doFilter(ResponseHeadersFilter.java:31)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

com.mycompany.core.web.filter.MDCEnhancingFilter.lambda$doFilterInternal$0(MDCEnhancingFilter.java:29)
at

com.mycompany.common.logging.LoggingContextUtil$VoidCallable.call(LoggingContextUtil.java:168)
at

com.mycompany.common.logging.LoggingContextUtil$VoidCallable.call(LoggingContextUtil.java:163)
at

com.mycompany.common.logging.LoggingContextUtil.runWithLoggingContext(LoggingContextUtil.java:65)
at

com.mycompany.common.logging.LoggingContextUtil.runWithLoggingContext(LoggingContextUtil.java:34)
at

com.mycompany.core.web.filter.MDCEnhancingFilter.doFilterInternal(MDCEnhancingFilter.java:29)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208)
at

org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:185)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

com.mycompany.core.security.sso.saml.MySamlMetadataLoadingFilter.doFilter(MySamlMetadataLoadingFilter.java:57)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

com.mycompany.integration.filter.MyIntegration.doFilter(MyIntegration.java:68)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

com.mycompany.core.security.common.SecurityContextValidatingFilter.doFilterInternal(SecurityContextValidatingFilter.java:29)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:124)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)
at

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at

org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at

org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at

org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at

org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

com.mycompany.core.web.filter.DomainFilter.doFilterInternal(DomainFilter.java:87)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at

org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

org.springframework.orm.hibernate5.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

com.mycompany.core.web.filter.UnhandledThrowableFilter.doFilterInternal(UnhandledThrowableFilter.java:36)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

com.mycompany.core.web.filter.RequestLoggingFilter.lambda$doFilterInternal$0(RequestLoggingFilter.java:46)
at

com.mycompany.common.logging.LoggingContextUtil$VoidCallable.call(LoggingContextUtil.java:168)
at

com.mycompany.common.logging.LoggingContextUtil$VoidCallable.call(LoggingContextUtil.java:163)
at

com.mycompany.common.logging.LoggingContextUtil.runWithLoggingContext(LoggingContextUtil.java:65)
at

com.mycompany.core.web.filter.RequestLoggingFilter.doFilterInternal(RequestLoggingFilter.java:45)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

com.mycompany.core.web.filter.SetCharacterEncodingFilter.doFilterInternal(SetCharacterEncodingFilter.java:50)
at

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

ch.qos.logback.classic.selector.servlet.LoggerContextFilter.doFilter(LoggerContextFilter.java:69)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at

org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679)
at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:394)
at

org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at

org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at
org.apache.tomcat.util.net
.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at
org.apache.tomcat.util.net
.SocketProcessorBase.run(SocketProcessorBase.java:49)
at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

The change which could be relevant

https://github.com/apache/wicket/pull/239/commits/3183aeb24f09d57e91bfc01813005f01cfd671df


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to