yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.95k stars 1.07k forks source link

protoc-gen-insertions: Plugin killed by signal 11 #8928

Open TiannV opened 3 years ago

TiannV commented 3 years ago

Jira Link: DB-1667 Here's the error when i compile YB for aarch64:

[ 20%] Running C++ protocol buffer compiler on pb_util.proto
[ 20%] Running C++ protocol buffer compiler on pgsql_protocol.proto
[ 20%] Running C++ protocol buffer compiler on encryption.proto
yb/common/pgsql_protocol.proto: warning: Import yb/common/ql_protocol.proto but not used.
--insertions_out: protoc-gen-insertions: Plugin killed by signal 11.
--insertions_out: protoc-gen-insertions: Plugin killed by signal 11.
--insertions_out: protoc-gen-insertions: Plugin killed by signal 11.

no other useful information.

How to fix it?

thx!

svarnau commented 3 years ago

There may be an additional build that has more information, such as ./build/debug-gcc9-dynamic-ninja/CMakeFiles/CMakeOutput.log

mbautin commented 3 years ago

@TiannV Thank you for your interest in YugabyteDB. In general we haven't started porting YugabyteDB to ARM architectures yet, so I expect a lot of issues. Currently YugabyteDB works best on the x86_64 architecture.

Separately, an issue like this could be caused by low available memory on the build machine, which could be worked around by specifying-j 1 or -j 2 options to yb_build.sh (but the compilation will proceed more slowly).

Would you mind sharing a more complete build log?

TiannV commented 3 years ago

Here's CMakeOutput.log CMakeOutput.log

TiannV commented 3 years ago

I gdb the coredump, got the infomation:

(gdb) where
#0  0x0000ffffb4ab36c4 in access_mem () from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/common/lib/libunwind.so.8
#1  0x0000ffffb4ab3e90 in _ULaarch64_is_signal_frame ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/common/lib/libunwind.so.8
#2  0x0000ffffb4ab449c in _ULaarch64_step ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/common/lib/libunwind.so.8
#3  0x0000ffffb4884400 in GetStackTrace_libunwind(void**, int, int) [clone .part.2] ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
#4  0x0000ffffb48847a8 in GetStackTrace(void**, int, int) ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
#5  0x0000ffffb48759b0 in tcmalloc::PageHeap::GrowHeap(unsigned long) ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
#6  0x0000ffffb4875c44 in tcmalloc::PageHeap::New(unsigned long) ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
#7  0x0000ffffb4873de4 in tcmalloc::CentralFreeList::Populate() ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
#8  0x0000ffffb4874008 in tcmalloc::CentralFreeList::FetchFromOneSpansSafe(int, void**, void**) ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
#9  0x0000ffffb48740a4 in tcmalloc::CentralFreeList::RemoveRange(void**, void**, int) ()
   from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew/installed/uninstrumented/lib/libtcmalloc.so.4
TiannV commented 3 years ago

And I find the issues: https://github.com/libunwind/libunwind/issues/235. So I'm going to use lastest libunwind-1.5.0.tar.gz for a try。

TiannV commented 3 years ago

Sadly, it doesn't solve my problem new issue: https://github.com/libunwind/libunwind/issues/260

mbautin commented 3 years ago

Working around this issue with --no-tcmalloc for now.

mbautin commented 3 years ago

Looking at this in more detail. Getting this stack trace (no line numbers):

$ gdb build/debug-gcc-dynamic-ninja/bin/protoc-gen-insertions /var/crash/core.28928 
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-15.el8
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/debug-gcc-dynamic-ninja/bin/protoc-gen-insertions...done.

warning: core file may not match specified executable file.
[New LWP 28928]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `build/debug-gcc-dynamic-ninja/bin/protoc-gen-insertions'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000ffff9bde35b4 in access_mem () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/common/lib/libunwind.so.8
Missing separate debuginfos, use: yum debuginfo-install glibc-2.28-151.el8.aarch64 libatomic-8.4.1-1.el8.aarch64 libgcc-8.4.1-1.el8.aarch64 libstdc++-8.4.1-1.el8.aarch64
(gdb) where
#0  0x0000ffff9bde35b4 in access_mem () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/common/lib/libunwind.so.8
#1  0x0000ffff9bde3da8 in _ULaarch64_is_signal_frame () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/common/lib/libunwind.so.8
#2  0x0000ffff9bde432c in _ULaarch64_step () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/common/lib/libunwind.so.8
#3  0x0000ffff9bf53dd0 in GetStackTrace_libunwind(void**, int, int) [clone .part.2] () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#4  0x0000ffff9bf54170 in GetStackTrace(void**, int, int) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#5  0x0000ffff9bf45360 in tcmalloc::PageHeap::GrowHeap(unsigned long) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#6  0x0000ffff9bf455f4 in tcmalloc::PageHeap::New(unsigned long) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#7  0x0000ffff9bf437a8 in tcmalloc::CentralFreeList::Populate() () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#8  0x0000ffff9bf439c8 in tcmalloc::CentralFreeList::FetchFromOneSpansSafe(int, void**, void**) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#9  0x0000ffff9bf43a64 in tcmalloc::CentralFreeList::RemoveRange(void**, void**, int) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#10 0x0000ffff9bf46ecc in tcmalloc::ThreadCache::FetchFromCentralCache(unsigned int, int, void* (*)(unsigned long)) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#11 0x0000ffff9bf574b4 in tcmalloc::allocate_full_malloc_oom(unsigned long) () from /home/centos/code/yugabyte-db2/build/debug-gcc-dynamic-ninja/bin/../../../../yugabyte-db-thirdparty/installed/uninstrumented/lib/libtcmalloc.so.4
#12 0x0000ffff9b8acfd4 in _GLOBAL__sub_I_eh_alloc.cc () from /lib64/libstdc++.so.6
#13 0x0000ffff9c1bde04 in call_init.part () from /lib/ld-linux-aarch64.so.1
#14 0x0000ffff9c1bdf08 in _dl_init () from /lib/ld-linux-aarch64.so.1
#15 0x0000ffff9c1b1044 in _dl_start_user () from /lib/ld-linux-aarch64.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)