Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v8.4.4 Segmentation fault #12054

Closed
1522140840 opened this issue Nov 8, 2023 · 3 comments
Closed

v8.4.4 Segmentation fault #12054

1522140840 opened this issue Nov 8, 2023 · 3 comments

Comments

@1522140840
Copy link

1522140840 commented Nov 8, 2023

hi, upgrade my rocksdb from v8.3.3 to v8.4.4,i got this error

option parameter

rocksdb::Options testOptions;
testOptions.create_if_missing = true;
testOptions.create_missing_column_families = true;

evn

gcc 7.2.0

Error stack

#0 0x00007f34330ea4eb in malloc_consolidate () from /lib64/libc.so.6
#1 0x00007f34330ec135 in _int_malloc () from /lib64/libc.so.6
#2 0x00007f34330ed056 in _int_memalign () from /lib64/libc.so.6
#3 0x00007f34330f0075 in memalign () from /lib64/libc.so.6
#4 0x00007f34339df7c8 in operator new (sz=8192, al=64) at ../../../../libstdc++-v3/libsupc++/new_opa.cc:103
#5 0x0000000000d916f3 in rocksdb::BlobFileCache::BlobFileCache(rocksdb::Cache*, rocksdb::ImmutableOptions const*, rocksdb::FileOptions const*, unsigned int, rocksdb::HistogramImpl*, std::shared_ptrrocksdb::IOTracer const&) ()
#6 0x0000000000ca90a4 in rocksdb::ColumnFamilyData::ColumnFamilyData(unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, rocksdb::Version*, rocksdb::Cache*, rocksdb::WriteBufferManager*, rocksdb::ColumnFamilyOptions const&, rocksdb::ImmutableDBOptions const&, rocksdb::FileOptions const*, rocksdb::ColumnFamilySet*, rocksdb::BlockCacheTracer*, std::shared_ptrrocksdb::IOTracer const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()
#7 0x0000000000cad26e in rocksdb::ColumnFamilySet::CreateColumnFamily(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, rocksdb::Version*, rocksdb::ColumnFamilyOptions const&) ()
#8 0x0000000000a6780e in rocksdb::VersionSet::CreateColumnFamily(rocksdb::ColumnFamilyOptions const&, rocksdb::ReadOptions const&, rocksdb::VersionEdit const*) ()
#9 0x0000000000d0da17 in rocksdb::VersionEditHandler::CreateCfAndInit(rocksdb::ColumnFamilyOptions const&, rocksdb::VersionEdit const&) ()
#10 0x0000000000d0e218 in rocksdb::VersionEditHandler::Initialize() ()
#11 0x0000000000d0af57 in rocksdb::VersionEditHandlerBase::Iterate(rocksdb::log::Reader&, rocksdb::Status*) ()
#12 0x0000000000a6c438 in rocksdb::VersionSet::Recover(std::vector<rocksdb::ColumnFamilyDescriptor, std::allocatorrocksdb::ColumnFamilyDescriptor > const&, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) ()
#13 0x000000000098fa65 in rocksdb::DBImpl::Recover(std::vector<rocksdb::ColumnFamilyDescriptor, std::allocatorrocksdb::ColumnFamilyDescriptor > const&, bool, bool, bool, unsigned long
, rocksdb::DBImpl::RecoveryContext*) ()
#14 0x0000000000988a46 in rocksdb::DBImpl::Open(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<rocksdb::ColumnFamilyDescriptor, std::allocatorrocksdb::ColumnFamilyDescriptor > const&, std::vector<rocksdb::ColumnFamilyHandle*, std::allocatorrocksdb::ColumnFamilyHandle* >, rocksdb::DB**, bool, bool) ()
#15 0x000000000098a676 in rocksdb::DB::Open(rocksdb::DBOptions const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<rocksdb::ColumnFamilyDescriptor, std::allocatorrocksdb::ColumnFamilyDescriptor > const&, std::vector<rocksdb::ColumnFamilyHandle
, std::allocatorrocksdb::ColumnFamilyHandle* >*, rocksdb::DB**) ()
#16 0x000000000098a865 in rocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, rocksdb::DB**) ()]

image

@anand1976
Copy link
Contributor

Its probably related to #11439 . @1522140840 Can you provide more details about the error? Was it as assertion failure malloc_consolidate() or a segfault?

Cc @pdillinger

@1522140840
Copy link
Author

Its probably related to #11439 . @1522140840 Can you provide more details about the error? Was it as assertion failure malloc_consolidate() or a segfault?

Cc @pdillinger

I suspect there may be some software incompatibility, but I don't know which one it is;

I ran the simple_example.cc test code directly, and then this error occurred

/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example
*** Error in `/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example': corrupted size vs. prev_size: 0x00000000016b3670 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x80c37)[0x7f1bbf6c9c37]
/lib64/libc.so.6(+0x82135)[0x7f1bbf6cb135]
/lib64/libc.so.6(+0x83056)[0x7f1bbf6cc056]
/lib64/libc.so.6(__libc_memalign+0x75)[0x7f1bbf6cf075]
/lib64/libstdc++.so.6(_ZnwmSt11align_val_t+0x38)[0x7f1bc01da7c8]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb7StripedINS_19CacheAlignedWrapperINS_4port5MutexEEENS_5SliceENS_15SliceNPHasher64EEC1Em+0x57)[0x7f1bc14a5279]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb13BlobFileCacheC1EPNS_5CacheEPKNS_16ImmutableOptionsEPKNS_11FileOptionsEjPNS_13HistogramImplERKSt10shared_ptrINS_8IOTracerEE+0x48)[0x7f1bc14a4aec]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb16ColumnFamilyDataC1EjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_7VersionEPNS_5CacheEPNS_18WriteBufferManagerERKNS_19ColumnFamilyOptionsERKNS_18ImmutableDBOptionsEPKNS_11FileOptionsEPNS_15ColumnFamilySetEPNS_16BlockCacheTracerERKSt10shared_ptrINS_8IOTracerEES8_S8_+0x68f)[0x7f1bc15002a5]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb15ColumnFamilySet18CreateColumnFamilyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjPNS_7VersionERKNS_19ColumnFamilyOptionsE+0x158)[0x7f1bc150541e]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb10VersionSet18CreateColumnFamilyERKNS_19ColumnFamilyOptionsERKNS_11ReadOptionsEPKNS_11VersionEditE+0x145)[0x7f1bc17ce747]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb18VersionEditHandler15CreateCfAndInitERKNS_19ColumnFamilyOptionsERKNS_11VersionEditE+0x3d)[0x7f1bc179e21f]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb18VersionEditHandler10InitializeEv+0x1f3)[0x7f1bc179c497]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb22VersionEditHandlerBase7IterateERNS_3log6ReaderEPNS_6StatusE+0xd0)[0x7f1bc179b2d0]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb10VersionSet7RecoverERKSt6vectorINS_22ColumnFamilyDescriptorESaIS2_EEbPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x427)[0x7f1bc17c7783]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb6DBImpl7RecoverERKSt6vectorINS_22ColumnFamilyDescriptorESaIS2_EEbbbPmPNS0_15RecoveryContextE+0xe1b)[0x7f1bc167707d]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb6DBImpl4OpenERKNS_9DBOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorINS_22ColumnFamilyDescriptorESaISD_EEPSC_IPNS_18ColumnFamilyHandleESaISJ_EEPPNS_2DBEbb+0x736)[0x7f1bc167f872]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb2DB4OpenERKNS_9DBOptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorINS_22ColumnFamilyDescriptorESaISD_EEPSC_IPNS_18ColumnFamilyHandleESaISJ_EEPPS0_+0x72)[0x7f1bc167e518]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8(_ZN7rocksdb2DB4OpenERKNS_7OptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPPS0_+0x14b)[0x7f1bc167e2c3]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example[0x408b44]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f1bbf66b555]
/home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example[0x408979]
======= Memory map: ========
00400000-0040f000 r-xp 00000000 08:00 2269555619                         /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example
0060e000-0060f000 r--p 0000e000 08:00 2269555619                         /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example
0060f000-00610000 rw-p 0000f000 08:00 2269555619                         /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/examples/simple_example
01624000-016d4000 rw-p 00000000 00:00 0                                  [heap]
7f1b5c000000-7f1b5c021000 rw-p 00000000 00:00 0 
7f1b5c021000-7f1b60000000 ---p 00000000 00:00 0 
7f1b60000000-7f1b60021000 rw-p 00000000 00:00 0 
7f1b60021000-7f1b64000000 ---p 00000000 00:00 0 
7f1b64000000-7f1b64021000 rw-p 00000000 00:00 0 
7f1b64021000-7f1b68000000 ---p 00000000 00:00 0 
7f1b68000000-7f1b68021000 rw-p 00000000 00:00 0 
7f1b68021000-7f1b6c000000 ---p 00000000 00:00 0 
7f1b6c000000-7f1b6c021000 rw-p 00000000 00:00 0 
7f1b6c021000-7f1b70000000 ---p 00000000 00:00 0 
7f1b70000000-7f1b70021000 rw-p 00000000 00:00 0 
7f1b70021000-7f1b74000000 ---p 00000000 00:00 0 
7f1b74000000-7f1b74021000 rw-p 00000000 00:00 0 
7f1b74021000-7f1b78000000 ---p 00000000 00:00 0 
7f1b7b7ff000-7f1b7b800000 ---p 00000000 00:00 0 
7f1b7b800000-7f1b7c000000 rw-p 00000000 00:00 0 
7f1b7c000000-7f1b7c021000 rw-p 00000000 00:00 0 
7f1b7c021000-7f1b80000000 ---p 00000000 00:00 0 
7f1b80ffa000-7f1b80ffb000 ---p 00000000 00:00 0 
7f1b80ffb000-7f1b817fb000 rw-p 00000000 00:00 0 
7f1b817fb000-7f1b817fc000 ---p 00000000 00:00 0 
7f1b817fc000-7f1b81ffc000 rw-p 00000000 00:00 0 
7f1b81ffc000-7f1b81ffd000 ---p 00000000 00:00 0 
7f1b81ffd000-7f1b827fd000 rw-p 00000000 00:00 0 
7f1b827fd000-7f1b827fe000 ---p 00000000 00:00 0 
7f1b827fe000-7f1b82ffe000 rw-p 00000000 00:00 0 
7f1b82ffe000-7f1b82fff000 ---p 00000000 00:00 0 
7f1b82fff000-7f1b837ff000 rw-p 00000000 00:00 0 
7f1b837ff000-7f1b83800000 ---p 00000000 00:00 0 
7f1b83800000-7f1b84000000 rw-p 00000000 00:00 0 
7f1b84000000-7f1b84021000 rw-p 00000000 00:00 0 
7f1b84021000-7f1b88000000 ---p 00000000 00:00 0 
7f1b88000000-7f1b88021000 rw-p 00000000 00:00 0 
7f1b88021000-7f1b8c000000 ---p 00000000 00:00 0 
7f1b8c000000-7f1b8c021000 rw-p 00000000 00:00 0 
7f1b8c021000-7f1b90000000 ---p 00000000 00:00 0 
7f1b90000000-7f1b90021000 rw-p 00000000 00:00 0 
7f1b90021000-7f1b94000000 ---p 00000000 00:00 0 
7f1b94000000-7f1b94021000 rw-p 00000000 00:00 0 
7f1b94021000-7f1b98000000 ---p 00000000 00:00 0 
7f1b98000000-7f1b98021000 rw-p 00000000 00:00 0 
7f1b98021000-7f1b9c000000 ---p 00000000 00:00 0 
7f1b9c000000-7f1b9c021000 rw-p 00000000 00:00 0 
7f1b9c021000-7f1ba0000000 ---p 00000000 00:00 0 
7f1ba0000000-7f1ba0021000 rw-p 00000000 00:00 0 
7f1ba0021000-7f1ba4000000 ---p 00000000 00:00 0 
7f1ba47f9000-7f1ba47fa000 ---p 00000000 00:00 0 
7f1ba47fa000-7f1ba4ffa000 rw-p 00000000 00:00 0 
7f1ba4ffa000-7f1ba4ffb000 ---p 00000000 00:00 0 
7f1ba4ffb000-7f1ba57fb000 rw-p 00000000 00:00 0 
7f1ba57fb000-7f1ba57fc000 ---p 00000000 00:00 0 
7f1ba57fc000-7f1ba5ffc000 rw-p 00000000 00:00 0 
7f1ba5ffc000-7f1ba5ffd000 ---p 00000000 00:00 0 
7f1ba5ffd000-7f1ba67fd000 rw-p 00000000 00:00 0 
7f1ba67fd000-7f1ba67fe000 ---p 00000000 00:00 0 
7f1ba67fe000-7f1ba6ffe000 rw-p 00000000 00:00 0 
7f1ba6ffe000-7f1ba6fff000 ---p 00000000 00:00 0 
7f1ba6fff000-7f1ba77ff000 rw-p 00000000 00:00 0 
7f1ba77ff000-7f1ba7800000 ---p 00000000 00:00 0 
7f1ba7800000-7f1ba8000000 rw-p 00000000 00:00 0 
7f1ba8000000-7f1ba8021000 rw-p 00000000 00:00 0 
7f1ba8021000-7f1bac000000 ---p 00000000 00:00 0 
7f1bac000000-7f1bac021000 rw-p 00000000 00:00 0 
7f1bac021000-7f1bb0000000 ---p 00000000 00:00 0 
7f1bb0000000-7f1bb0021000 rw-p 00000000 00:00 0 
7f1bb0021000-7f1bb4000000 ---p 00000000 00:00 0 
7f1bb4000000-7f1bb4021000 rw-p 00000000 00:00 0 
7f1bb4021000-7f1bb8000000 ---p 00000000 00:00 0 
7f1bb8000000-7f1bb8021000 rw-p 00000000 00:00 0 
7f1bb8021000-7f1bbc000000 ---p 00000000 00:00 0 
7f1bbc41f000-7f1bbc420000 ---p 00000000 00:00 0 
7f1bbc420000-7f1bbcc20000 rw-p 00000000 00:00 0 
7f1bbcc20000-7f1bbcc21000 ---p 00000000 00:00 0 
7f1bbcc21000-7f1bbd421000 rw-p 00000000 00:00 0 
7f1bbd421000-7f1bbd422000 ---p 00000000 00:00 0 
7f1bbd422000-7f1bbdc22000 rw-p 00000000 00:00 0 
7f1bbdc22000-7f1bbdc23000 ---p 00000000 00:00 0 
7f1bbdc23000-7f1bbe423000 rw-p 00000000 00:00 0 
7f1bbe423000-7f1bbe424000 ---p 00000000 00:00 0 
7f1bbe424000-7f1bbec24000 rw-p 00000000 00:00 0 
7f1bbec24000-7f1bbec25000 ---p 00000000 00:00 0 
7f1bbec25000-7f1bbf425000 rw-p 00000000 00:00 0 
7f1bbf425000-7f1bbf448000 r-xp 00000000 08:00 7593911382                 /usr/local/lib/libgflags.so.2.2.2
7f1bbf448000-7f1bbf647000 ---p 00023000 08:00 7593911382                 /usr/local/lib/libgflags.so.2.2.2
7f1bbf647000-7f1bbf648000 r--p 00022000 08:00 7593911382                 /usr/local/lib/libgflags.so.2.2.2
7f1bbf648000-7f1bbf649000 rw-p 00023000 08:00 7593911382                 /usr/local/lib/libgflags.so.2.2.2
7f1bbf649000-7f1bbf80d000 r-xp 00000000 08:00 6509544363                 /usr/lib64/libc-2.17.so
7f1bbf80d000-7f1bbfa0c000 ---p 001c4000 08:00 6509544363                 /usr/lib64/libc-2.17.so
7f1bbfa0c000-7f1bbfa10000 r--p 001c3000 08:00 6509544363                 /usr/lib64/libc-2.17.so
7f1bbfa10000-7f1bbfa12000 rw-p 001c7000 08:00 6509544363                 /usr/lib64/libc-2.17.so
7f1bbfa12000-7f1bbfa17000 rw-p 00000000 00:00 0 
7f1bbfa17000-7f1bbfa2e000 r-xp 00000000 08:00 6509546971                 /usr/lib64/libpthread-2.17.so
7f1bbfa2e000-7f1bbfc2d000 ---p 00017000 08:00 6509546971                 /usr/lib64/libpthread-2.17.so
7f1bbfc2d000-7f1bbfc2e000 r--p 00016000 08:00 6509546971                 /usr/lib64/libpthread-2.17.so
7f1bbfc2e000-7f1bbfc2f000 rw-p 00017000 08:00 6509546971                 /usr/lib64/libpthread-2.17.so
7f1bbfc2f000-7f1bbfc33000 rw-p 00000000 00:00 0 
7f1bbfc33000-7f1bbfc48000 r-xp 00000000 08:00 6509544390                 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f1bbfc48000-7f1bbfe47000 ---p 00015000 08:00 6509544390                 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f1bbfe47000-7f1bbfe48000 r--p 00014000 08:00 6509544390                 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f1bbfe48000-7f1bbfe49000 rw-p 00015000 08:00 6509544390                 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f1bbfe49000-7f1bbff4a000 r-xp 00000000 08:00 6509544395                 /usr/lib64/libm-2.17.so
7f1bbff4a000-7f1bc0149000 ---p 00101000 08:00 6509544395                 /usr/lib64/libm-2.17.so
7f1bc0149000-7f1bc014a000 r--p 00100000 08:00 6509544395                 /usr/lib64/libm-2.17.so
7f1bc014a000-7f1bc014b000 rw-p 00101000 08:00 6509544395                 /usr/lib64/libm-2.17.so
7f1bc014b000-7f1bc02bd000 r-xp 00000000 08:00 2247549854                 /usr/lib64/libstdc++.so.6.0.24
7f1bc02bd000-7f1bc04bc000 ---p 00172000 08:00 2247549854                 /usr/lib64/libstdc++.so.6.0.24
7f1bc04bc000-7f1bc04c6000 r--p 00171000 08:00 2247549854                 /usr/lib64/libstdc++.so.6.0.24
7f1bc04c6000-7f1bc04c8000 rw-p 0017b000 08:00 2247549854                 /usr/lib64/libstdc++.so.6.0.24
7f1bc04c8000-7f1bc04cc000 rw-p 00000000 00:00 0 
7f1bc04cc000-7f1bc220b000 r-xp 00000000 08:00 6021140477                 /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8.6.7
7f1bc220b000-7f1bc240b000 ---p 01d3f000 08:00 6021140477                 /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8.6.7
7f1bc240b000-7f1bc2435000 r--p 01d3f000 08:00 6021140477                 /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8.6.7
7f1bc2435000-7f1bc24bf000 rw-p 01d69000 08:00 6021140477                 /home/work/rocksdb-8.6.7/cmake-build-debug-tcloud/librocksdb.so.8.6.7
7f1bc24bf000-7f1bc24cd000 rw-p 00000000 00:00 0 
7f1bc24cd000-7f1bc24ef000 r-xp 00000000 08:00 6509544352                 /usr/lib64/ld-2.17.so
7f1bc26db000-7f1bc26e5000 rw-p 00000000 00:00 0 
7f1bc26ec000-7f1bc26ee000 rw-p 00000000 00:00 0 
7f1bc26ee000-7f1bc26ef000 r--p 00021000 08:00 6509544352                 /usr/lib64/ld-2.17.so
7f1bc26ef000-7f1bc26f0000 rw-p 00022000 08:00 6509544352                 /usr/lib64/ld-2.17.so
7f1bc26f0000-7f1bc26f1000 rw-p 00000000 00:00 0 
7ffd10636000-7ffd10657000 rw-p 00000000 00:00 0                          [stack]
7ffd10704000-7ffd10708000 r--p 00000000 00:00 0                          [vvar]
7ffd10708000-7ffd1070a000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

image

ENV [Dockerfile]

FROM centos:7.3.1611
#FROM harbor.weizhipin.com/tcloud/mbase:v1.0.22
MAINTAINER Apache Thrift <[email protected]>

RUN yum install -y epel-release


# General dependencies
RUN yum install -y \
      autoconf \
      bison \
      bison-devel \
      clang \
      clang-analyzer \
      cmake3 \
      curl \
      flex \
      which \
      gcc \
      gcc-c++ \
      git \
      libtool \
      m4 \
      make \
      tar \
      protobuf-compiler \
      unzip \
      valgrind \
      bazel4 \
      wget \
      texinfo \
      net-tools && \
      ln -s /usr/bin/cmake3 /usr/bin/cmake && \
      ln -s /usr/bin/cpack3 /usr/bin/cpack && \
      ln -s /usr/bin/ctest3 /usr/bin/ctest

# C++ dependencies
RUN yum install -y \
      gflags \
      lz4-devel \
      snappy snappy-devel \
      log4cplus-devel \
      rapidjson-devel \
      protobuf-devel \
      boost-devel-static \
      zlib zlib-devel \
      bzip2 bzip2-devel \
      openssl-devel \
      libevent-devel && \
    cd /usr/lib64 && \
    ln -s libboost_thread-mt.a libboost_thread.a


RUN cd /home && wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.gz && \
    tar -xvzf gcc-7.2.0.tar.gz && \
    cd gcc-7.2.0 && \
    ./contrib/download_prerequisites && \
    mkdir  gcc-build && \
    cd gcc-build && \
    ../configure --prefix=/usr/local/gcc-7.2.0 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ && \
    make -j 16 && \
    make install && \
    echo "export PATH=/usr/local/gcc-7.2.0/bin\${PATH:+:\${PATH}}" >> /etc/profile && \
    echo "export MANPATH=/usr/local/gcc-7.2.0/share/man:\${MANPATH}" >> /etc/profile && \
    echo "export INFOPATH=/usr/local/gcc-7.2.0/share/info:\${INFOPATH}" >> /etc/profile && \
    echo "export LD_LIBRARY_PATH=/usr/local/gcc-7.2.0/libexec/gcc/x86_64-pc-linux-gnu/7.2.0:/usr/local/gcc-7.2.0/lib64:/usr/local/gcc-7.2.0/lib/gcc/x86_64-pc-linux-gnu/7.2.0/plugin\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}" >> /etc/profile && \
    . /etc/profile && \
    rm -rf /usr/bin/gcc /usr/bin/c++ /usr/bin/cpp /usr/bin/g++ && \
    ln -snf /usr/local/gcc-7.2.0/bin/gcc /usr/bin/gcc && \
    ln -snf /usr/local/gcc-7.2.0/bin/g++ /usr/bin/g++ && \
    ln -snf /usr/local/gcc-7.2.0/bin/c++ /usr/bin/c++ && \
    ln -snf /usr/local/gcc-7.2.0/bin/cpp /usr/bin/cpp && \
    cd /usr/lib64/ && rm /usr/lib64/libstdc++.so.6 && cp /usr/local/gcc-7.2.0/lib64/libstdc++.so.6.0.24 ./ && ln -s libstdc++.so.6.0.24 libstdc++.so.6




RUN cd /etc/yum.repos.d/ && wget --no-check-certificate  https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo
RUN yum -y install bazel4
#RUN wget --no-check-certificate https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
#RUN tar -xzvf automake-1.15.tar.gz && cd automake-1.15 && ./configure  --prefix=/opt/aclocal-1.15 && make -j2 && mkdir -p /opt && make install && export PATH=/opt/aclocal-1.15/bin:$PATH


RUN yum install passwd openssl openssh-server vim -y
RUN ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ''
RUN ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''
RUN sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config
RUN sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config
RUN mkdir -p /root/.ssh





# Clean up
RUN rm -rf /tmp/* && yum clean all
WORKDIR /home/work


RUN wget --no-check-certificate https://mirrors.ustc.edu.cn/gnu/gdb/gdb-8.3.tar.gz \
    && tar -zxvf gdb-8.3.tar.gz \
    && cd gdb-8.3 \
    && ./configure \
    && make -j 4 && make install \
    && rm -rf /home/work/gdb-8.3 \
    && rm -rf /home/work/gdb-8.3.tar.gz



RUN wget http://file-download.kanzhun.tech/gflags-2.2.2.tar.gz && \
    tar -zxvf gflags-2.2.2.tar.gz && \
    cd gflags-2.2.2 && \
    cmake ./CMakeLists.txt -DBUILD_SHARED_LIBS=ON && make && make install && \
    rm -rf /home/work/gflags-2.2.2 && rm -rf /home/work/gflags-2.2.2.tar.gz




CMD ["/usr/sbin/sshd", "-D"]


@pdillinger
Copy link
Contributor

I don't see where and how you're building rocksdb. This looks like the kind of error you would get when you mix build modes (e.g. debug vs. non-debug) or fail to make clean, etc. There's nothing unsafe in the code in question (constructing a Striped<CacheAlignedWrapper<port::Mutex>> but port::Mutex is defined differently between debug and release builds.

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

No branches or pull requests

3 participants