PaperMC / PaperMC/Paperclip

`java.io.IOException: block overrun` when patching server jar

Open
#68 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
126
Forks
63
Avg merge
2m
Merged PRs (30d)
1

Description

I'm using IBM Semeru JDK 21.0.2

% java -version
openjdk version "21.0.2" 2024-01-16 LTS
IBM Semeru Runtime Open Edition 21.0.2.0 (build 21.0.2+13-LTS)
Eclipse OpenJ9 VM 21.0.2.0 (build openj9-0.43.0, JRE 21 Mac OS X aarch64-64-Bit 20240116_96 (JIT enabled, AOT enabled)
OpenJ9   - 2c3d78b48
OMR      - ea8124dbc
JCL      - 78c4500a434 based on jdk-21.0.2+13)

When I run paper jar download from website it just crashed.

% java -jar paper-1.21.4-183.jar 
Downloading mojang_1.21.4.jar
Applying patches
Failed to patch /META-INF/versions/1.21.4/server-1.21.4.jar
java.io.IOException: block overrun
	at paperclip.libs.org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.getAndMoveToFrontDecode(BZip2CompressorInputStream.java:700)
	at paperclip.libs.org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.initBlock(BZip2CompressorInputStream.java:326)
	at paperclip.libs.org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.setupNoRandPartA(BZip2CompressorInputStream.java:884)
	at paperclip.libs.org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.setupNoRandPartB(BZip2CompressorInputStream.java:933)
	at paperclip.libs.org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.read0(BZip2CompressorInputStream.java:228)
	at paperclip.libs.org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.read(BZip2CompressorInputStream.java:179)
	at paperclip.libs.io.sigpipe.jbsdiff.Patch.read(Patch.java:139)
	at paperclip.libs.io.sigpipe.jbsdiff.Patch.patch(Patch.java:104)
	at io.papermc.paperclip.PatchEntry.applyPatch(PatchEntry.java:136)
	at io.papermc.paperclip.Paperclip.applyPatches(Paperclip.java:238)
	at io.papermc.paperclip.Paperclip.extractAndApplyPatches(Paperclip.java:156)
	at io.papermc.paperclip.Paperclip.setupClasspath(Paperclip.java:72)
	at io.papermc.paperclip.Paperclip.main(Paperclip.java:28)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
	at io.papermc.paperclip.Main.main(Main.java:26)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Paperclip.applyPatches and PatchEntry.applyPatch, then trace the failure through paperclip.libs.io.sigpipe.jbsdiff.Patch.read into BZip2CompressorInputStream. Reproduce the patching failure with IBM Semeru JDK 21.0.2 and paper-1.21.4-183.jar; done means the server jar patches successfully without the block overrun.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.