[ 
https://issues.apache.org/jira/browse/QPID-8509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311881#comment-17311881
 ] 

ASF subversion and git services commented on QPID-8509:
-------------------------------------------------------

Commit 9e4532c2751a817bcd662a770062480b5cf1a3f1 in qpid-broker-j's branch 
refs/heads/main from Alex Rudyy
[ https://gitbox.apache.org/repos/asf?p=qpid-broker-j.git;h=9e4532c ]

QPID-8509: [Broker-J] Add unit test for 
AMQPConnection_1_0Impl#getOpenTransactions()


> java.util.NoSuchElementException in AMQPConnection_1_0Impl.next()
> -----------------------------------------------------------------
>
>                 Key: QPID-8509
>                 URL: https://issues.apache.org/jira/browse/QPID-8509
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-broker-8.0.4
>            Reporter: Daniil Kirilyuk
>            Priority: Minor
>
> Issue discovered during log analysis after introducing a monitoring tool, 
> which polls broker REST API for statistics on a regular basis:
> {noformat}
> 2021-02-26 13:12:13,834 INFO  [qtp1796793599-147] (q.m.a.allowed) - 
> [mng:N/A(monit@/127.0.0.1:54330)] ACL-1001 : Allowed : Access Management
> 2021-02-26 13:12:13,902 ERROR [qtp1796793599-147] 
> (o.a.q.s.m.p.f.ExceptionHandlingFilter) - Unexpected exception in servlet 
> '/api/latest/broker': 
> java.util.NoSuchElementException: null
>         at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl$2.next(AMQPConnection_1_0Impl.java:1876)
>         at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl$2.next(AMQPConnection_1_0Impl.java:1846)
>         at 
> org.apache.qpid.server.transport.AbstractAMQPConnection.getOldestTransactionStartTime(AbstractAMQPConnection.java:1108)
>         at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at 
> org.apache.qpid.server.model.ConfiguredObjectMethodAttributeOrStatistic.getValue(ConfiguredObjectMethodAttributeOrStatistic.java:68)
>         at 
> org.apache.qpid.server.model.ConfiguredObjectMethodStatistic.getValue(ConfiguredObjectMethodStatistic.java:26)
>         at 
> org.apache.qpid.server.model.AbstractConfiguredObject.getStatistics(AbstractConfiguredObject.java:3436)
>         at 
> org.apache.qpid.server.model.AbstractConfiguredObject.getStatistics(AbstractConfiguredObject.java:3423)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateStatisticsIntoMap(ConfiguredObjectToMapConverter.java:218)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:65)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateChildrenIntoMap(ConfiguredObjectToMapConverter.java:271)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:69)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.incorporateChildrenIntoMap(ConfiguredObjectToMapConverter.java:271)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.convertObjectToMap(ConfiguredObjectToMapConverter.java:69)
>         at 
> org.apache.qpid.server.management.plugin.controller.latest.LatestManagementController.convertObject(LatestManagementController.java:590)
>         at 
> org.apache.qpid.server.management.plugin.controller.latest.LatestManagementController.formatConfiguredObject(LatestManagementController.java:555)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.sendResponse(RestServlet.java:263)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.doGet(RestServlet.java:119)
>         at 
> org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doGet(AbstractServlet.java:128)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>         at 
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
>         at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
>         at 
> org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter$1.run(AuthenticationCheckFilter.java:161)
>         at 
> org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter$1.run(AuthenticationCheckFilter.java:157)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>         at 
> org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter.doFilterChainAs(AuthenticationCheckFilter.java:156)
>         at 
> org.apache.qpid.server.management.plugin.filter.AuthenticationCheckFilter.doFilter(AuthenticationCheckFilter.java:126)
>         at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
>         at 
> org.apache.qpid.server.management.plugin.filter.LoggingFilter.doFilter(LoggingFilter.java:63)
>         at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
>         at 
> org.apache.qpid.server.management.plugin.filter.ForbiddingTraceFilter.doFilter(ForbiddingTraceFilter.java:65)
>         at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
>         at 
> org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:310)
>         at 
> org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:264)
>         at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
>         at 
> org.apache.qpid.server.management.plugin.filter.ExceptionHandlingFilter.doFilter(ExceptionHandlingFilter.java:59)
>         at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
>         at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
>         at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>         at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607)
>         at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)
>         at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
>         at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
>         at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577)
>         at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
>         at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)
>         at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>         at org.eclipse.jetty.server.Server.handle(Server.java:500)
>         at 
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
>         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
>         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
>         at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
>         at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
>         at 
> org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
>         at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
>         at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
>         at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
>         at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
>         at 
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
>         at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
>         at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
>         at 
> org.apache.qpid.server.bytebuffer.QpidByteBufferFactory.lambda$null$0(QpidByteBufferFactory.java:464)
>         at java.lang.Thread.run(Thread.java:748)
> {noformat}
> Seems to be concurrency issue: AMQPConnection_1_0Impl creates an iterator for 
> ServerTransaction instances and between calls iterator.hasNext() and 
> iterator.next() opened transactions were removed, which lead to 
> NoSuchElementException.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to