Null pointer exception whe minion receives traps

Description

Randomly, when minion receives traps, the following NPE occurs:

The problems occur in core/ipc/sink/common/src/main/java/org/opennms/core/ipc/sink/common/AsyncDispatcherImpl.java inside AtomicResultQueue.enqueue(), at:

resultRecordedMap.remove(messageEntry.getKey()).await();

When resultRecordedMap.remove(messageEntry.getKey()) returns null.

Environment

Minion 26.1.0, 27.0.0

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Show:

Fernando Castillo November 25, 2020 at 8:23 PM

No, we did not change anything.... and it is really strange because the problem started suddenly. Maybe it is something in the environment... don't know...

Thank you very much!!!

Fernando.

Chandra Gorantla November 25, 2020 at 3:09 PM

Chandra Gorantla November 24, 2020 at 7:48 PM

Yeah, got it. Can see the case it could happen. Thanks   for the bug report. 

Strange that this hasn't been reported by anybody else.  Did you change any of the Offheap settings ?

https://docs.opennms.org/opennms/releases/27.0.0/guide-admin/guide-admin.html#_using_off_heap_storage_for_sink_messages

Fernando Castillo November 24, 2020 at 5:57 PM

We tested the lastest r26 with the same result.

Note that messageEntry.getKey() is not null, but the message with this key is not in the  resultRecordedMap map, so resultRecordedMap.remove(messageEntry.getKey()) returns null.

Fernando.

 

Chandra Gorantla November 24, 2020 at 5:34 PM
Edited

Since there is null check  messageEntry.getKey() before that, it seems odd. Can you upgrade to latest r26 release and check this again. There were some fixes to Offheap implementation in subsequent release. 

Fixed

Details

Assignee

Reporter

HB Grooming Date

HB Backlog Status

Components

Sprint

Affects versions

Priority

PagerDuty

Created November 20, 2020 at 5:08 PM
Updated March 1, 2021 at 8:39 PM
Resolved November 25, 2020 at 3:10 PM