Mojira Archive
MC-114777

Movement check doesn't work, hanging servers (with actual samples)

Hopefully, duplicate of MC-114772 / MC-114773 / MC-114774.

Preface, explanation

The incorrect behavior of the movement check has been mentioned before - see https://mojangab.slack.com/archives/G1KKQ4Q73/p1482580415001487. In particular, note my comment: https://mojangab.slack.com/archives/G1KKQ4Q73/p1482606725001534.

Basically, the invalid movement check looks for any NaN's, and if there aren't any, declares the packet valid. If there is a NaN, it declares the packet valid if the absolute value of the x and z coordinates are less than 30000000 (in 1.11, it checked the x coordinate and the x coordinate again). Simply put, that that means that a double-invalid packet is treated as valid.

The good news

This doesn't create petabytes of data. It creates a few empty (8 to 24 kb) region files, instead.

The bad news

It still hangs (or severely lags) the server.

Examples

Sending this packet triggers the watchdog:
new CPacketPlayer.Position(99_999_999, Double.NaN, 50, false)

Here are some samples of the watchdog crashes:

Sending this packet does *not* trigger the watchdog, although it does cause severe lag (~20 seconds on my PC, probably less on real servers):
new CPacketPlayer.Position(Double.NaN, 64, 99_999_999, false)

It also generated 2 region files:

  • r.-1.58593.mca
  • r.0.58593.mca

Other trials generate a few different region files.

Here's a profile result while this is happening (yes, my computer sucks, just look at the relative percentages):

This is just with 2 packets. Spamming that packet... would not be good.

Fix

Rewrite the movement check so that it actually works.

Also, figure out what is happening with the coordinates to cause those specific chunks to generate. Something is very much broken there, but I'm not familiar with that part of the code.

Duplicate

[Mod] Pokechu22

2017-03-25, 05:21 AM

2017-03-25, 12:54 PM

2017-03-25, 08:14 AM

2

2

Plausible

crash, hang, movement, server

Minecraft 1.11.2, Minecraft 17w06a

-