public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC
@ 2020-02-14 11:14 John Paul Adrian Glaubitz
  2020-02-14 11:46 ` Anthony Green
  2020-02-15 19:03 ` John Paul Adrian Glaubitz
  0 siblings, 2 replies; 4+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-02-14 11:14 UTC (permalink / raw)
  To: libffi-discuss
  Cc: Andreas Schwab, James Clarke, Matthias Klose, debian-powerpc

Hello!

After libffi was upgraded to 3.3 in Debian, all OpenJDK versions started
to break on 32-bit PowerPC with the freshly compiled JVM crashing with
the following backtrace:

Thread 2 "java" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf767f450 (LWP 4139976)]
MemoryAccess<int>::get_volatile (this=<optimized out>) at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/prims/unsafe.cpp:244
244           T ret = HeapAccess<MO_SEQ_CST>::load_at(_obj, _offset);
(gdb) bt
#0  MemoryAccess<int>::get_volatile (this=<optimized out>) at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/prims/unsafe.cpp:244
#1  Unsafe_GetIntVolatile (env=<optimized out>, unsafe=<optimized out>, obj=0xf767e5b4, offset=<optimized out>) at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/prims/unsafe.cpp:334
#2  0xf77768e4 in ?? () from /usr/lib/powerpc-linux-gnu/libffi.so.7
#3  0xf7775874 in ?? () from /usr/lib/powerpc-linux-gnu/libffi.so.7
#4  0xf7932690 in CppInterpreter::native_entry (method=<optimized out>, UNUSED=<optimized out>, __the_thread__=0xf7314250)
    at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/interpreterRT_zero.hpp:41
#5  0xf79301cc in ZeroEntry::invoke (__the_thread__=0xf7314250, method=<optimized out>, this=<optimized out>) at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/entry_zero.hpp:59
#6  CppInterpreter::invoke_method (method=<optimized out>, entry_point=<optimized out>, __the_thread__=__the_thread__@entry=0xf7314250)
    at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/interpreter/cppInterpreter.cpp:66
#7  0xf7931174 in CppInterpreter::main_loop (recurse=recurse@entry=0, __the_thread__=__the_thread__@entry=0xf7314250)
    at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/bytecodeInterpreter_zero.hpp:87
#8  0xf793187c in CppInterpreter::normal_entry (method=0xf4d96838, UNUSED=<optimized out>, __the_thread__=0xf7314250)
    at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/cppInterpreter_zero.cpp:77
