Projects tigase _server server-core Issues #1278
NPE in StreamManagementIOProcessor.serviceStopped (#1278)
wojciech.kapcia@tigase.net opened 3 years ago
java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
	at tigase.server.xmppclient.StreamManagementIOProcessor.serviceStopped(StreamManagementIOProcessor.java:403)
	at tigase.xmpp.XMPPIOService.forceStop(XMPPIOService.java:220)
	at tigase.net.IOService.stop(IOService.java:449)
	at tigase.xmpp.XMPPIOService.stop(XMPPIOService.java:267)
	at tigase.server.xmppclient.StreamManagementIOProcessor.processOutgoing(StreamManagementIOProcessor.java:264)
	at tigase.xmpp.XMPPIOService.addPacketToSend(XMPPIOService.java:131)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:593)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:862)
	at tigase.server.xmppclient.ClientConnectionManager.processPacket(ClientConnectionManager.java:131)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
wojciech.kapcia@tigase.net commented 3 years ago

In general it looks like a result of IOService.stop() -> XMPPIOService.forceStop()

Examples:

[2021-09-01 22:17:05:532] [SEVERE  ] [              in_0-c2s ] AbstractMessageReceiver$QueueListener.run(): [in_0-c2s] Exception during packet processing: from=sess-man@ip-172-31-0-99.us-west-2.compute.internal, to=c2s@ip-172-31-0-99.us-west-2.compute.internal/172.20.0.2_5222_172.31.42.200_3116, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq type="result" xmlns="jabber:client" id="9pzPD-40310" to="axellrod@tigase.im/xabber-android-AsqE6s9r" from="tigase.im"/>, SIZE=123, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=result, STABLE_ID=null
java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
	at tigase.server.xmppclient.StreamManagementIOProcessor.serviceStopped(StreamManagementIOProcessor.java:403)
	at tigase.xmpp.XMPPIOService.forceStop(XMPPIOService.java:220)
	at tigase.net.IOService.stop(IOService.java:449)
	at tigase.xmpp.XMPPIOService.stop(XMPPIOService.java:267)
	at tigase.server.xmppclient.StreamManagementIOProcessor.processOutgoing(StreamManagementIOProcessor.java:264)
	at tigase.xmpp.XMPPIOService.addPacketToSend(XMPPIOService.java:131)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:593)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:862)
	at tigase.server.xmppclient.ClientConnectionManager.processPacket(ClientConnectionManager.java:131)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
[2021-09-01 22:53:33:602] [INFO    ] [        Watchdog - c2s ] XMPPProcessorAbstract.process()  : Attempt to send an error response to the error packet: from=sess-man@ip-172-31-0-99.us-west-2.compute.internal, to=sess-man@ip-172-31-0-99.us-west-2.compute.internal, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq type="error" xmlns="jabber:client" id="8d00134c-b3e5-4f50-a681-490206e8c9f8" to="gipsy-donkey@sure.im" from="gipsy-donkey@sure.im/blabber.im[3.0.4-playstore].PYrq"><ping xmlns="urn:xmpp:ping"/><error type="cancel" code="503"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">Service not available.</text></error></iq>, SIZE=401, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=error, STABLE_ID=897596dc-7945-4bc5-a360-9e67bca61487, session: null, plugin: urn:xmpp:ping
[2021-09-01 22:53:33:625] [SEVERE  ] [        Watchdog - c2s ] ThreadExceptionHandler.uncaughtException(): Uncaught thread: "Watchdog - c2s" exception
java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
	at tigase.server.xmppclient.StreamManagementIOProcessor.serviceStopped(StreamManagementIOProcessor.java:403)
	at tigase.xmpp.XMPPIOService.forceStop(XMPPIOService.java:220)
	at tigase.net.IOService.writeData(IOService.java:1011)
	at tigase.xmpp.XMPPIOService.writeRawData(XMPPIOService.java:282)
	at tigase.server.ConnectionManager$Watchdog$1.check(ConnectionManager.java:1469)
	at tigase.server.ConnectionManager.doForAllServices(ConnectionManager.java:854)
	at tigase.server.ConnectionManager$Watchdog.executeWatchdog(ConnectionManager.java:1409)
	at tigase.server.ConnectionManager$Watchdog.run(ConnectionManager.java:1377)
