Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang++ version 4.0.1-6 on Ubuntu 17.10 segmentation fault when trying to build rethinkdb-2.3.6 #36007

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR37034
Status NEW
Importance P enhancement
Reported by Erik Nordstrøm (erik@nordstroem.no)
Reported on 2018-04-06 08:37:55 -0700
Last modified on 2018-04-07 09:25:03 -0700
Version 4.0
Hardware PC Linux
CC dgregor@apple.com, dimitry@andric.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments geo_traversal-675e20.sh (5258 bytes, application/x-sh)
Blocks
Blocked by
See also
See also: https://github.com/rethinkdb/rethinkdb/issues/6536#issuecomment-
379279687

    [9/426] CC build/release_clang/obj/rdb_protocol/geo_traversal.o
In file included from src/rdb_protocol/geo_traversal.cc:2:
In file included from ./src/rdb_protocol/geo_traversal.hpp:14:
In file included from ./src/btree/reql_specific.hpp:5:
In file included from ./src/btree/operations.hpp:17:
In file included from ./src/perfmon/perfmon.hpp:20:
In file included from ./src/perfmon/core.hpp:14:
In file included from ./src/rdb_protocol/datum.hpp:26:
In file included from ./src/rdb_protocol/error.hpp:12:
./build/proto/rdb_protocol/ql2.pb.h:2292:6: warning:
'PROTOBUF_INLINE_NOT_IN_HEADERS' is not defined, evaluates to 0 [-Wundef]
#if !PROTOBUF_INLINE_NOT_IN_HEADERS
     ^
In file included from src/rdb_protocol/geo_traversal.cc:9:
In file included from ./src/rdb_protocol/env.hpp:21:
./src/rdb_protocol/datum_stream.hpp:839:16: warning: moving a local object in a
return statement prevents copy elision [-Wpessimizing-move]
        return std::move(rget_items);
               ^
./src/rdb_protocol/datum_stream.hpp:839:16: note: remove std::move call here
        return std::move(rget_items);
               ^~~~~~~~~~          ~