#9  0xf79301cc in ZeroEntry::invoke (__the_thread__=0xf7314250, method=<optimized out>, this=<optimized out>) at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/entry_zero.hpp:59
#10 CppInterpreter::invoke_method (method=<optimized out>, entry_point=<optimized out>, __the_thread__=__the_thread__@entry=0xf7314250)
    at /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/interpreter/cppInterpreter.cpp:66

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC
  2020-02-14 11:14 [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC John Paul Adrian Glaubitz
@ 2020-02-14 11:46 ` Anthony Green
  2020-02-14 11:52   ` John Paul Adrian Glaubitz
  2020-02-15 19:03 ` John Paul Adrian Glaubitz
  1 sibling, 1 reply; 4+ messages in thread
From: Anthony Green @ 2020-02-14 11:46 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: libffi-discuss, Andreas Schwab, James Clarke, Matthias Klose,
	debian-powerpc

On Fri, Feb 14, 2020 at 6:14 AM John Paul Adrian Glaubitz <
glaubitz@physik.fu-berlin.de> wrote:

> After libffi was upgraded to 3.3 in Debian, all OpenJDK versions started
> to break on 32-bit PowerPC with the freshly compiled JVM crashing with
> the following backtrace:
>

Thanks for pointing this out.   I only figured out how to do CI testing for
32-bit PowerPC after the 3.3 release, and there are indeed a number of
failures:

https://github.com/libffi/rlgl-policy/blob/master/XFAIL#L202-L290

travis-ci testing is done with a powerpc-eabisim GNU toolchain.  We need to
start going through these failures assuming that powerpc-eabisim is a close
approximation of the system you are using.

AG




>
> Thread 2 "java" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xf767f450 (LWP 4139976)]
> MemoryAccess<int>::get_volatile (this=<optimized out>) at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/prims/unsafe.cpp:244
> 244           T ret = HeapAccess<MO_SEQ_CST>::load_at(_obj, _offset);
> (gdb) bt
> #0  MemoryAccess<int>::get_volatile (this=<optimized out>) at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/prims/unsafe.cpp:244
> #1  Unsafe_GetIntVolatile (env=<optimized out>, unsafe=<optimized out>,
> obj=0xf767e5b4, offset=<optimized out>) at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/prims/unsafe.cpp:334
> #2  0xf77768e4 in ?? () from /usr/lib/powerpc-linux-gnu/libffi.so.7
> #3  0xf7775874 in ?? () from /usr/lib/powerpc-linux-gnu/libffi.so.7
> #4  0xf7932690 in CppInterpreter::native_entry (method=<optimized out>,
> UNUSED=<optimized out>, __the_thread__=0xf7314250)
>     at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/interpreterRT_zero.hpp:41
> #5  0xf79301cc in ZeroEntry::invoke (__the_thread__=0xf7314250,
> method=<optimized out>, this=<optimized out>) at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/entry_zero.hpp:59
> #6  CppInterpreter::invoke_method (method=<optimized out>,
> entry_point=<optimized out>, __the_thread__=__the_thread__@entry
> =0xf7314250)
>     at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/interpreter/cppInterpreter.cpp:66
> #7  0xf7931174 in CppInterpreter::main_loop (recurse=recurse@entry=0,
> __the_thread__=__the_thread__@entry=0xf7314250)
>     at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/bytecodeInterpreter_zero.hpp:87
> #8  0xf793187c in CppInterpreter::normal_entry (method=0xf4d96838,
> UNUSED=<optimized out>, __the_thread__=0xf7314250)
>     at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/cppInterpreter_zero.cpp:77
> #9  0xf79301cc in ZeroEntry::invoke (__the_thread__=0xf7314250,
> method=<optimized out>, this=<optimized out>) at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/cpu/zero/entry_zero.hpp:59
> #10 CppInterpreter::invoke_method (method=<optimized out>,
> entry_point=<optimized out>, __the_thread__=__the_thread__@entry
> =0xf7314250)
>     at
> /home/glaubitz/tmp/openjdk/jdk/src/hotspot/share/interpreter/cppInterpreter.cpp:66
>
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaubitz@debian.org
> `. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC
  2020-02-14 11:46 ` Anthony Green
@ 2020-02-14 11:52   ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 4+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-02-14 11:52 UTC (permalink / raw)
  To: Anthony Green
  Cc: libffi-discuss, Andreas Schwab, James Clarke, Matthias Klose,
	debian-powerpc

Hi Anthony!

On 2/14/20 12:46 PM, Anthony Green wrote:
> Thanks for pointing this out.   I only figured out how to do CI testing for
> 32-bit PowerPC after the 3.3 release, and there are indeed a number of
> failures:
> 
> https://github.com/libffi/rlgl-policy/blob/master/XFAIL#L202-L290
> 
> travis-ci testing is done with a powerpc-eabisim GNU toolchain.  We need to
> start going through these failures assuming that powerpc-eabisim is a close
> approximation of the system you are using.

This has been tested on Debian unstable (powerpc) with a current gcc-9
snapshot. I can try to track down the libffi commit that introduced the
regression.

Let me try.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC
  2020-02-14 11:14 [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC John Paul Adrian Glaubitz
  2020-02-14 11:46 ` Anthony Green
@ 2020-02-15 19:03 ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 4+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-02-15 19:03 UTC (permalink / raw)
  To: libffi-discuss
  Cc: Andreas Schwab, James Clarke, Matthias Klose, debian-powerpc

Hi!

On 2/14/20 12:14 PM, John Paul Adrian Glaubitz wrote:
> After libffi was upgraded to 3.3 in Debian, all OpenJDK versions started
> to break on 32-bit PowerPC with the freshly compiled JVM crashing with
> the following backtrace:
The commit that broke OpenJDK Zero on 32-bit PowerPC is:

commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0
Author: Samuel Holland <samuel@sholland.org>
Date:   Sun Nov 17 07:22:25 2019 -0600

    IEEE754 binary128 long double support for PowerPC64 (#526)
    
    * powerpc: Adjust flags to make room for vector types
    
    * powerpc64 ELFv2 IEEE128 long double support

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-15 19:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 11:14 [BUG]: libffi 3.3 breaks OpenJDK Zero on 32-bit PowerPC John Paul Adrian Glaubitz
2020-02-14 11:46 ` Anthony Green
2020-02-14 11:52   ` John Paul Adrian Glaubitz
2020-02-15 19:03 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).