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

[pg] Segfault at select current_database() #1738

Open
Tracked by #1737
rekby opened this issue Feb 8, 2024 · 1 comment
Open
Tracked by #1737

[pg] Segfault at select current_database() #1738

rekby opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
area/pg bug Something isn't working

Comments

@rekby
Copy link
Member

rekby commented Feb 8, 2024

Segfault at SELECT current_database();

Reproduce:

  1. Run local_ydb with postgres experiment enabled https://github.com/ydb-platform/ydb/wiki/Local-run-postgres-tests
  2. Connect to YDB with psql: psql postgres://root:1234@localhost:5432/local
  3. echo 'SELECT current_database()' | psql postgres://root:1234@localhost:5432/local
Stacktrace

#0  0x00007f81707905ca in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000564691d2 in namestrcpy (name=0x7f8153290170, str=0x0)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/name.c:236
#2  0x0000000056460628 in current_database (fcinfo=0x7f8153290130)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/misc.c:179
#3  0x0000000055d52652 in NYql::TPgResolvedCall<false>::DoCall (this=0x477fffbd7580, callInfo=...)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/parser/pg_wrapper/comp_factory.cpp:1000
#4  0x0000000055d52282 in NYql::TPgResolvedCall<false>::DoCalculate (this=0x477fffbd7580, compCtx=...)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/parser/pg_wrapper/comp_factory.cpp:990
#5  0x0000000055d516d4 in NKikimr::NMiniKQL::TMutableComputationNode<NYql::TPgResolvedCall<false>>::GetValue(NKikimr::NMiniKQL::TComputationContext&) const (
    this=0x477fffbd7580, compCtx=...) at /home/rekby/ydbwork/ydb/ydb/library/yql/minikql/computation/mkql_computation_node_impl.h:217
#6  0x0000000042a4603b in NKikimr::NMiniKQL::TArrayNode::DoCalculate (this=0x477ff12b23d0, ctx=...)
    at /-B/ydb/library/yql/minikql/computation/llvm14/mkql_computation_node_holders_codegen.cpp:244
#7  0x0000000042a45164 in NKikimr::NMiniKQL::TMutableComputationNode<NKikimr::NMiniKQL::TArrayNode>::GetValue (this=0x477ff12b23d0, compCtx=...)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/minikql/computation/mkql_computation_node_impl.h:214
#8  0x0000000042a4603b in NKikimr::NMiniKQL::TArrayNode::DoCalculate (this=0x477ff12b2460, ctx=...)
    at /-B/ydb/library/yql/minikql/computation/llvm14/mkql_computation_node_holders_codegen.cpp:244
#9  0x0000000042a45164 in NKikimr::NMiniKQL::TMutableComputationNode<NKikimr::NMiniKQL::TArrayNode>::GetValue (this=0x477ff12b2460, compCtx=...)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/minikql/computation/mkql_computation_node_impl.h:214
#10 0x000000004b9261f0 in NKikimr::NMiniKQL::(anonymous namespace)::TIteratorWrapper::DoCalculate (this=0x477ff12b24f0, ctx=...)
    at /-B/ydb/library/yql/minikql/comp_nodes/llvm14/mkql_iterator.cpp:21
#11 0x000000004b925564 in NKikimr::NMiniKQL::TMutableComputationNode<NKikimr::NMiniKQL::(anonymous namespace)::TIteratorWrapper>::GetValue (this=0x477ff12b24f0,
    compCtx=...) at /home/rekby/ydbwork/ydb/ydb/library/yql/minikql/computation/mkql_computation_node_impl.h:214
#12 0x0000000042eeddcf in NKikimr::NMiniKQL::(anonymous namespace)::TComputationGraph::GetValue (this=0x477fffa3b620)
    at /-B/ydb/library/yql/minikql/computation/llvm14/mkql_computation_node_graph.cpp:623
#13 0x000000004de363bf in NYql::NDq::TDqTaskRunner::Run (this=0x477fff80b700) at /home/rekby/ydbwork/ydb/ydb/library/yql/dq/runtime/dq_tasks_runner.cpp:703
#14 0x000000005289626f in NYql::NDq::TDqSyncComputeActorBase<NKikimr::NKqp::TKqpComputeActor>::DoExecuteImpl (this=0x477ff0781e00)
    at /home/rekby/ydbwork/ydb/ydb/library/yql/dq/actors/compute/dq_sync_compute_actor_base.h:52
