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

NPE in TCP when using non_blocking_sends and use_acks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 5.4, 5.3.12
    • 5.3.11
    • None
    • False
    • None
    • False

       

       

      org.jgroups.protocols.TCP - [warn] JGRP000006: 10.244.15.191:7800: failed accepting connection from peer Socket[addr=/10.244.70.136,port=35305,localport=7800]: java.lang.NullPointerException: Cannot invoke "java.util.concurrent.BlockingQueue.offer(Object)" because "this.queue" is null

       

      I believe the issues are here, where the ack tries to be sent before connection is started (and thus queue has not been created):

      https://github.com/belaban/JGroups/blob/master/src/org/jgroups/blocks/cs/TcpServer.java#L127

      https://github.com/belaban/JGroups/blob/master/src/org/jgroups/blocks/cs/TcpServer.java#L135

      Is it safe to start connection before sending ack?

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

                Created:
                Updated:
                Resolved: