Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-13015

Null pointer exception whe minion receives traps

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 26.1.1, 26.2.2, 27.0.0
    • Fix Version/s: Meridian-2020.1.2, 27.0.1
    • Component/s: Minion
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      Minion 26.1.0, 27.0.0
    • Sprint:
      Horizon 2020 - Nov 24-Dec 9
    • HB Backlog Status:
      NB

      Description

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

      2020-11-19T13:57:13,587 | TRACE | DefaultUDPTransportMapping_0.0.0.0/1162 | AsyncDispatcherImpl | 276 - org.opennms.core.ipc.sink.common - 26.1.0 | Result of enqueueing for Id be56eee8-c269-47a6-9f63-2772e3c6cf00 was IMMEDIATE
      2020-11-19T13:57:13,587 | WARN | OpenNMS.Sink.AsyncDispatcher.Trap-Thread-1 | AsyncDispatcherImpl | 276 - org.opennms.core.ipc.sink.common - 26.1.0 | Encountered exception while taking from dispatch queue
      java.lang.NullPointerException: null
       at org.opennms.core.ipc.sink.common.AsyncDispatcherImpl$AtomicResultQueue.dequeue(AsyncDispatcherImpl.java:230) ~[?:?]
       at org.opennms.core.ipc.sink.common.AsyncDispatcherImpl.dispatchFromQueue(AsyncDispatcherImpl.java:126) ~[?:?]
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
       at org.opennms.core.concurrent.LogPreservingThreadFactory$1.run(LogPreservingThreadFactory.java:88) [371:org.opennms.opennms-util:26.1.0]
       at java.lang.Thread.run(Thread.java:834) [?:?]
      2020-11-19T13:57:13,588 | TRACE | OpenNMS.Sink.AsyncDispatcher.Trap-Thread-1 | AsyncDispatcherImpl | 276 - org.opennms.core.ipc.sink.common - 26.1.0 | Asking dispatch queue for the next entry...
      2020-11-19T13:57:13,588 | DEBUG | OpenNMS.Sink.AsyncDispatcher.Trap-Thread-1 | QueueFileOffHeapDispatchQueue | 277 - org.opennms.core.ipc.sink.offheap - 26.1.0 | Dequeueing an entry from queue with current size 0
      2020-11-19T13:57:13,588 | TRACE | OpenNMS.Sink.AsyncDispatcher.Trap-Thread-1 | QueueFileOffHeapDispatchQueue | 277 - org.opennms.core.ipc.sink.offheap - 26.1.0 | Waiting for an entry from in-memory queue...
      

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cgorantla Chandra Gorantla
              Reporter:
              fcastillo Fernando Castillo Yuing
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                HB Grooming Date:

                  Git Integration