SIGSEGV when debugging an overriden defender method
Brian Goetz
brian.goetz at oracle.com
Thu May 10 08:36:13 PDT 2012
Thanks for the bug report!
On 5/10/2012 5:57 AM, Peter Levart wrote:
> I'm trying to debug code compiled and run by the latest lambda JDK (hg rev
> 5323 (8310b83837de)) with:
>
> -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:60486,suspend=y,server=n
>
> and get a SIGSEGV from JVM immediately after debug session starts (connection
> to debugger is established):
>
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # SIGSEGV (0xb) at pc=0x00007f55398405d9, pid=18635, tid=140003423139584
> #
> # JRE version: 8.0
> # Java VM: OpenJDK 64-Bit Server VM (24.0-b07 mixed mode linux-amd64
> compressed oops)
> # Problematic frame:
> # V [libjvm.so+0x5c95d9] JvmtiEnv::GetClassMethods(oopDesc*, int*,
> _jmethodID***)+0x249
>
> The code normally runs without a problem (when not debugging). It also runs to
> completion when debugging but no breakpoints are set.
>
> I traced down the crash to occur when the breakpoint is set inside a method in
> a class that @Overrides a defender method from the interface.
>
> Here's an example:
>
> import java.util.*;
>
> public class SimpleTest
> {
> static class MyList<T> extends ArrayList<T>
> {
> @Override
> public Iterable<T> sorted(Comparator<? super T> comparator)
> {
> return super.sorted(comparator); //<- put breakpoint HERE!
> }
> }
>
> public static void main(String[] args)
> {
> MyList<String> strings = new MyList<>();
> strings.add("aaa");
> strings.add("bbb");
> strings.add("ccc");
>
> System.out.println(strings.sorted(Comparators.reverseOrder()));
> }
> }
>
>
> I can send the hs_errXXX.log file if needed, but I think the above example can
> be used to reproduce the problem...
>
>
> Regards,
>
> Peter
>
>
>
>
More information about the lambda-dev
mailing list