mojira.dev
MC-236740

Server-side lag spike sometimes occurs when attempting to locate a buried treasure or opening/breaking a chest containing a map

The bug

A large server-side lag spike sometimes occurs when opening/breaking a chest containing a map or executing /locate buried_treasure. This affects both shipwrecks and underwater ruins. In some cases, the lag spike can be so severe that it can last upwards of 30 seconds, and some users have reported crashes.

If the server fails to locate a nearby buried treasure, it generates an empty map instead of a buried treasure map (MC-238484).

To reproduce

This occurs for a noticeable portion of shipwrecks/underwater ruins, but the seed and coordinates below are particularly good examples.

  1. Create a world with one of the following seed and coordinates:

    Seed: 5120366084678867272
    Coordinates: /execute in minecraft:overworld run tp @s 1303.51 49.00 4016.70 178.65 27.45
    Seed: -1899573754757393022
    Coordinates (shipwreck): /execute in minecraft:overworld run tp @s 2843.30 60.63 -977.73 255.15 36.00
    Coordinates (underwater ruins): /execute in minecraft:overworld run tp @s 2263.13 41.86 -1161.19 264.75 52.80
  2. Wait for the teleportation lag to finish.

  3. Open the chest.
    ❌ A massive server-side lag spike occurs.

Linked issues

MC-238198 Game crashes when opening new underwater chests Resolved MC-238710 The locate buried treasure command has a tremendous lag Resolved MC-238830 Using '/locate buried_treasure' or opening a chest in a shipwreck containing a buried treasure map can cause extreme TPS lag Resolved MC-238940 typing /locate buried_treasure disables cheat commands until game reload Resolved MC-239642 Unable to operate properly near ocean shipwrecks / will cause game lag or crash Resolved

Attachments

Comments 22

Jack Rotherham

I've seen this also, with a reduced amount of treasure maps and increased amount of empty maps contained in the chests

anthony cicinelli

I am unable to reproduce in 21w38a

I can still reproduce in 21w38a.

anthony cicinelli

We do not have enough information to find the cause of this issue.

While the lag occurs, please run /debug start, wait a while and then run /debug stop in order to create a debug profile. Afterwards, run /debug report.

If you do not have the permission to run these commands, open your world to LAN and enable cheats. If you're on a server, make sure that you're a server operator in order to execute these commands.

Then, please attach the profile results found in [minecraft/debug/profile-results-<DATE>.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/], as well as the debug report found in [minecraft/debug/debug-report-<DATE>.zip|https://minecrafthopper.net/help/finding-minecraft-data-folder/] here.

This issue is being temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

12 more comments

@unknown I think that makes a lot of sense. Maybe it is supposed to generate a buried treasure map, but it has a limited "search range" (which I assume is around a couple thousand blocks maybe?) to locate a buried treasure within. So, if it doesn't find a buried treasure map nearby, it generates an empty map. Of course, this is just a hypothesis.

This was reported earlier as MC-238484, but at the time I couldn't reproduce the issue. MC-134334 states that this is intended, but this does not appear to be the case for underwater ruins. In the loot tables underwater_ruin_big.json and underwater_ruin_small.json, it is specifically defined for the map to be an exploration_map (i.e. buried treasure map). In any case, that is a separate issue.

Ben Havrilesko

I experienced this is in snapshot 21w44a in single player. While it may not be an option for all players, I was able to work around the issue by increasing the ram allotment  via the Lanucher > Installations >  [your install] > MORE OPTIONS > set "-Xmx#G" argument in JVM ARGUMENTS where # is the number of GB of RAM to allocate. There is still a significant lag spike, but the game no longer crashes.

 

(edit: Jira auto-formatting correction)

The problem is both cumulative and persistent.

Cumulative because the more map chests i open the worse it becomes until it crashes.

Persistent because even after restarting, opening that last fatal chest will crash it.

 

Also breaking the chest causes the lag spike/crash.

 

I'm on a 7year old mac mini, so it may be hitting me harder than others with a more solid system.

I do not believe this should have been marked as fixed, currently experiencing this issue on a 1.20.1 server.

This particular issue was fixed in 1.18 Pre-release 3, with the remaining cases being fixed in 24w04a, a 1.20.5 snapshot (see MC-249136).

ampolive

boq

Confirmed

Important

Maps, World generation

buried-treasure-map, lag-spike, shipwreck

21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18 Pre-release 1

1.18 Pre-release 3

Retrieved