Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

Segmentation fault with "mksnapshot" #59

Open
anatol opened this issue Nov 14, 2018 · 1 comment
Open

Segmentation fault with "mksnapshot" #59

anatol opened this issue Nov 14, 2018 · 1 comment

Comments

@anatol
Copy link
Contributor

anatol commented Nov 14, 2018

I am trying to build RethinkDB at Arch Linux and it crashes:

    [396/426] CC build/release/obj/arch/runtime/runtime.o
    [397/426] CC build/release/obj/arch/runtime/event_queue/epoll.o
    [398/426] CC build/release/obj/arch/runtime/event_queue/kqueue.o
    [399/426] CC build/release/obj/arch/runtime/event_queue/poll.o
    [400/426] CC build/release/obj/arch/runtime/runtime_utils.o
    [401/426] CC build/release/obj/arch/arch.o
    [402/426] CC build/release/obj/arch/barrier.o
    [403/426] CC build/release/obj/arch/io/disk.o
    [404/426] CC build/release/obj/arch/io/timer/timer_signal_provider.o
    [405/426] CC build/release/obj/arch/io/timer/timerfd_provider.o
    [406/426] CC build/release/obj/arch/io/timer/timer_kqueue_provider.o
    [407/426] CC build/release/obj/arch/io/io_utils.o
    [408/426] CC build/release/obj/arch/io/blocker_pool.o
    [409/426] CC build/release/obj/arch/io/event_watcher.o
    [410/426] CC build/release/obj/arch/io/network.o
    [411/426] CC build/release/obj/arch/io/disk/pool.o
    [412/426] CC build/release/obj/arch/io/disk/accounting.o
    [413/426] CC build/release/obj/arch/io/disk/stats_2.o
    [414/426] CC build/release/obj/arch/io/disk/filestat.o
    [415/426] CC build/release/obj/arch/io/disk/stats.o
    [416/426] CC build/release/obj/arch/io/disk/conflict_resolving.o
    [417/426] CC build/release/obj/arch/spinlock.o
    [418/426] CC build/release/obj/arch/os_signal.o
    [419/426] CC build/release/obj/arch/timing.o
    [420/426] CC build/release/obj/arch/timer.o
    [421/426] CC build/release/obj/arch/address.o
    [422/426] CC build/release/obj/arch/types.o
    [423/426] CC build/release/obj/arch/fd_send_recv.o
    [424/426] CC build/release/obj/arch/windows_stub/pthread.o
    [425/426] CC build/release/obj/threading.o
                                         ^
.././src/frames.h:38:10: note: ‘struct v8::internal::InnerPointerToCodeCache::InnerPointerToCodeCacheEntry’ declared here
   struct InnerPointerToCodeCacheEntry {
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/mksnapshot.cc:15:
.././src/assembler.h: In static member function ‘static void v8::internal::ExternalReference::set_redirector(v8::internal::Isolate*, void* (*)(void*, v8::internal::ExternalReference::Type))’:
.././src/assembler.h:984:73: warning: cast between incompatible function types from ‘void* (*)(void*, v8::internal::ExternalReference::Type)’ to ‘void* (*)()’ [-Wcast-function-type]
         reinterpret_cast<ExternalReferenceRedirectorPointer*>(redirector));
                                                                         ^
.././src/assembler.h: In static member function ‘static void* v8::internal::ExternalReference::Redirect(v8::internal::Isolate*, v8::internal::Address, v8::internal::ExternalReference::Type)’:
.././src/assembler.h:998:53: warning: cast between incompatible function types from ‘void* (*)()’ to ‘void* (*)(void*, v8::internal::ExternalReference::Type)’ [-Wcast-function-type]
             isolate->external_reference_redirector());
                                                     ^
  /usr/bin/c++ -pthread -m64 -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/lib/openssl-1.0 -o /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/mksnapshot -Wl,--start-group /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/mksnapshot/src/mksnapshot.o /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/tools/gyp/libv8_base.a /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/tools/gyp/libv8_nosnapshot.a /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/tools/gyp/libv8_libplatform.a /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/third_party/icu/libicui18n.a /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/third_party/icu/libicuuc.a /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/tools/gyp/libv8_libbase.a /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/third_party/icu/libicudata.a -Wl,--end-group -lrt
  LD_LIBRARY_PATH=/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/lib.host:/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/gyp; mkdir -p /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/v8_snapshot/geni; "/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/mksnapshot" --log-snapshot-positions --logfile "/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/v8_snapshot/geni/snapshot.log" --random-seed 314159265 "/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc"
/bin/sh: line 1: 25197 Segmentation fault      (core dumped) "/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/mksnapshot" --log-snapshot-positions --logfile "/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/v8_snapshot/geni/snapshot.log" --random-seed 314159265 "/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc"
make[3]: *** [tools/gyp/v8_snapshot.target.x64.release.mk:13: /build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139
make[3]: Leaving directory '/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build/out'
make[2]: *** [Makefile:286: x64.release] Error 2
make[2]: Leaving directory '/build/rethinkdb/src/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build'

Full error log: ./build/external/v8_3.30.33.16-patched2_install.log
make[1]: *** [mk/support/build.mk:122: build/external/v8_3.30.33.16-patched2/lib/libv8.a] Error 1
make: *** [Makefile:53: make] Error 2

The old rethinkdb database had a ticket with this bug and there was a proposed patch. But the old issues database has gone. rethinkdb/rethinkdb#5757

@asakatida
Copy link
Contributor

rethinkdb/rethinkdb#5757 there are a few fixes in there. Some of them even made it into the codebase. At the end there is discussion of Duktape, which we have implemented the patch for. That would fix this issue for next. The other proposed solution was mandating CXX=clang++, as this is clearly a bug in gcc5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants