apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.38k stars 3.22k forks source link

Need update GCC version for stack unwinding #3737

Open vagetablechicken opened 4 years ago

vagetablechicken commented 4 years ago

Describe the bug We get a coredump file.

Program terminated with signal 6, Aborted.
#0  0x00007f6868de11d7 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.1.x86_64 libgcc-4.8.5-28.el7_5.1.x86_64 zlib-1.2.7-17.el7.x86_64
(gdb) bt
#0  0x00007f6868de11d7 in raise () from /lib64/libc.so.6
#1  0x00007f6868de28c8 in abort () from /lib64/libc.so.6
#2  0x000000000266a6e5 in __gnu_cxx::__verbose_terminate_handler () at ../../.././libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00000000025dab16 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00000000025dab61 in std::terminate () at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x000000000264116e in std::execute_native_thread_routine (__p=0x5b338e0) at ../../../.././libstdc++-v3/src/c++11/thread.cc:91
#6  0x00007f6868b97dc5 in start_thread () from /lib64/libpthread.so.0
#7  0x00007f6868ea373d in clone () from /lib64/libc.so.6

The root cause is that we don't capture std::exception in std::stoul()/std::stoull(), so the exception is captured in here(GCC-7.3.0): https://github.com/gcc-mirror/gcc/blob/6184085fc664265dc78fd1ad4204c0cbef202628/libstdc%2B%2B-v3/src/c%2B%2B11/thread.cc#L89-L92

std::exception may print error to stderr, but it doesn't have the precise locaction of the offending code.

Expected behavior Don't lose the missing stack infos. So we could update the GCC version to 8.x, e.g. 8.3.x: https://github.com/gcc-mirror/gcc/blob/releases/gcc-8.3.0/libstdc++-v3/src/c++11/thread.cc

morningman commented 4 years ago

We've already adapted to the higher version.PR #3262 And we may release it when 0.13 is released