Description of problem: The current PageSubscriptionImpl implementation throws a NPE under heavy load. Version-Release number of selected component (if applicable): JBoss-EAP-6.4.1 HornetQ-2.3.25 How reproducible: Steps to Reproduce: The following NPE has been reported under heavy load : 2015-10-15 18:24:27,531 ERROR [org.hornetq.core.server] (Thread-18 (HornetQ-server-HornetQServerImpl::serverUUID=45745bf8-738b-11e5-9abc-c7191a962d45-884492432)) [U:] [I:] [D:] [N:] [S:] [J:] [A:] HQ224041: Failed to deliver: java.lang.NullPointerException at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl$CursorIterator.remove(PageSubscriptionImpl.java:1445) at org.hornetq.core.server.impl.QueueImpl.depage(QueueImpl.java:2214) at org.hornetq.core.server.impl.QueueImpl.access$1400(QueueImpl.java:92) at org.hornetq.core.server.impl.QueueImpl$DepageRunner.run(QueueImpl.java:2929) at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Additional info: I don't think the PageCurserInfo is causing this. We might be able to get away from this issue if we could synchronise the currentDelivery (PageReference) : public void remove() { deliveredCount.incrementAndGet(); if (currentDelivery != null) { PageCursorInfo info = PageSubscriptionImpl.this.getPageInfo(currentDelivery.getPosition()); if (info != null) { info.remove(currentDelivery.getPosition()); } } }
QA_FAILED: failed our regression test, you are using wrong instance "currentDelivery" instead of "delivery" PagedReference delivery = currentDelivery; if (delivery != null) { PageCursorInfo info = PageSubscriptionImpl.this.getPageInfo(currentDelivery.getPosition()); if (info != null) { info.remove(currentDelivery.getPosition()); } }
Hi, According to this commit https://github.com/hornetq/hornetq/commit/54f1cdec9076d0044e54c46d6b41e1849674f970 it does use 'delivery' instead of 'currentDelivery'. Can you point me the code where you see the wrong instance? Thanks Howard
If you checkout SP8 tag or download it as zip you will see that implementation is different then your commit.
There was some later commit which changed your implementation...
checking https://github.com/hornetq/hornetq/blame/2.3.25.x/hornetq-server/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java, code has been changed by recent two commits on https://github.com/hornetq/hornetq/commits/2.3.25.x/hornetq-server/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java commit 1: https://github.com/hornetq/hornetq/commit/5b020cece8f3ba4dde8ea7f88a9c628da9dd1c8b#diff-ff7bb5202e6a976f12635a9706b09832 commit 2: https://github.com/hornetq/hornetq/commit/a82445b2d162a93edcfd5fad6a4db00da7bd225e#diff-ff7bb5202e6a976f12635a9706b09832 the one-off 1279271 is verified with regression tests passed before these changes.
yes, that's correct one-off passed, regression test was written for this case (that fix in one-off is included in future CPs)
hmm, looks like the fix for this case has been changed by other fixes/commits. I'll ask clebert as he is the one that changed it. Thanks
I made a mistake. on my patch fix for LODH I needed to check for info != null, and I made a mistake there. this will need a commit to fix it
How do you want to address this: https://bugzilla.redhat.com/show_bug.cgi?id=1276206 ?
one-off?
I meant to add this link on a previous commit: https://github.com/hornetq/hornetq/commit/281a23710eddfc5e770c2f6871d57525583c2f7a This is the fix I added
It is. And that's the only real fix I see on this release. Martin Styk as sent a lot of test fixes to the 2.3.25.x but I don't see any other fix in for this release.
(actually there are 2 other small fixes)
Verified with EAP 6.4.7.CP.CR2 using the provided test cases.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.