Skip to content

[pg] Segfault on parallel simple pgbench #2507

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

Closed
rekby opened this issue Mar 6, 2024 · 2 comments
Closed

[pg] Segfault on parallel simple pgbench #2507

rekby opened this issue Mar 6, 2024 · 2 comments
Assignees
Labels
area/pg bug Something isn't working

Comments

@rekby
Copy link
Member

rekby commented Mar 6, 2024

  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 rekby added bug Something isn't working area/pg labels Mar 6, 2024
@rekby
Copy link
Member Author

rekby commented Jun 19, 2024

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<char, std::__y1::char_traits<char>, std::__y1::allocator<char>>::__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<char, std::__y1::char_traits<char>, std::__y1::allocator<char>>::__is_long[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /home/rekby/ydbwork/ydb/contrib/libs/cxxsupp/libcxx/include/string:1769
#1  std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char>>::__get_pointer[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /home/rekby/ydbwork/ydb/contrib/libs/cxxsupp/libcxx/include/string:1904
#2  std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char>>::data[abi:v180000]() const (this=0x8fc8a0215cf7fb33) at /home/rekby/ydbwork/ydb/contrib/libs/cxxsupp/libcxx/include/string:1594
#3  TBasicString<char, std::__y1::char_traits<char>>::data() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/string.h:304
#4  TStringBase<TBasicString<char, std::__y1::char_traits<char>>, char, std::__y1::char_traits<char>>::Ptr() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/strbase.h:536
#5  TStringBase<TBasicString<char, std::__y1::char_traits<char>>, char, std::__y1::char_traits<char>>::data() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/strbase.h:128
#6  TStringBase<TBasicString<char, std::__y1::char_traits<char>>, char, std::__y1::char_traits<char>>::operator std::__y1::basic_string_view<char, std::__y1::char_traits<char>><std::__y1::char_traits<char>>() const (this=0x17f3e36d7b88) at /home/rekby/ydbwork/ydb/util/generic/strbase.h:65
#7  std::__y1::basic_string_view<char, std::__y1::char_traits<char>> google::protobuf::internal::TransparentSupport<TBasicString<char, std::__y1::char_traits<char>>>::ImplicitConvert<void>(TBasicString<char, std::__y1::char_traits<char>> const&) (str=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>)
    at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:226
#8  unsigned long google::protobuf::internal::TransparentSupport<TBasicString<char, std::__y1::char_traits<char>>>::hash::operator()<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&) const (str=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>, this=<optimized out>)
    at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:234
#9  unsigned long google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::BucketNumber<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&) const (k=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>, this=<optimized out>)
    at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:1031
#10 std::__y1::pair<google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::iterator_base<google::protobuf::MapPair<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue> const>, unsigned long> google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::FindHelper<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&, std::__y1::__map_iterator<std::__y1::__tree_iterator<std::__y1::__value_type<std::__y1::reference_wrapper<TBasicString<char, std::__y1::char_traits<char>> const>, void*>, std::__y1::__tree_node<std::__y1::__value_type<std::__y1::reference_wrapper<TBasicString<char, std::__y1::char_traits<char>> const>, void*>, void*>*, long>>*) const (this=0x17f3e2a034a0, k=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>, it=0x0) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:778
#11 0x0000000027677467 in std::__y1::pair<google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::iterator_base<google::protobuf::MapPair<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue> const>, unsigned long> google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::FindHelper<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&) const (this=0x17f3e2a034a0, k=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:773
#12 google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::iterator_base<google::protobuf::MapPair<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue> const> google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::InnerMap::find<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&) const (this=0x17f3e2a034a0, k=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:690
#13 google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::const_iterator google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::find<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&) const (this=0x17f3e2a034a0,
    key=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>) at /home/rekby/ydbwork/ydb/contrib/libs/protobuf/src/google/protobuf/map.h:1247
#14 bool google::protobuf::Map<TBasicString<char, std::__y1::char_traits<char>>, Ydb::TypedValue>::contains<TBasicString<char, std::__y1::char_traits<char>>>(TBasicString<char, std::__y1::char_traits<char>> const&) const (this=0x17f3e2a034a0, key=<error reading variable: Cannot access memory at address 0x8fc8a0215cf7fb33>)
    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<NActors::IEventHandle> = {...}) at /home/rekby/ydbwork/ydb/ydb/core/kqp/session_actor/kqp_session_actor.cpp:2228
#19 0x000000001745dc80 in NActors::TGenericExecutorThread::Execute<NActors::TMailboxTable::THTSwapMailbox> (this=this@entry=0x17f3fe601700, mailbox=0x17f3fb541940, hint=hint@entry=4197, isTailExecution=<optimized out>) 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=<optimized out>) 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

@SloNN SloNN assigned shnikd and unassigned qrort Jul 8, 2024
@rekby rekby closed this as completed Jul 10, 2024
@rekby
Copy link
Member Author

rekby commented Jul 10, 2024

can't reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pg bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants