The bug
When two or more structures with block entities (such as spawners or chests) intersect, it can happen that the data of the block entities becomes corrupted:
there is a mismatch between block and block entity (can be verified using
/data get
)
E.g. the block is a chest, but the block entity is a spawnerblock entity data is reset to default values
E.g. spawner starts spawning pigs (the default mob)
This also causes errors and warnings similar to the following to appear in the log:
Failed to fetch mob spawner entity at (-1186, 17, -309)
Block entity invalid: minecraft:chest @ fx{x=-1186, y=17, z=-309}
See also videos Pig Spawner in Vanilla Survival 1.16 and Quintuple Pig Spawner Cluster in Vanilla 1.16 and explanation (Discord).
Example seeds and coordinates
Note: Due to world generation changes the following examples might not work anymore. In case no intersecting dungeons generate there anymore please do not claim that this issue is "fixed" if you cannot prove it.
Last tested in 1.16.2
Seed: 356317745171599556
/execute in minecraft:overworld run tp @s -1186.32 18.52 -308.62 -84.90 73.35
Last tested in 1.16.3
Seed: -397443552349737100
/execute in minecraft:overworld run tp @s 435.96 48.37 -117.43 61.20 45.60
Last tested in 1.16.3
Seed: 943861164873658153
/execute in minecraft:overworld run tp @s -1634.34 25.55 -3616.51 143.40 47.10
Quintuple pig spawner
Last tested in 21w03a
Seed: -2464334185163669257
/execute in minecraft:overworld run tp @s 6105.55 59.00 18970.90 539.25 51.45
Linked issues
is cloned by 1
Attachments
Comments 13

One of our servers just can with this error, but not 100% sure if it is related. A torch had taken the properties of a hopper, and a white concrete block below it had taken the properties of a trapped chest. Because this was on server, it was rejecting everyone's connections. It would load in singleplayer, but I had replaced the blocks with air blocks from console, this did not fix the issue and still go the same errors.
[media]The corruption had gone well past this however, as you can see from this screenshot.
[media]Several chunks were reset on a custom map, and existing chunks were shifted and in wrong places. The diagonal line of concrete shows the blocks that were replaced by air blocks by command in console to try and fix it.

I rewrote the report and added an example which causes this issue in 1.16.2. I hope this is alright for you.
I can contribute two examples of this bug in 1.16 (last tested 1.16.3):
-397443552349737100 at 434 48 -117
943861164873658153 at -1636 25 -3618

Thank you very much @unknown, I have added both examples to the description of the report.

A member of the Minecraft@Home team, named Andrew, has discovered a variation of this bug that generates working pig spawners! He has posted two videos about this on YouTube so far: video 1 & video 2. Here is the seed and coordinates from his first video:
-5364344938332933183
/tp 2137 59 9
I tested this seed and coordinates in 1.16.5 & 21w03a and I can confirm that it works in both versions. Also, according to this message from the Minecraft@Home discord server, this variation of the bug is caused by a buried treasure generating in the same block as a cave spider spawner.
I am unsure whether a new report should be created about this variation of the bug, or if it should be added to this report.

Thank you very much @unknown! I have rewritte the report to be more generic and included the information you provided.
Unable to replicate in 21w06a this is likely to do the changes in generation rather than the bug being fixed
Working pig spawners spawn for a different reason, this is not the same bug, they spawn because when a buried tresure spawns, it hides itself by copying the blockstate without nbt data it replaced to it's sides that are air or water, so here i think the bug is that it only copies the blockstate and not the nbt data, and the spawners should be cave spider spawners

Pig spawners due to buried treasures were not fixed, see MC-234396.
Can confirm... however that dungeon does no longer generate in the 1.15 snapshots (tested 19w42a). Can you find a seed for 19w42a where this can be reproduced?
This seems very odd to me since usually only up to two chests can be generated in dungeons.