[RFC]: backport to fix PR655
Xerxes Rånby
xerxes at zafena.se
Mon Feb 28 16:54:09 PST 2011
Hi!
On 2011-03-01 00:07, Denis Lila wrote:
> Hi.
>
> The attached patch would backport this changeset:
> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/24741c4bf300
> which fixes S6934977. PR655 seems to be a duplicate of that
> (but I don't have a reproducer for PR655 so I can't say for
> certain; however, looking at the 2 bug descriptions, there
> is little doubt).
I can reproduce this bug using the testcase at the end of:
http://bugs.sun.com/view_bug.do?bug_id=6934977
But hmm.. the test still fail for me with this backport applied..
although in a different way. Do this backport need something that can
handle the thrown InternalError Exception to work?
With backport applied:
java TruncateTest
Creating test file...done
Creating mapped buffer from test file...done
Attempting to truncate the file...done
Attempting to load mapped buffer...
Exception in thread "main" java.lang.InternalError: a fault occurred in
a recent unsafe memory access operation in compiled Java code
at sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:360)
at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:466)
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:270)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:124)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:128)
at java.io.PrintStream.write(PrintStream.java:493)
at java.io.PrintStream.print(PrintStream.java:636)
at java.io.PrintStream.println(PrintStream.java:773)
at TruncateTest.main(TruncateTest.java:30)
Unpatched without backport applied:
java TruncateTest
Creating test file...done
Creating mapped buffer from test file...done
Attempting to truncate the file...done
Attempting to load mapped buffer...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007fccd4874f48, pid=17748, tid=140518804694800
#
# JRE version: 6.0_20-b20
# Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 )
# Derivative: IcedTea6 1.9.2
# Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.2-0ubuntu1~10.04.1
# Problematic frame:
# C [libnio.so+0x4f48] Java_java_nio_MappedByteBuffer_load0+0x48
#
# An error report file with more information is saved as:
# /home/xranby/hs_err_pid17748.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Avbruten (SIGABRT)
>
> Ok to push?
Since this fix only alter the return type of private JNI methods makes
me think this are a suitable back-port to IcedTea6.
Please verify that this fix passes the reproducer on your machine.
>
> Thank you,
> Denis.
Cheers, and have a great day!
Xerxes
More information about the distro-pkg-dev
mailing list