ydb-platform / ydb

YDB is an open source Distributed SQL Database that combines high availability and scalability with strong consistency and ACID transactions
https://ydb.tech
Apache License 2.0
3.69k stars 500 forks source link

[pg] Segfault on parallel simple pgbench #2507

Closed rekby closed 3 minutes ago

rekby commented 4 months ago
  1. Run local ydb https://github.com/ydb-platform/ydb/wiki/Local-run-postgres-tests#start-local-ydb
  2. wget https://gist.githubusercontent.com/rekby/95e0f0c2fd6ff595054c03c2c2ae776a/raw/pgbench.sql -O tmp/pgbench.sql
  3. cat ./tmp/pgbench.sql | psql postgres://root:1234@localhost:5432/local
  4. PGPORT=5432 PGHOST=localhost PGDATABASE=local PGUSER=root PGPASSWORD=1234 pgbench -n -T 10 -b select-only --protocol=simple --client=10

YDB crashes with error:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char>>::__is_long[abi:ue170006]() const (this=0x100000007) at /-S/contrib/libs/cxxsupp/libcxx/include/string:1769

warning: 1769   /-S/contrib/libs/cxxsupp/libcxx/include/string: No such file or directory
rekby commented 2 weeks ago

stacktrace from #5512:

Stacktrace ``` Core was generated by `/home/rekby/ydbwork/ydb/ydb/apps/ydbd/ydbd server --node=1 --log-file-name=/hom'. Program terminated with signal SIGSEGV, Segmentation fault. #0 std::__y1::basic_string, std::__y1::allocator>::__is_long[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /-S/contrib/libs/cxxsupp/libcxx/include/string:1769 warning: 1769 /-S/contrib/libs/cxxsupp/libcxx/include/string: No such file or directory [Current thread is 1 (LWP 71771)] [arc] Arcadia GDB pretty-printers enabled (gdb) bt #0 std::__y1::basic_string, std::__y1::allocator>::__is_long[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /home/rekby/ydbwork/ydb/contrib/libs/cxxsupp/libcxx/include/string:1769 #1 std::__y1::basic_string, std::__y1::allocator>::__get_pointer[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /home/rekby/ydbwork/ydb/contrib/libs/cxxsupp/libcxx/include/string:1904 #2 std::__y1::basic_string, std::__y1::allocator>::data[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /home/rekby/ydbwork/ydb/contrib/libs/cxxsupp/libcxx/include/string:1594 #3 TBasicString>::data() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/string.h:304 #4 TStringBase>, char, std::__y1::char_traits>::Ptr() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/strbase.h:536 #5 TStringBase>, char, std::__y1::char_traits>::data() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/strbase.h:128 #6 TStringBase>, char, std::__y1::char_traits>::operator std::__y1::basic_string_view>>() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/strbase.h:65 #7 std::__y1::basic_string_view> google::protobuf::internal::TransparentSupport>>::ImplicitConvert(TBasicString> const&) (str=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:226 #8 unsigned long google::protobuf::internal::TransparentSupport>>::hash::operator()>>(TBasicString> const&) const (str=, this=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:234 #9 unsigned long google::protobuf::Map>, Ydb::TypedValue>::InnerMap::BucketNumber>>(TBasicString> const&) const (k=, this=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:1031 #10 std::__y1::pair>, Ydb::TypedValue>::InnerMap::iterator_base>, Ydb::TypedValue> const>, unsigned long> google::protobuf::Map>, Ydb::TypedValue>::InnerMap::FindHelper>>(TBasicString> const&, std::__y1::__map_iterator> const>, void*>, std::__y1::__tree_node> const>, void*>, void*>*, long>>*) const (this=0x17f3e2a034a0, k=, it=0x0) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:778 #11 0x0000000027677467 in std::__y1::pair>, Ydb::TypedValue>::InnerMap::iterator_base>, Ydb::TypedValue> const>, unsigned long> google::protobuf::Map>, Ydb::TypedValue>::InnerMap::FindHelper>>(TBasicString> const&) const (this=0x17f3e2a034a0, k=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:773 #12 google::protobuf::Map>, Ydb::TypedValue>::InnerMap::iterator_base>, Ydb::TypedValue> const> google::protobuf::Map>, Ydb::TypedValue>::InnerMap::find>>(TBasicString> const&) const (this=0x17f3e2a034a0, k=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:690 #13 google::protobuf::Map>, Ydb::TypedValue>::const_iterator google::protobuf::Map>, Ydb::TypedValue>::find>>(TBasicString> const&) const (this=0x17f3e2a034a0, key=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:1247 #14 bool google::protobuf::Map>, Ydb::TypedValue>::contains>>(TBasicString> const&) const (this=0x17f3e2a034a0, key=) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:1256 #15 NKikimr::NKqp::(anonymous namespace)::TKqpSessionActor::PrepareQueryContext (this=0x17f3fb52c800) at /home/rekby/ydbwork/ydb/ydb/core/kqp/session_actor/kqp_session_actor.cpp:830 #16 NKikimr::NKqp::(anonymous namespace)::TKqpSessionActor::OnSuccessCompileRequest (this=this@entry=0x17f3fb52c800) at /home/rekby/ydbwork/ydb/ydb/core/kqp/session_actor/kqp_session_actor.cpp:586 #17 0x00000000276628e6 in NKikimr::NKqp::(anonymous namespace)::TKqpSessionActor::Handle (this=0x17f3fb52c800, ev=...) at /home/rekby/ydbwork/ydb/ydb/core/kqp/session_actor/kqp_session_actor.cpp:499 #18 NKikimr::NKqp::(anonymous namespace)::TKqpSessionActor::ExecuteState (this=0x17f3fb52c800, ev=TAutoPtr = {...}) at /home/rekby/ydbwork/ydb/ydb/core/kqp/session_actor/kqp_session_actor.cpp:2228 #19 0x000000001745dc80 in NActors::TGenericExecutorThread::Execute (this=this@entry=0x17f3fe601700, mailbox=0x17f3fb541940, hint=hint@entry=4197, isTailExecution=) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:251 #20 0x0000000017455475 in NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*)::$_0::operator()(unsigned int, bool) const (this=this@entry=0x7fa46859af70, activation=activation@entry=4197, isTailExecution=false) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:439 #21 0x0000000017454e38 in NActors::TGenericExecutorThread::ProcessExecutorPool (this=this@entry=0x17f3fe601700, pool=) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:492 #22 0x0000000017455d4c in NActors::TExecutorThread::ThreadProc (this=0x17f3fe601700) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:523 #23 0x000000001641076c in (anonymous namespace)::TPosixThread::ThreadProxy (arg=0x17f3fe9c9ba0) at /home/rekby/ydbwork/ydb/util/system/thread.cpp:244 #24 0x00007fa46e7e1ac3 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #25 0x00007fa46e873850 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 ```
rekby commented 3 minutes ago

can't reproduce