NetBSD-Bugs archive

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

port-mips/56610: NetBSD 9+ potentially incompatible with Loongson 2F



>Number:         56610
>Category:       port-mips
>Synopsis:       NetBSD 9+ potentially incompatible with Loongson 2F
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 08 16:05:00 +0000 2022
>Originator:     manphiz <manphiz%gmail.com@localhost>
>Release:        NetBSD 9.2_STABLE
>Organization:
>Environment:
        System: NetBSD yeeloong-netbsd 9.2_STABLE NetBSD 9.2_STABLE
(LOONGSON) #0: Fri Dec 24 13:05:22 UTC 2021
mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/evbmips/compile/LOONGSON
evbmips
        Architecture: mips64el
        Machine: evbmips
>Description:

        I have been experiencing programs randomly crash on NetBSD
        9.2_STABLE installed on Lemote Yeeloong using Loongson 2F CPU.
        The "file" program reports a generated core file type as
        normal as can be seen in the following command line outputs:

        ```
        yeeloong-netbsd# file chmod.core
        chmod.core: ELF 32-bit LSB core file, MIPS, N32 MIPS-III
version 1 (SYSV), NetBSD-style, from 'chmod', pid=2848, uid=0, gid=0,
nlwps=1, lwp=1 (signal 11/code 32767)
        ```

        In fact all normal executable gets similar report by file
        program.  However when inspecting the problematic programs in
        gdb, it claims that file format of "ld.elf_so" not recognized,
        and there is a warning regarding unknown library architecture:

        ```
        Reading symbols from chmod...
        (No debugging symbols found in chmod)
        "/usr/pkgsrc/pkgtools/mksandbox/chmod.core" is not a core
dump: file format not recognized
        (gdb) r
        Starting program: /bin/chmod
        warning: `/libexec/ld.elf_so': Shared library architecture
unknown is not compatible with target architecture mips:4000.
        warning: `/libexec/ld.elf_so': Shared library architecture
unknown is not compatible with target architecture mips:4000.
        Usage: chmod [-R [-H | -L | -P]] [-fh] mode file ...
               chmod [-R [-H | -L | -P]] [-fh] --reference=rfile file ...
        [Inferior 1 (process 29793) exited with code 01]
        ```

        As the warning message suggested, the binary seems to be
        compiled with mips:4000 instruction sets, which Loongson 2F
        doesn't seem to support.  As I'm not an expert in this area,
        I would wait until a MIPS porter to confirm this is the case.
        I'd be happy to provide more info if required.

>How-To-Repeat:
        Compile any package in pkgsrc and some programs (e.g. chmod,
        rm, install, etc.)
>Fix:
        Probably restrict the instruction set used for mips64el to
        MIPS-III N32 ELF 32-bit, but not very certain.



Home | Main Index | Thread Index | Old Index