#0 0x00007f35a715d3c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/llvm-4.0/bin/../lib/libLLVM-4.0.so.1+0x6d43c8)
#1 0x00007f35a715b586 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-
4.0/bin/../lib/libLLVM-4.0.so.1+0x6d2586)
#2 0x00007f35a715b6bb (/usr/lib/llvm-4.0/bin/../lib/libLLVM-4.0.so.1+0x6d26bb)
#3 0x00007f35a9a2a150 __restore_rt (/lib/x86_64-linux-
gnu/libpthread.so.0+0x13150)
#4 0x00007f35a7e91ec4
llvm::ScopedNoAliasAAResult::mayAliasInScopes(llvm::MDNode const*, llvm::MDNode
const*) const (/usr/lib/llvm-4.0/bin/../lib/libLLVM-4.0.so.1+0x1408ec4)
#5 0x000055e01737b880
Stack dump:
0.  Program arguments: /usr/lib/llvm-4.0/bin/clang -cc1 -triple x86_64-pc-linux-
gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-
file-name geo_traversal.cc -mrelocation-model static -mthread-model posix -
relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -munwind-
tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-
column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -
coverage-notes-file /home/user/rethinkdb-2.3.6-
clang++/build/release_clang/obj/rdb_protocol/geo_traversal.gcno -resource-dir
/usr/lib/llvm-4.0/bin/../lib/clang/4.0.1 -dependency-file
./build/release_clang/dep/rdb_protocol/geo_traversal.d -sys-header-deps -MP -MT
build/release_clang/obj/rdb_protocol/geo_traversal.o -isystem
./build/external/re2_20140111/include -isystem ./build/external/v8_3.30.33.16-
patched2/include -isystem ./build/external/gtest_1.7.0/include -I ./src -D
PRODUCT_NAME="RethinkDB" -D __STDC_LIMIT_MACROS -D __STDC_FORMAT_MACROS -D
RAPIDJSON_HAS_STDSTRING -D
RAPIDJSON_PARSE_DEFAULT_FLAGS=kParseFullPrecisionFlag -D _FILE_OFFSET_BITS=64 -
D NDEBUG -D HAS_TERMCAP -I ./build/proto -D RETHINKDB_VERSION="2.3.6" -D
RETHINKDB_CODE_VERSION="2.3.6" -internal-isystem /usr/bin/../lib/gcc/x86_64-
linux-gnu/7.2.0/../../../../include/c++/7.2.0 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-
gnu/c++/7.2.0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-
gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0 -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-
gnu/7.2.0/../../../../include/c++/7.2.0/backward -internal-isystem
/usr/include/clang/4.0.1/include/ -internal-isystem /usr/local/include -
internal-isystem /usr/lib/llvm-4.0/bin/../lib/clang/4.0.1/include -internal-
externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O3 -Wall -Wextra -Wnon-virtual-
dtor -Wno-deprecated-declarations -Wformat=2 -Wswitch-enum -Wused-but-marked-
unused -Wundef -Wvla -Wshadow -Wconditional-uninitialized -Wmissing-noreturn -
std=gnu++0x -fdeprecated-macro -fdebug-compilation-dir /home/user/rethinkdb-
2.3.6-clang++ -ferror-limit 19 -fmessage-length 140 -pthread -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -
vectorize-loops -vectorize-slp -o
build/release_clang/obj/rdb_protocol/geo_traversal.o -x c++
src/rdb_protocol/geo_traversal.cc
1.  <eof> parser at end of file
2.  Per-module optimization passes
3.  Running pass 'CallGraph Pass Manager' on module
'src/rdb_protocol/geo_traversal.cc'.
4.  Running pass 'Combine redundant instructions' on function
'@_ZNSt8_Rb_treeIN2ql7datum_tESt4pairIKS1_NS0_11optimizer_tEESt10_Select1stIS5_E21optional_datum_less_tSaIS5_EEC2ERKSA_'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.1-6 (tags/RELEASE_401/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/geo_traversal-675e20.cpp
clang: note: diagnostic msg: /tmp/geo_traversal-675e20.sh
clang: note: diagnostic msg:

********************
src/build.mk:390: recipe for target
'build/release_clang/obj/rdb_protocol/geo_traversal.o' failed
make[1]: *** [build/release_clang/obj/rdb_protocol/geo_traversal.o] Error 254
Makefile:52: recipe for target 'make' failed
make: *** [make] Error 2
Quuxplusone commented 6 years ago

Preprocessed source was too big to attach so I've uploaded it to https://gist.github.com/725b70a3ec651763588481e6c4de2b23

Quuxplusone commented 6 years ago

Attached geo_traversal-675e20.sh (5258 bytes, application/x-sh): associated run script

Quuxplusone commented 6 years ago

I can't reproduce this crash with any version of clang that I have, including 4.0.1 and quite a number of trunk revisions around the 4.0.0 release. This looks like an Ubuntu specific issue, maybe?

Quuxplusone commented 6 years ago
(In reply to Dimitry Andric from comment #3)
> I can't reproduce this crash with any version of clang that I have,
> including 4.0.1 and quite a number of trunk revisions around the 4.0.0
> release.  This looks like an Ubuntu specific issue, maybe?

In fact, I just installed a fresh Ubuntu 17.10.1 VM, with the following clang
package:

Package: clang
Status: install ok installed
Priority: optional
Section: universe/devel
Installed-Size: 33
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Source: llvm-defaults (0.37~exp3ubuntu1)
Version: 1:4.0-37~exp3ubuntu1
Replaces: clang (<< 3.2-1~exp2), clang-3.2, clang-3.3, clang-3.4 (<< 1:3.4.2-
7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1)
Depends: clang-4.0 (>= 4.0~)
Breaks: clang-3.2, clang-3.3, clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<<
1:3.5~+rc1-3~exp1)
Description: C, C++ and Objective-C compiler (LLVM based)
 Clang project is a C, C++, Objective C and Objective C++ front-end
 for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
 Collection (GCC).
 .
 Clang implements all of the ISO C++ 1998 and 2001 standards and also provides
 a partial support of C++1y.
 .
 This is a dependency package providing the default clang compiler.
Original-Maintainer: LLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>

This compiles your test case without any complaints or errors, and it even runs
perfectly under valgrind.  Maybe there is a problem with your particular system?