Page 1 of 1

NegativeArraySizeException

Posted: 28 Nov 2018, 07:27
by zynbasil
sfs2x:2.13.4
client: JavaScript 1.7.13

Occasionally appear:

Code: Select all

java.lang.NegativeArraySizeException
at sfs2x.websocket.SFS2XWSService$WSChannelListener.onWebSocketBinary(SFS2XWSService.java:264)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onBinaryMessage(JettyListenerEventDriver.java:82)
at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:66)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onBinaryFrame(JettyListenerEventDriver.java:68)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:157)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:376)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)



Code: Select all

java.io.IOException: Cannot append to finished buffer
at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.appendFrame(SimpleBinaryMessage.java:48)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:62)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onBinaryFrame(JettyListenerEventDriver.java:68)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:157)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:376)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)

Re: NegativeArraySizeException

Posted: 28 Nov 2018, 08:16
by Lapo
Hi,
thanks for reporting. It might be symptom of a network error, perhaps from client side.
Any ways to reproduce it?

Thanks

Re: NegativeArraySizeException

Posted: 29 Nov 2018, 12:07
by zynbasil
This is online server's error,I do not know how to reproduce it~

ccu: 3500

Re: NegativeArraySizeException

Posted: 29 Nov 2018, 14:35
by Lapo
Without a way to reproduce there's not much we can do.
If the issue is not very frequent it's likely due to a network issue, very likely from client side.

It could even be caused by a random bot scanning the web and attempting random connections to http servers.

How frequent is this error during one day for example?

Thanks

Re: NegativeArraySizeException

Posted: 01 Dec 2018, 16:38
by zynbasil
It could even be caused by a random bot scanning the web and attempting random connections to http servers.
---How can I be sure this is the reason?
How frequent is this error during one day for example?
---Not often。some time 1 hours, some time 10 hours

Re: NegativeArraySizeException

Posted: 03 Dec 2018, 08:35
by Lapo
zynbasil wrote:---How can I be sure this is the reason?

The error suggests that malformed data is being fed to the server which suggests either a network issue or a non-SmartFox client trying to exchange data and failing.

Not often。some time 1 hours, some time 10 hours

And what is the average traffic on your server?

Thanks

Re: NegativeArraySizeException

Posted: 17 Dec 2018, 09:02
by zynbasil
I can't upload img

Error
Sorry, the board attachment quota has been reached.

Re: NegativeArraySizeException

Posted: 17 Dec 2018, 09:35
by Lapo
zynbasil wrote:I can't upload img

Sorry about that. I have updated the forums config, you should be able to do it now.

Thanks

Re: NegativeArraySizeException

Posted: 18 Dec 2018, 01:35
by zynbasil
what is the average traffic on your server?

580C7368-6351-4413-B8FC-7EF674DDA67F (1).png
(111.91 KiB) Not downloaded yet

A13219ED-0828-4BD5-B410-A13EA97B1D91.png
(236.92 KiB) Not downloaded yet

99B05DB3-B53D-432F-92C5-3F84946435FC.png
(178.87 KiB) Not downloaded yet

Re: NegativeArraySizeException

Posted: 18 Dec 2018, 08:39
by Lapo
Thanks.
Going back to the first post, you reported two errors.
As I mentioned the first one sounds very much like bad data sent from the client, in other words it looks like the client is not a real SmartFox client.

The second one is more Jetty related, and I am not sure if it's a Jetty issue we don't know about or again something related to a network issue. Do you see these two types of errors happening together in the logs?

Cheers