tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't build lang/openjdk{17,21} on NetBSD/aarch64 (Apple M3)



On 7/24/25 00:49, Robert Swindells wrote:

PHO <pho%cielonegro.org@localhost> wrote:
On 7/22/25 02:53, PHO wrote:
On 7/16/25 03:13, Tobias Nygren wrote:
On Fri, 11 Jul 2025 18:48:13 +0900
PHO <pho%cielonegro.org@localhost> wrote:

In the early stage of build, when it's doing something about X.509
certificates, the "keytool" program from the bootkit dies with SIGILL

I think it is fixed in -current but I no longer recall if this was
a kernel or userland problem. Some pull-up is likely missing.
Likely candidates are kernel, libpthread and/or ld.elf_so.

That's a great news! Thanks for sharing that!

Today I updated my netbsd-10 system with a hope for the bug to be fixed,
but unfortunately openjdk{17,21} still died with SIGILL. I also tried
updating my -current system but the issue was still there. So I
concluded the issue wasn't a known one.

Do you get core files left behind in the package working directory from
running the bootstrap JVM?

Yes I do.

core: https://akari.cielonegro.org/tmp/java.core.gz
crash log: https://akari.cielonegro.org/tmp/hs_err_pid1030.log

I can reliably reproduce the SIGILL by doing this:

% cd /usr/pkgsrc/lang/openjdk17
% make patch
% LD_LIBRARY_PATH=./work/bootstrap/lib ./work/bootstrap/bin/java -h

The offending code looks completely normal to me:

   0x0000f91ce30fddc8:  add     x0, x24, #0x0  // <- CRASHES HERE
   0x0000f91ce30fddcc:  mov     x2, #0x0                        // #0
   0x0000f91ce30fddd0:  ldr     x8, [x0]
   0x0000f91ce30fddd4:  cbz     x8, 0xf91ce30fdddc
   0x0000f91ce30fddd8:  mov     x2, x0
   0x0000f91ce30fdddc:  mov     x0, #0xe7bc                     // #59324
   0x0000f91ce30fdde0:  movk    x0, #0xe30b, lsl #16
   0x0000f91ce30fdde4:  movk    x0, #0xf91c, lsl #32
   0x0000f91ce30fdde8:  ret


Home | Main Index | Thread Index | Old Index