RFR: 8299748: java/util/zip/Deinflate.java failing on s390x
Amit Kumar
duke at openjdk.org
Wed Feb 1 05:04:50 UTC 2023
On Tue, 31 Jan 2023 09:00:18 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hi @jaikiran ,
>> On my system OS's zlib is being used. and here is stack-trace.
>>
>> ----------System.out:(2/78)----------
>> level:-1, strategy: 0, dowrap: false
>> m=525312, n=498060, len=524288, eq=false
>> ----------System.err:(11/585)----------
>> java.lang.RuntimeException: De/inflater failed:java.util.zip.Deflater at 5ce95579
>> at DeInflate.check(DeInflate.java:141)
>> at DeInflate.main(DeInflate.java:290)
>> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>> at java.base/java.lang.reflect.Method.invoke(Method.java:578)
>> at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
>> at java.base/java.lang.Thread.run(Thread.java:1623)
>>
>> JavaTest Message: Test threw exception: java.lang.RuntimeException
>> JavaTest Message: shutting down test
>>
>> result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: De/inflater failed:java.util.zip.Deflater at 5ce95579
>>
>> test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: De/inflater failed:java.util.zip.Deflater at 5ce95579
>
>> m=525312, n=498060, len=524288, eq=false
>
> The test doesn't print this so I assume this is tracing that you added in your runs. If I read it correctly, the initial input is len=524288, it deflates to m=525312, then re-inflates to n=498060. So it looks like it has been truncated. Would it be possible to print out the value of inf.getRemaining()? I'm wondering if the test needs to be changed to call inflate in a loop until there are no remaining bytes.
Hi @AlanBateman ,
I haven't done any modification in the test/build. The info is being printed by the test itself. `m, n, len, eq` are printed just before the exception raised.
I tried to use `inf.getRemaining()` (after restoring back to original file) and In my case it returns `0`, and then test fails.
Changes I test with:
diff --git a/test/jdk/java/util/zip/DeInflate.java b/test/jdk/java/util/zip/DeInflate.java
index a6a749fda83..d334903e5dc 100644
--- a/test/jdk/java/util/zip/DeInflate.java
+++ b/test/jdk/java/util/zip/DeInflate.java
@@ -132,7 +132,7 @@ public class DeInflate {
Inflater inf = new Inflater(nowrap);
inf.setInput(out1, 0, m);
int n = inf.inflate(out2);
-
+ System.out.println("remaining data: " + inf.getRemaining());
if (n != len ||
!Arrays.equals(Arrays.copyOf(in, len), Arrays.copyOf(out2, len)) ||
inf.inflate(out2) != 0) {
-------------
PR: https://git.openjdk.org/jdk/pull/12283
More information about the core-libs-dev
mailing list