Projects tigase _server server-core Issues #1181
NoSuchElementException in MaxDailyCounterQueue (#1181)
wojciech.kapcia@tigase.net opened 4 years ago

During the startup of an instance of the cluster I have logged this exception with the version 8.1.0-b10857

[2020-08-05 19:54:23:960] [WARNING ] [ResultsListener-socketReadThread-11 ] SocketThread$ResultsListener.run(): Protocol execution exception.
java.util.NoSuchElementException
	at java.base/java.util.concurrent.ConcurrentLinkedDeque.screenNullResult(ConcurrentLinkedDeque.java:764)
	at java.base/java.util.concurrent.ConcurrentLinkedDeque.removeLast(ConcurrentLinkedDeque.java:966)
	at tigase.stats.MaxDailyCounterQueue.add(MaxDailyCounterQueue.java:48)
	at tigase.cluster.ClusterConnectionManager.nodeConnected(ClusterConnectionManager.java:328)
	at tigase.cluster.ClusterController.nodeConnected(ClusterController.java:126)
	at tigase.cluster.ClusterConnectionManager.serviceConnected(ClusterConnectionManager.java:777)
	at tigase.cluster.ClusterConnectionManager.processHandshake(ClusterConnectionManager.java:908)
	at tigase.cluster.ClusterConnectionManager.processSocketData(ClusterConnectionManager.java:424)
	at tigase.server.ConnectionManager.packetsReady(ConnectionManager.java:347)
	at tigase.server.ConnectionManager.packetsReady(ConnectionManager.java:61)
	at tigase.net.IOService.call(IOService.java:202)
	at tigase.xmpp.XMPPIOService.call(XMPPIOService.java:146)
	at tigase.xmpp.XMPPIOService.call(XMPPIOService.java:51)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Github: https://github.com/tigase/tigase-server/issues/49

wojciech.kapcia@tigase.net commented 3 years ago

Switched from .removeLast() to .pollLast() to avoid exception as it doesn't matter here; rework slightly the class to make the implementation more correct.

issue 1 of 1
Type
Bug
Priority
If you are bored
Assignee
Version
tigase-server-8.2.0
Spent time
1h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1181
Please wait...
Page is in error, reload to recover