[2021-09-02 00:17:07:147] [SEVERE  ] [              in_3-c2s ] AbstractMessageReceiver$QueueListener.run(): [in_3-c2s] Exception during packet processing: from=sess-man@ip-172-31-0-99.us-west-2.compute.internal, to=c2s@ip-172-31-0-99.us-west-2.compute.internal/172.20.0.2_5222_172.31.42.200_20262, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq type="result" xmlns="jabber:client" id="9pzPD-41418" to="axellrod@tigase.im/xabber-android-AsqE6s9r" from="tigase.im"/>, SIZE=123, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=result, STABLE_ID=null
java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
	at tigase.server.xmppclient.StreamManagementIOProcessor.serviceStopped(StreamManagementIOProcessor.java:403)
	at tigase.xmpp.XMPPIOService.forceStop(XMPPIOService.java:220)
	at tigase.net.IOService.stop(IOService.java:449)
	at tigase.xmpp.XMPPIOService.stop(XMPPIOService.java:267)
	at tigase.server.xmppclient.StreamManagementIOProcessor.processOutgoing(StreamManagementIOProcessor.java:264)
	at tigase.xmpp.XMPPIOService.addPacketToSend(XMPPIOService.java:131)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:593)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:862)
	at tigase.server.xmppclient.ClientConnectionManager.processPacket(ClientConnectionManager.java:131)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
[2021-09-02 00:39:11:029] [SEVERE  ] [              in_3-c2s ] AbstractMessageReceiver$QueueListener.run(): [in_3-c2s] Exception during packet processing: from=sess-man@ip-172-31-0-99.us-west-2.compute.internal, to=c2s@ip-172-31-0-99.us-west-2.compute.internal/172.20.0.2_5222_172.31.31.162_55654, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence to="axellrod@tigase.im" from="lichinka008@xabber.de/353894854008955739220227" xmlns="jabber:client" xml:lang="en"><c node="http://pidgin.im/" hash="sha-1" xmlns="http://jabber.org/protocol/caps" ver="I22W7CegORwdbnu0ZiQwGpxr0Go="/><x xmlns="vcard-temp:x:update"><photo/></x><priority>1</priority></presence>, SIZE=317, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=AUTH, TYPE=null, STABLE_ID=null
java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
	at tigase.server.xmppclient.StreamManagementIOProcessor.serviceStopped(StreamManagementIOProcessor.java:403)
	at tigase.xmpp.XMPPIOService.forceStop(XMPPIOService.java:220)
	at tigase.net.IOService.stop(IOService.java:449)
	at tigase.xmpp.XMPPIOService.stop(XMPPIOService.java:267)
	at tigase.server.xmppclient.StreamManagementIOProcessor.processOutgoing(StreamManagementIOProcessor.java:264)
	at tigase.xmpp.XMPPIOService.addPacketToSend(XMPPIOService.java:131)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:593)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:862)
	at tigase.server.xmppclient.ClientConnectionManager.processPacket(ClientConnectionManager.java:131)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
[2021-09-02 09:17:49:981] [SEVERE  ] [              in_6-c2s ] AbstractMessageReceiver$QueueListener.run(): [in_6-c2s] Exception during packet processing: from=sess-man@ip-172-31-0-99.us-west-2.compute.internal, to=c2s@ip-172-31-0-99.us-west-2.compute.internal/172.20.0.2_5222_172.31.10.118_7960, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq type="result" xmlns="jabber:client" id="9pzPD-46281" to="axellrod@tigase.im/xabber-android-AsqE6s9r" from="tigase.im"/>, SIZE=123, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=result, STABLE_ID=null
java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
	at tigase.server.xmppclient.StreamManagementIOProcessor.serviceStopped(StreamManagementIOProcessor.java:403)
	at tigase.xmpp.XMPPIOService.forceStop(XMPPIOService.java:220)
	at tigase.net.IOService.stop(IOService.java:449)
	at tigase.xmpp.XMPPIOService.stop(XMPPIOService.java:267)
	at tigase.server.xmppclient.StreamManagementIOProcessor.processOutgoing(StreamManagementIOProcessor.java:264)
	at tigase.xmpp.XMPPIOService.addPacketToSend(XMPPIOService.java:131)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:593)
	at tigase.server.ConnectionManager.writePacketToSocket(ConnectionManager.java:862)
	at tigase.server.xmppclient.ClientConnectionManager.processPacket(ClientConnectionManager.java:131)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
Andrzej Wójcik (Tigase) commented 3 years ago

I've applied a patch which should fix this possible race condition

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1278
Please wait...
Page is in error, reload to recover