The bug
This bug causes alot of light updates, dropping your FPS to 0 and most likely crashing your game.
This has been used for around a year now on several servers, this causes players to crash their game.
How to reproduce
Create a new world (superflat, cheats on)
Execute command: /fill ~20 ~200 ~-20 ~-20 ~200 ~20 stone
Teleport yourself up to the platform. (/tp @a ~ ~205 ~)
Place 2 observers facing into each other, make a hole 1 block away from the observer. (See screenshot for setup. the observers is to make a repeating redstone clock)
Just place the piston so it pulls the block over the hole.
Prepare yourself to see your FPS drop to 0.
Code analysis
The following is based on a decompiled version of Minecraft 1.12 using MCP940.
In the method net.minecraft.world.chunk.setBlockState() you have this~~
if (j >= i1)
{
this.relightBlock(i, j + 1, k);
}
which relight blocks, but this is causing the massive FPS drops. What this does is, if j (posY) is bigger then i1, it will relight the block on the X, Y + 1, Z the player is.
If you remove the '+ 1' this issue will be fixed. idk why though.
if (j >= i1)
{
this.relightBlock(i, j, k);
}
----------------------------------------------------------------------
When making a Creative world with bedrock at the bottom, air for most, and bedrock at the top, when you break the bedrock the game lags for about 7 seconds.
Example superflat preset: 3;minecraft:bedrock,250*minecraft:air,minecraft:bedrock;1;
I made a program that will take the "Something's taking too long!" messages and put it in a list. In the attached list, you can see that root.tick.level.connection is taking a VERY long time.
I hope this gets fixed soon, because it can be a huge exploit on servers.
^ original report
Related issues
is duplicated by
Attachments
Comments

Also, root.tick.keyboard lags when you break the block.

Please force a crash by pressing F3 + C for 10 seconds while ingame and attach the crash report here.
In vanilla, I made a piston that would extend and rectract on an uncovered block. The lag was horrendous. I got down to 0 fps before the F3+C worked. I can upload the world if you want me to.

Yes, please upload the world.
The crash report isn't helpful.
I don't think I broke the redstone, so it may still be running.

Confirmed.
Getting
2013-03-11 22:57:56 [SERVER] [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2013-03-11 22:58:12 [SERVER] [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2013-03-11 22:59:20 [SERVER] [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2013-03-11 23:00:06 [SERVER] [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2013-03-11 23:00:11 [SERVER] [INFO] Saving and pausing game...
in the console.
Cannot reproduce in 14w11b. World preset used:
2;1x7,10x0,1x3;2;
The used:
/fill ~ ~ ~ ~-40 ~-1 ~40 minecraft:air
to cause as many lighting updates as possible. Smooth lighting at maximum, render distance 16.
I can reproduce this in the latest 14w11b snapshot. Causes lag that lasts just under half a second.
Way to reproduce:
1. Create a new world and dig down with a 1x1 tunnel to bedrock level.
2. Use the fill command to dig out a 40x10x40 area around you.
3. Remove all light in the area.
4. While standing in the empty area, place 1 block in the tunnel you dug to block the light from the sky. Can also be seen when the block is removed.
I've heard that this can be problematic for complicated, exposed redstone mechanisms (because lighting updates need to occur whenever dust and such turns on/off).

Are the affected versions still getting updated? (MC-72310 is for 1.8.)

Confirmed for 1.8.1-pre2.
I noticed that this only happens with opaque blocks, implying that it is a lighting issue. Also, if the hole you are filling in is filled with water, it won't lag. By the way, a much easier way to test this is to just make a one layer thick superflat world.

Confirmed for 1.8.1. As a prove that this is related to lighting, if you cover yourself in a 1x2x1 hole with no light (or any room with a low light level), open a hole to the void, and then cover it, it will not lag, because of the low light level. But if you don't block the light, it will lag a lot.

Confirmed in 1.8.2-pre4. The lag seems much more extreme when blocking the light than when removing the block.
confirmed for 15w44b
"Simple" build that confirms the issue.
Punch obsidian to observe normal behavior.
Toggle lever (This slides a block under the chest to expose darkness)
Punch obsidian to observe the lag.
These spike to 50% for me:
root.gamerenderer.level.terrain_setup.culling.build_near 1.8.9
root.tick.level.entities.blockEntities.aqr.checkedPosition 15w51b
The way I came across this bug was when changing a large 1 block tall plane of grass blocks. Since there was no light underneath the platform, it would lag when removing the light from underneath the platform when the hole creating the light (from the sky) was filled in. This only happened when the light went away.
For me it specifically caused a 2 - 3 second lag in root.tick.keyboard
Well you can add 1.9.2 to the list and I don't really think this is a creative only issue either... I noticed lagspikes when building the roof and the last block just kills it completely (client and server both on quite some hardware)...
Still happening in the 1.12 pre-release 6

Still in 1.12.2 Pre-release. Please fix this Mojang.
If you put a Piston on the right Position with a clock you can effectively crash every client in the sourrounding.
From all comments I noticed this is both client-side and server-side issue. When removing light source at underground, it would lag more than if you remove it at surface during daytime. More checks needed about light updates client-side and server-side.

This is affecting every 1.13 snapshot as well.

This also occurs on Java 8 and on Linux.
confirmed for breaking last bedrock level on 18w30b

change "fill ~20 ~200 ~-20 ~-20 ~200 ~20" to "/fill ~20 240 ~-20 ~-20 240 ~20"
and "/tp @a ~ ~205 ~" to "/tp @p ~ 250 ~"
@unknown It literally doesn't matter. you still drop frames on Y: 200

If the stone platform is at y=200
and is 57 or more blocks across (square)
and all blocks under the platform is air
X=29 (Distance of Light spread from center) Y=200 (Height of platform)
Breaking the block in the middle will produce .5(X^2+1)Y+1 = 84200 (84k) skylight updates
X=15 (Sky Light level) Y=200 (Height of platform)
Replacing the block will produce Y((X^2+2)X^2/3)+X = 3405015 (3405k, 3.4million) skylight updates
Oh and redstone dust does NOT produce light updates (they cause block updates)
Repeaters used to in 1.5.2 but that got removed due to lag