#15 0x0000000052895a0e in NYql::NDq::TDqComputeActorBase<NKikimr::NKqp::TKqpComputeActor, NYql::NDq::TComputeActorAsyncInputHelperForTaskRunner>::DoExecute (
    this=0x477ff0781e00) at /home/rekby/ydbwork/ydb/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h:297
#16 0x00000000528b2651 in NYql::NDq::TDqComputeActorBase<NKikimr::NKqp::TKqpComputeActor, NYql::NDq::TComputeActorAsyncInputHelperForTaskRunner>::HandleExecuteBase (
    this=0x477ff0781e00, ev=Python Exception <class 'gdb.error'>: There is no member named T_.
) at /home/rekby/ydbwork/ydb/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h:1094
#17 0x0000000052894b1c in NYql::NDq::TDqComputeActorBase<NKikimr::NKqp::TKqpComputeActor, NYql::NDq::TComputeActorAsyncInputHelperForTaskRunner>::BaseStateFuncBody (
    this=0x477ff0781e00, ev=TAutoPtr<NActors::IEventHandle> = {...}) at /home/rekby/ydbwork/ydb/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h:246
#18 0x000000005289364f in NKikimr::NKqp::TKqpComputeActor::StateFunc (this=0x477ff0781e00, ev=TAutoPtr<NActors::IEventHandle> = {...})
    at /home/rekby/ydbwork/ydb/ydb/core/kqp/compute_actor/kqp_pure_compute_actor.cpp:131
#19 0x000000003ccb286e in NActors::TActorCallbackBehaviour::Receive (this=0x477ff0781e30, actor=0x477ff0781e00, ev=TAutoPtr<NActors::IEventHandle> = {...})
    at /home/rekby/ydbwork/ydb/ydb/library/actors/core/actor.cpp:232
#20 0x000000003cd20ec3 in NActors::IActor::Receive (this=0x477ff0781e00, ev=TAutoPtr<NActors::IEventHandle> = {...})
    at /home/rekby/ydbwork/ydb/ydb/library/actors/core/actor.h:526
#21 0x000000003cd185be in NActors::TGenericExecutorThread::Execute<NActors::TMailboxTable::THTSwapMailbox> (this=0x477ffcf80b00, mailbox=0x477ffb941600, hint=4184,
    isTailExecution=false) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:244
#22 0x000000003cd0c56d in NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*)::$_0::operator()(unsigned int, bool) const (
    this=0x7f816a42ddc8, activation=4184, isTailExecution=false) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:425
#23 0x000000003cd0bf45 in NActors::TGenericExecutorThread::ProcessExecutorPool (this=0x477ffcf80b00, pool=0x477ffeec8100)
    at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:478
#24 0x000000003cd0ce2e in NActors::TExecutorThread::ThreadProc (this=0x477ffcf80b00) at /home/rekby/ydbwork/ydb/ydb/library/actors/core/executor_thread.cpp:504
#25 0x0000000039dd45b6 in (anonymous namespace)::ThreadProcWrapper<ISimpleThread> (param=0x477ffcf80b00) at /home/rekby/ydbwork/ydb/util/system/thread.cpp:383
#26 0x0000000039dda24d in (anonymous namespace)::TPosixThread::ThreadProxy (arg=0x477fff5894e0) at /home/rekby/ydbwork/ydb/util/system/thread.cpp:244
#27 0x00007f8170671ac3 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#28 0x00007f8170703850 in ?? () from /lib/x86_64-linux-gnu/libc.so.6

@rekby rekby added area/pg bug Something isn't working labels Feb 8, 2024
@MrLolthe1st MrLolthe1st assigned MrLolthe1st and unassigned vitstn Feb 9, 2024
@vitstn vitstn assigned vitstn and unassigned MrLolthe1st Feb 12, 2024
@vitstn
Copy link
Collaborator

vitstn commented Feb 12, 2024

#1817

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