RestComm/jdiameter

NPE when client reconnect to server while server is handling disconnect.

Opened this issue · 0 comments

Scenario;

  1. Client and server have a connection
  2. Connection is suddenly lost, without proper cleanup
  3. Client detects this, goes to REOPEN
  4. Server detects this and goes to 'down' state
  5. Client sends a CER after REOPEN timeout
  6. Server detected connection loss and starts shutting down the peer threads. First thread that ends will already clear administraive objects such as the statistics.
  7. Server receives the CER (on a thread that is not shut down yet)
  8. NPE raised by server and no CEA send to client

.PeerFSMImpl - Error during processing FSM event
java.lang.NullPointerException
at org.jdiameter.server.impl.PeerImpl.createPeerStatistics(PeerImpl.java:118)
at org.jdiameter.client.impl.controller.PeerImpl.access$2100(PeerImpl.java:145)
at org.jdiameter.client.impl.controller.PeerImpl$ActionContext.createStatistics(PeerImpl.java:1069)
at org.jdiameter.server.impl.fsm.PeerFSMImpl$3.processEvent(PeerFSMImpl.java:322)
at org.jdiameter.client.impl.fsm.PeerFSMImpl$3.run(PeerFSMImpl.java:207)
at java.lang.Thread.run(Thread.java:748)