0 Replies Latest reply: Feb 13, 2013 4:55 PM by 990957 RSS

    Strange NullPointerException thrown from ConcurrentHashMap

    990957
      I came across a weird stack trace. When I looked at ConcurrentHashMap's code, it seem impossible for NullPointerException to be thrown from that location. This happened on JDK7u6 running on 64-bit Linux. I wasn't be able to reproduce the issue though.

      2012-12-27 15:08:40,001 [myid:1] - ERROR [ConnnectionExpirer:NIOServerCnxnFactory$1@101] - Thread Thread[ConnnectionExpirer,5,main] died
      java.lang.NullPointerException
      at java.util.concurrent.ConcurrentHashMap$Segment.remove(ConcurrentHashMap.java:622)
      at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1176)
      at org.apache.zookeeper.server.ExpiryQueue.poll(ExpiryQueue.java:149)
      at org.apache.zookeeper.server.NIOServerCnxnFactory$ConnectionExpirerThread.run(NIOServerCnxnFactory.java:564)