NetBSD-Bugs archive

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

port-sparc/59333: perl install fails with sparc userland on sparc64 kernel



>Number:         59333
>Category:       port-sparc
>Synopsis:       perl install fails with sparc userland on sparc64 kernel
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 20 10:30:01 +0000 2025
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.14
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 10.99.14 NetBSD 10.99.14 (NELLY) #82: Sat Apr 19 18:41:20 CEST 2025 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/sparc64/compile/NELLY sparc
Architecture: sparc
Machine: sparc
>Description:

Running a -current sparc userland on a -current sparc64 kernel, trying to
build & install pkgsrc/lang/perl5 fails during the install phase with:

LD_LIBRARY_PATH=/usr/pkgobj/lang/perl5/work/perl-5.40.2 ./miniperl -Ilib make_ext.pl dist/Thread-Semaphore/pm_to_blib  MAKE="/usr/bin/make" LIBPERL_A=libperl.so
*** Signal 11

No usefull backtrace, but it tries loading a halfword from a properly aligned
address that is not mapped - guessing something went wrong with TLS.

/usr/tests/libexec/ld.elf_so tests all work fine:

Summary for 15 test programs:
    56 passed test cases.
    0 failed test cases.
    0 expected failed test cases.
    0 skipped test cases.

same for /usr/tests/lib/libc/tls:

Summary for 3 test programs:
    3 passed test cases.
    0 failed test cases.
    0 expected failed test cases.
    0 skipped test cases.

Core was generated by `miniperl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00042028 in perl_run ()
(gdb) bt
#0  0x00042028 in perl_run ()
#1  0x001cfd7c in main ()
(gdb) x/16i $pc
=> 0x42028 <perl_run+996>:      lduh  [ %g3 + 0x66 ], %g1
   0x4202c <perl_run+1000>:     st  %g2, [ %g3 + 0x208 ]
   0x42030 <perl_run+1004>:     b  0x42040 <perl_run+1020>
   0x42034 <perl_run+1008>:     sth  %g1, [ %fp + -10 ]
   0x42038 <perl_run+1012>:     call  0x176fdc <Perl_pop_scope>
(gdb) p/x $g3
$1 = 0x20000000
(gdb) x/x $g3
0x20000000:     Cannot access memory at address 0x20000000
(gdb) x/16i $pc-48
   0x41ff8 <perl_run+948>:      cmp  %o2, 0
   0x41ffc <perl_run+952>:      be  0x41dd8 <perl_run+404>
   0x42000 <perl_run+956>:      mov  3, %g1
   0x42004 <perl_run+960>:      ld  [ %fp + -88 ], %o1
   0x42008 <perl_run+964>:      mov  %g2, %o0
   0x4200c <perl_run+968>:      call  0x3bf7c <Perl_call_list>
   0x42010 <perl_run+972>:      st  %g1, [ %g2 + 0x518 ]
   0x42014 <perl_run+976>:      b  0x41ddc <perl_run+408>
   0x42018 <perl_run+980>:      ld  [ %fp + -84 ], %g3
   0x4201c <perl_run+984>:      add  %fp, -80, %g2
   0x42020 <perl_run+988>:      st  %o0, [ %fp + -16 ]
   0x42024 <perl_run+992>:      clrb  [ %fp + -12 ]
=> 0x42028 <perl_run+996>:      lduh  [ %g3 + 0x66 ], %g1
   0x4202c <perl_run+1000>:     st  %g2, [ %g3 + 0x208 ]
   0x42030 <perl_run+1004>:     b  0x42040 <perl_run+1020>
   0x42034 <perl_run+1008>:     sth  %g1, [ %fp + -10 ]


The issue is reproducable. Will try to reproduce on 32bit sparc hardware.

>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index