On Jun 27, 2023, at 5:41 AM, Stuart Henderson <[email protected]> wrote:
> 
> On amd64 with a processor with IBT support running a kernel with the
> control-flow enforcement diff that's being tried in snapshots, the
> various Java-compiled binaries fail.
> 
> Some information pasted below and hs log attached; I didn't bother with
> the gdb backtrace as it just shows the signal handler in the lead-up to
> VMError::report_and_die).
> 
> There's a good chance aarch64 will have the same on CPUs which do
> control-flow integrity too (I think that may just be M2, not sure).
> 
> Bearing in mind the CLA situation I won't send a diff but adding
> -Wl,-z,nobtcfi in the same place that -Wl,-z,wxneeded is added does
> the trick to fix things (and while I think it won't matter for the
> package it would be helpful to add USE_NOBTCFI=Yes to the port so
> we can find it more easily).
> 
> We'll need new bootstraps at some point (for people building jdk
> themselves on newer machines) but that can be done later than
> fixing the package binaries (I can help with bootstrap builds if
> wanted).
> 

Thanks for the in-depth explanation.

The CLA situation is no more. Greg and I have given up on getting
BSD support merged upstream. It became clear that Oracle would not
accept our code without a deep pocket corporation backing the
effort. 

If you have tested diffs already baked, please go ahead and commit
them. I can build new bootstraps after it lands.

> 
> $ dmesg | grep -B1 ,IBT | head -2
> cpu0: 12th Gen Intel(R) Core(TM) i5-1245U, 1575.89 MHz, 06-9a-04
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PT,SHA,UMIP,PKU,WAITPKG,PKS,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> 
> $ /usr/local/jdk-11/bin/java                                         #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGILL (0x4) at pc=0x000005fe614cdc20, pid=55171, tid=6586713654336
> #
> # JRE version:  (11.0.19+7) (build )
> # Java VM: OpenJDK 64-Bit Server VM (11.0.19+7-1, mixed mode, tiered, 
> compressed oops, g1 gc, bsd-amd64)
> # Problematic frame:
> # j  java.lang.Object.<clinit>()V+-289299944 java.base
> #
> # Core dump will be written. Default location: /home/sthen/java.core
> #
> # An error report file with more information is saved as:
> # /home/sthen/hs_err_pid55171.log
> Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
> #
> #
> Abort trap (core dumped) 
> <hs_err_pid55171.log>

Reply via email to