Greetings all. Yes, I am using the Impala toolchain to build it. The build scripts I am using is the make_debug.sh and make_release.sh scripts. I have diffed them: diff /root/Impala/bin/make_debug.sh /root/Impala/bin/make_release.sh 16c16 < $IMPALA_HOME/bin/make_impala.sh -build_type=Debug -build_shared_libs $* --- > $IMPALA_HOME/bin/make_impala.sh -build_type=Release $*
I found one difference is the -build_shared_libs option. And I tried to build using " make_impala.sh -build_type=Release -build_shared_libs" , everything works flawlessly. So I guess maybe there are some other thirdparty components which are not built properly. I will check this further. Thanks so much for your help and suggestions! -----Original Message----- From: Tim Armstrong [mailto:[email protected]] Sent: Tuesday, April 26, 2016 12:08 AM To: [email protected] Cc: [email protected] Subject: Re: CpuInfo::Init() crash in many benchmark programs This works ok for me. We've had a number of changes to the build environment I'd suggest that you make sure your environment is fresh and then start a build with buildall.sh. source bin/impala-config.sh ./bin/clean.sh ./buildall.sh -noclean -release -skiptests tarmstrong@tarmstrong-box:~/Impala/Impala$ ./be/build/release/benchmarks/atod-benchmark Machine Info: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz atod: Function Rate (iters/ms) Comparison ---------------------------------------------------------------------- Impala Decimal4 67.73 1X Impala Decimal8 42.74 0.631X Impala Decimal16 14.91 0.2201X Are you using the Impala toolchain to build? On Mon, Apr 25, 2016 at 4:56 AM, Wang, Youwei A <[email protected]> wrote: > Greetings all. > > I have update the Impala codebase to the latest using "git pull > cdh5-trunk origin". > And then run "make clean;" to clean up the pre-built binaries. > Finally I run the make_release.sh to build Impala in release mode. > > When I ran the benchmarks in the Impala/be/build/release/benchmarks > directory, many benchmarks came across the "segment fault" error. For > example: > root@debian:~/Impala/be/build/release/benchmarks# ./ atod-benchmark > Segmentation fault > > The following are gdb message: > Gdb atod-benchmark > (gdb) where > #0 0x00007ffff65bebb9 in KuduNotSupported() () from > /root/Impala/toolchain/kudu-0.8.0-RC1/release/lib64/libkudu_client.so. > 0 > #1 0x00007ffff65bfef5 in char* > std::string::_S_construct<char*>(char*, > char*, std::allocator<char> const&, std::forward_iterator_tag) () > from > /root/Impala/toolchain/kudu-0.8.0-RC1/release/lib64/libkudu_client.so. > 0 > #2 0x00007ffff56d6841 in _S_construct_aux<char*> (__a=..., > __end=<optimized out>, __beg=<optimized out>) > at > /data/jenkins/workspace/verify-impala-toolchain-package-build/label/un > ittest-ec2-pkg-debian-8/toolchain/source/gcc/build/x86_64-unknown-linu > x-gnu/libstdc++-v3/include/bits/basic_string.h:1743 > #3 _S_construct<char*> (__a=..., __end=<optimized out>, > __beg=<optimized > out>) > at > /data/jenkins/workspace/verify-impala-toolchain-package-build/label/un > ittest-ec2-pkg-debian-8/toolchain/source/gcc/build/x86_64-unknown-linu > x-gnu/libstdc++-v3/include/bits/basic_string.h:1764 > #4 std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::basic_string (this=0x7fffffff7e00, __str=..., __pos=<optimized > >out>, > __n=<optimized out>) > at > /data/jenkins/workspace/verify-impala-toolchain-package-build/label/un > ittest-ec2-pkg-debian-8/toolchain/source/gcc/build/x86_64-unknown-linu > x-gnu/libstdc++-v3/include/bits/basic_string.tcc:189 > #5 0x0000000000424bf1 in substr (__n=9, __pos=0, this=0x7fffffff7da0) > at > /root/Impala/toolchain/gcc-4.9.2/include/c++/4.9.2/bits/basic_string.h > :2227 > #6 impala::CpuInfo::Init () at > /root/Impala/be/src/util/cpu-info.cc:98 > #7 0x000000000041b91e in main (argc=<optimized out>, argv=<optimized > out>) at /root/Impala/be/src/benchmarks/atod-benchmark.cc:90 > > As well as the valgrind message: > root@debian:~/Impala/be/build/release/benchmarks# valgrind > atod-benchmark ==19445== Memcheck, a memory error detector ==19445== > Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. > ==19445== Using Valgrind-3.10.0 and LibVEX; rerun with -h for > copyright info ==19445== Command: atod-benchmark ==19445== ==19445== > Invalid write of size 1 > ==19445== at 0x6456BB9: KuduNotSupported() (in > /root/Impala/toolchain/kudu-0.8.0-RC1/release/lib64/libkudu_client.so.0.1.0) > ==19445== by 0x6457EF4: char* std::string::_S_construct<char*>(char*, > char*, std::allocator<char> const&, std::forward_iterator_tag) (in > /root/Impala/toolchain/kudu-0.8.0-RC1/release/lib64/libkudu_client.so.0.1.0) > ==19445== by 0x73AF840: _S_construct_aux<char*> (basic_string.h:1743) > ==19445== by 0x73AF840: _S_construct<char*> (basic_string.h:1764) > ==19445== by 0x73AF840: std::basic_string<char, std::char_traits<char>, > std::allocator<char> >::basic_string(std::string const&, unsigned > long, unsigned long) (basic_string.tcc:189) > ==19445== by 0x424BF0: substr (basic_string.h:2227) > ==19445== by 0x424BF0: impala::CpuInfo::Init() (cpu-info.cc:98) > ==19445== by 0x41B91D: main (atod-benchmark.cc:90) > ==19445== Address 0x0 is not stack'd, malloc'd or (recently) free'd > ==19445== ==19445== ==19445== Process terminating with default action > of signal 11 (SIGSEGV) ==19445== Access not within mapped region at > address 0x0 > ==19445== at 0x6456BB9: KuduNotSupported() (in > /root/Impala/toolchain/kudu-0.8.0-RC1/release/lib64/libkudu_client.so.0.1.0) > ==19445== by 0x6457EF4: char* std::string::_S_construct<char*>(char*, > char*, std::allocator<char> const&, std::forward_iterator_tag) (in > /root/Impala/toolchain/kudu-0.8.0-RC1/release/lib64/libkudu_client.so.0.1.0) > ==19445== by 0x73AF840: _S_construct_aux<char*> (basic_string.h:1743) > ==19445== by 0x73AF840: _S_construct<char*> (basic_string.h:1764) > ==19445== by 0x73AF840: std::basic_string<char, std::char_traits<char>, > std::allocator<char> >::basic_string(std::string const&, unsigned > long, unsigned long) (basic_string.tcc:189) > ==19445== by 0x424BF0: substr (basic_string.h:2227) > ==19445== by 0x424BF0: impala::CpuInfo::Init() (cpu-info.cc:98) > ==19445== by 0x41B91D: main (atod-benchmark.cc:90) > ==19445== If you believe this happened as a result of a stack > ==19445== overflow in your program's main thread (unlikely but > ==19445== possible), you can try to increase the size of the > ==19445== main thread stack using the --main-stacksize= flag. > ==19445== The main thread stack size used in this run was 8388608. > ==19445== > ==19445== HEAP SUMMARY: > ==19445== in use at exit: 0 bytes in 0 blocks > ==19445== total heap usage: 0 allocs, 0 frees, 0 bytes allocated > ==19445== > ==19445== All heap blocks were freed -- no leaks are possible > ==19445== ==19445== For counts of detected and suppressed errors, > rerun with: -v ==19445== ERROR SUMMARY: 1 errors from 1 contexts > (suppressed: 0 from 0) Segmentation fault > > Here are some more information: > 1. Corresponding code line is located in: > Impala/be/src/util/cpu-info.cc:98 name = line.substr(0, colon - 1); > > 2. My environment configuration: > CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz (4 cores) > OS: Linux debian 4.3.0 #2 SMP Tue Nov 24 20:22:57 EST 2015 x86_64 > GNU/Linux > Compiler: gcc version 4.9.2 (Debian 4.9.2-10) > > 3. If we build such benchmarks in debug mode (make_debug.sh), > everything runs perfectly without such "Segment fault" error. > > > Thanks for taking time reading this letter. > Any idea or help is greatly appreciated. > > > >
