mojira.dev
MCPE-75966

PendingTicks can build up outside of simulation distance

PendingTicks aren't processed outside of simulation distance. This can allow players to keep generating more and more pendingTicks in a chunk outside of simulation distance until the game crashes whenever that chunk is loaded. It then would require a third party program to remove. This however takes some time. The most noticable effect would be an incredibly large world size.

Players could encounter this while being AFK at a farm and not realising that they are still half-loading another redstone contraption, which could easily produce pendingTicks and make the world unusable.

I would expect the game to stop the amount of pendingTicks scheduled from exceeding a certain amount, or for pendingTicks to be processed outside of simulation distance.

Steps to reproduce:

  1. place lots of dispensers containing a lava bucket on the edge of simulation distance (more dispensers means you generate them faster, so do lots to speed things up)

  2. put them on a fast clock

  3. afk for a while and then note the large increase in your world size

There are other ways to produce pendingTicks, but this is one of the simplest.

 

Related issues

Attachments

Comments

migrated
[media]
GoldenHelmet

Please provide numbered steps to reproduce using a specific example. A screenshot, video, or world upload is also encouraged.

I can't tell from you description how this would impact a player who isn't trying to break the game.

migrated

It allows people to crash realms/servers easily and forces you to remove the pendingTicks using a third party program. I'll upload a test world or add some steps or something.

racartwright

AFKing in the wrong location can cause pending ticks to build up. Using complex redstone devices can cause pending ticks to build up.

The issue is that only 100 pending ticks are processed during a game tick in a chunk, and it isn't hard to accidentally make something that generates more pending ticks than that per game tick. A full chunk farm with 256 plants will generate 256 pending ticks if a player automates it with redstone so they all break in the same GT. If someone builds a farm across chunk borders and then AFKs so that only part of the farm is loaded, they can generate pending ticks in the part of the farm that is not loaded.

Thus pending ticks build up faster than they are processed. If it goes on for too long, the pending tick record gets so big that it lags the server whenever it is read from or written to the database. Even if you take care of the issue causing the pending ticks, the problem of lag will prevent the game for processing all the ticks.

The fix is trivial to implement. Limit the pending tick queue in a chunk to something like 4096 ticks. If there are more ticks in the queue than that, the game should silently drop a pending tick request.

GoldenHelmet

Thanks 77Tigers and Reed Cartwright for the updates. I think the issue is more clear now.

I have had MCPE-47212 linked as related to this ticket because it is also a kind of buildup to overload that occurs at the border of simulation distance. I suggested on that ticket that it might help with these issues to tick chunks that border the simulation distance on a rotating basis--for example, once every 15-25 game ticks (variable to limit exploits), tick a chunk that borders the simulation distance.

racartwright

There are lots of villager-POI linking issues in Bedrock at the moment, and I'm not sure that MCPE-47212 is related to this one. I can run it by Yodalf and Hey Old Guy to see what they think. They know the village system better than I do.

[Mojang] Mega_Spud (Jay)

Could we please see an example .mcworld?

migrated

ok

migrated

Having a bit of trouble uploading the world. I'll try again later. Hopefully the issue will go away.

migrated

Turns out minecraft didn't export the world properly.

migrated

Uploaded an example world. It uses a flushing mob farm that's partially outside simulation distance instead, but it just shows how easy it is for farms to accidentally create a build-up of pending ticks.

You may need to afk for a bit.

kiizde

77Tigers, thanks for providing the world! Could you please give us some more info, maybe it was on realm? Could you upload a video? 
We have been trying to repro but after 2 hours world is just 3,5MB.

migrated

Same thing happened to me. Server hosted on a 3rd party website. Had an XP farm with a cobble generator, carpet generator, and furnaces. The system did not have a true "off" switch, rather only an auto-mode, and basically every time the reserves of supplies got low it would activate circuits and refresh them. 

I afk'ed for a little over an hour at a nearby creeper farm (no redstone) and when I came back I could not visit the chunk without crashing the server.

[Mojang] Mega_Spud (Jay)

Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response

Is this still an issue in the latest version? If so, please make sure the ticket description contains the following information:

Steps to Reproduce:
1.
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

[Mojang] Mega_Spud (Jay)

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

migrated

(Unassigned)

426960

Confirmed

Windows

1.16.0.59 Beta, 1.14.60 Hotfix, 1.16.20, 1.16.40 Hotfix

Retrieved