Skip to content

TPS drop when using B_linear #146

@omnikeycard

Description

@omnikeycard

I recently migrated a server map from MCA to LinearV1 using this converter, then installed it on the server using the b_linear format. However, I made a mistake and forgot to change the compression level from 1 to 6 (the map was originally formatted with level 6).
About 12 hours after the server was up and running, this bug first appeared – the server console started filling up with errors like this:

[20:55:15 WARN]: Exception in thread "BufferedLinearRegionFile I/O Worker 20452" java.lang.RuntimeException: java.io.IOException: Failed to sync to master file!
[20:55:15 WARN]:        at me.earthme.luminol.utils.BufferedLinearRegionFileFlusher.lambda$run$0(BufferedLinearRegionFileFlusher.java:97)
[20:55:15 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[20:55:15 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[20:55:15 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[20:55:15 WARN]: Caused by: java.io.IOException: Failed to sync to master file! 
[20:55:15 WARN]:        at me.earthme.luminol.data.BufferedLinearRegionFile.syncToMasterFile(BufferedLinearRegionFile.java:162)
[20:55:15 WARN]:        at me.earthme.luminol.data.BufferedLinearRegionFile.syncIfNeeded(BufferedLinearRegionFile.java:142)
[20:55:15 WARN]:        at me.earthme.luminol.utils.BufferedLinearRegionFileFlusher.lambda$run$0(BufferedLinearRegionFileFlusher.java:95)
[20:55:15 WARN]:        ... 3 more
[20:55:15 WARN]: Caused by: net.jpountz.lz4.LZ4Exception: Malformed input at 13 
[20:55:15 WARN]:        at net.jpountz.lz4.LZ4JavaUnsafeFastDecompressor.decompress(LZ4JavaUnsafeFastDecompressor.java:78)
[20:55:15 WARN]:        at net.jpountz.lz4.LZ4FastDecompressor.decompress(LZ4FastDecompressor.java:109)
[20:55:15 WARN]:        at net.jpountz.lz4.LZ4DecompressorWithLength.decompress(LZ4DecompressorWithLength.java:185)
[20:55:15 WARN]:        at net.jpountz.lz4.LZ4DecompressorWithLength.decompress(LZ4DecompressorWithLength.java:204)
[20:55:15 WARN]:        at me.earthme.luminol.data.BufferedLinearRegionFile$CompressingOps.fromCommitedSection(BufferedLinearRegionFile.java:691)
[20:55:15 WARN]:        at me.earthme.luminol.data.BufferedLinearRegionFile.readChunkDataRaw(BufferedLinearRegionFile.java:449)
[20:55:15 WARN]:        at me.earthme.luminol.data.BufferedLinearRegionFile$LinearMasterFileFrameParser.writeMainFile(BufferedLinearRegionFile.java:969)
[20:55:15 WARN]:        at me.earthme.luminol.data.BufferedLinearRegionFile.syncToMasterFile(BufferedLinearRegionFile.java:157)
[20:55:15 WARN]:        ... 5 more

Meanwhile, the thread number in each new exception (the number after "Exception in thread "BufferedLinearRegionFile I/O Worker") increased, reaching several million.

After a few hours, the TPS began to gradually decrease, dropping to 3. A restart helped resolve the issue, but only for 3-6 hours. I suspect this is related to a memory leak and heap overflow (since the number of GC calls increases over time).

I already thought the map had been corrupted, but no — players weren't reporting missing chunks or entities. I started digging further.
After trying to convert the format back to MCA using the same tools, I was getting an error about an invalid Superblock for some regions, causing those regions to be skipped. After further investigation, I noticed that the "corrupted" region files had a version of 2, while the valid ones had a version of 1. The signature was also different (0xffffdff7eddafd97, while the standard signature should be 0xc3ff13183cca9d9a). Perhaps B_linear changes it? I don't know.
I'll repeat again that there have been no issues with map corruption. Not a single player has reported missing files yet. anything. So, it's most likely a Luminol or format software issue, so I'm asking for help here.
I'm happy to provide any additional information you need.
Thanks in advance.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions