Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2680

UNICAST3/Encrypt: encrypted retransmission request causes NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.2.14
    • 5.2.12
    • None
    • False
    • None
    • False

      When asking a sender for retransmission of a missing message, UNICAST3 does not set the sender's address (regular message sending via down() does!).

      The transport would set the sender's address, but the message doesn't get there; instead, we encrypt it into a wrapped message which is then sent. On the receiver's side, the message is decrypted (null sender) and added to a batch, this causes the following NPE:

      java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
          at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
          at org.jgroups.protocols.UNICAST3.handleXmitRequest(UNICAST3.java:1030)
          at org.jgroups.protocols.UNICAST3.handleUpEvent(UNICAST3.java:447)
          at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:493)
          at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:700)
          at org.jgroups.protocols.Encrypt.up(Encrypt.java:222)
          at org.jgroups.protocols.ASYM_ENCRYPT.up(ASYM_ENCRYPT.java:179)
          at org.jgroups.stack.Protocol.up(Protocol.java:346)
          at org.jgroups.protocols.VERIFY_SUSPECT2.up(VERIFY_SUSPECT2.java:119)
          at org.jgroups.protocols.FailureDetection.up(FailureDetection.java:193)
          at org.jgroups.protocols.FD_SOCK2.up(FD_SOCK2.java:202)
          at org.jgroups.protocols.MERGE3.up(MERGE3.java:288)
          at org.jgroups.protocols.Discovery.up(Discovery.java:314)
          at org.jgroups.protocols.RED.up(RED.java:119)
          at org.jgroups.protocols.TP.passBatchUp(TP.java:1204)
          at org.jgroups.util.MaxOneThreadPerSender$BatchHandlerLoop.passBatchUp(MaxOneThreadPerSender.java:289)
          at org.jgroups.util.SubmitToThreadPool$BatchHandler.run(SubmitToThreadPool.java:150)
          at org.jgroups.util.MaxOneThreadPerSender$BatchHandlerLoop.run(MaxOneThreadPerSender.java:278)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
          at java.base/java.lang.Thread.run(Thread.java:1589)
      

            rhn-engineering-bban Bela Ban
            rhn-engineering-bban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: