Skip to content

crash on mipsel64 from v12.x #31118

@whhif

Description

@whhif
  • Version: 12.14.0
  • Platform: Linux localhost.localdomain 3.10.0 deps: update openssl to 1.0.1j #1 SMP PREEMPT Mon Sep 16 21:11:02 CST mips64 mips64 mips64 GNU/Linux
  • Subsystem: gcc-4.9.3-3 gcc-7.3.0

I just build [email protected] on mips64el (loongson 3A3000) with --with-snapshot ,the result was successed. When I run nodejs, it crashed. The messages are as follows:

#

# Fatal error in ../deps/v8/src/execution/isolate.cc, line 232

# Embedded blob checksum verification failed. This indicates that the embedded blob has been modified since compilation time. A common cause is a debugging breakpoint set within builtin code.

#

#

#

#FailureMessage Object: 0xffffffacc0

Program received signal SIGTRAP, Trace/breakpoint trap.

v8::base::OS::Abort () at ../deps/v8/src/base/platform/platform-posix.cc:406

But [email protected] and [email protected] works fine. I found that when I build [email protected] with --without-snapshot,then nodejs works fine. Maybe mips64el has some problems with v8 snapshot.

The versions of v8 and nodejs are :

  1. [email protected] -> [email protected]
  2. [email protected] -> [email protected]
  3. [email protected] -> [email protected]

According to the nodejs building document, have to build nodejs with gcc>=6.3,but I build it with gcc 4.9.3-3 without errors. after crash,I use [email protected] to build nodejs,the result are same.

I also tried to build nodejs with crossing compiler [email protected] and [email protected], nodejs was crashed too.You can download them from

http://www.loongnix.org/index.php/Cross-compile , and direct download url [email protected] and [email protected] ,put the date directory to /usr/loca/

the crossing build script as follows(host: ubuntu 18.04 x86_64 and [email protected]):

#!/bin/bash
export PREFIX=/usr/local/mips-loongson-gcc4.9-linux-gnu/bin/mips-linux-gnu-
export CC=${PREFIX}"gcc -march=gs464e -mips64r2 -mabi=64"
export CXX=${PREFIX}"c++ -march=gs464e -mips64r2 -mabi=64"
export LINK=$CXX
export LD=${PREFIX}ld
export AR=${PREFIX}ar
export AS=${PREFIX}as
export RANLIB=${PREFIX}ranlib
export CROSS_COMPILE=mips-loongson
export ARCH=mips64el

# Native compilers
export AR_host="ar"
export CC_host="gcc"
export CXX_host="g++"
export LINK_host="g++"

export AR_HOST="ar"
export CC_HOST="gcc"
export CXX_HOST="g++"
export LINK_HOST="g++"

# extras for convenience.
export OBJD=${PREFIX}objdump
export GDB=${PREFIX}gdb
export RDE=${PREFIX}readelf

./configure --dest-cpu=mips64el --cross-compiling --with-mips-arch-variant=r2 --dest-os=linux --openssl-no-asm --verbose
make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)

Maybe nodejs crashed in v8 builtin code,But when I use ./configure xxxx and --gdb, build failed on src\deps\v8\src\diagnostics\gdb-jit.cc@629 #error Unsupported target architecture.

  void WriteHeader(Writer* w) {
    DCHECK_EQ(w->position(), 0);
    Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>();
#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM)
    const uint8_t ident[16] = {0x7F, 'E', 'L', 'F', 1, 1, 1, 0,
                               0,    0,   0,   0,   0, 0, 0, 0};
#elif V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT || \
    V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN
    const uint8_t ident[16] = {0x7F, 'E', 'L', 'F', 2, 1, 1, 0,
                               0,    0,   0,   0,   0, 0, 0, 0};
#elif V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && V8_OS_LINUX
    const uint8_t ident[16] = {0x7F, 'E', 'L', 'F', 2, 2, 1, 0,
                               0,    0,   0,   0,   0, 0, 0, 0};
#elif V8_TARGET_ARCH_S390X
    const uint8_t ident[16] = {0x7F, 'E', 'L', 'F', 2, 2, 1, 3,
                               0,    0,   0,   0,   0, 0, 0, 0};
#elif V8_TARGET_ARCH_S390
    const uint8_t ident[16] = {0x7F, 'E', 'L', 'F', 1, 2, 1, 3,
                               0,    0,   0,   0,   0, 0, 0, 0};
#else
#error Unsupported target architecture. <--
#endif

Hi @bnoordhuis:

Thank you for help. Yes, mips(el) is not an officially supported
architecture, but less than nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mipsIssues and PRs related to the MIPS architecture.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions