Skip to content

TPC-DS q16, q94 sometimes fails with assert UnRef(): requirement Refs_ > 0 failed inside wide_combine (with FinalizeByKey) #6042

@yumkam

Description

@yumkam

TPC DS 1 q16, q94: random assert UnRef(): requirement Refs_ > 0 failed inside wide_combine
With MaxTasksPerStage> 1 dqrun sometimes fails with assert inside wide_combine
Bug is not always reproducible, you may need few runs.
With MaxTasksPersStage=1 I never managed to reproduce it.
wide_combine depends on UseFinalizeByKey, so it is not reproducible without it.

Part of backtrace:

VERIFY failed (2024-06-02T15:32:56.110493+0300): 
  ydb/library/yql/public/udf/udf_type_builder.h:373
  UnRef(): requirement Refs_ > 0 failed
[...]
NPrivate::Panic(NPrivate::TStaticBuf const&, int, char const*, char const*, char const*, ...) at /-S/util/system/yassert.cpp:55:0
std::__y1::__hash_table<NYql::NUdf::TUnboxedValue, (anonymous namespace)::TGenericHash, (anonymous namespace)::TGenericEquals, NYql::NUdf::TStdAllocatorForUdf<NYql::NUdf::TUnboxedValue>>::~__hash_table() at /-S/contrib/libs/cxxsupp/libcxx/include/__hash_table:1355:0
(anonymous namespace)::TSetResource::~TSetResource() at /-S/ydb/library/yql/udfs/common/set/set_udf.cpp:161:0.<char const at offset 0>>::~TBoxedResource() at /-S/ydb/library/yql/public/udf/udf_value.h:1013:0:v180000]() at /-S/contrib/libs/cxxsupp/libcxx/include/unordered_set:716:0
NKikimr::NMiniKQL::TExternalComputationNode::SetValue(NKikimr::NMiniKQL::TComputationContext&, NYql::NUdf::TUnboxedValue&&) const at /-S/ydb/library/yql/minikql/computation/mkql_computation_node_impl.cpp:138:0
NKikimr::NMiniKQL::(anonymous namespace)::TCombinerNodes::FinishItem(NKikimr::NMiniKQL::TComputationContext&, NYql::NUdf::TUnboxedValue*, NYql::NUdf::TUnboxedValue* const*) const at /-B/ydb/library/yql/minikql/comp_nodes/llvm14/mkql_wide_combine.cpp:146:0abi:v180000]<NKikimr::NMiniKQL::IComputationExternalNode* const*, NKikimr::NMiniKQL::(anonymous namespace)::TCombinerNodes::FinishItem(NKikimr::NMiniKQL::TComputationContext&, NYql::NUdf::TUnboxedValue*, NYql::NUdf::TUnboxedValue* const*) const::'lambda...
NKikimr::NMiniKQL::(anonymous namespace)::TSpillingSupportState::DoCalculate(NKikimr::NMiniKQL::TComputationContext&, NYql::NUdf::TUnboxedValue* const*) at /-B/ydb/library/yql/minikql/comp_nodes/llvm14/mkql_wide_combine.cpp:373:0pp:449:0
NKikimr::NMiniKQL::TStatefulWideFlowComputationNode<NKikimr::NMiniKQL::(anonymous namespace)::TWideLastCombinerWrapper, false>::FetchValues(NKikimr::NMiniKQL::TComputationContext&, NYql::NUdf::TUnboxedValue* const*) const at /-S/ydb/library/yql/minikql/computation/mkql_computation_node_impl.h:653:0
[...]

Scripts for peproductions, queries, bindings,...
https://gist.github.com/yumkam/8f54c1d5c9797e2f8b1e097e42ffd3b2

Metadata

Metadata

Assignees

Labels

area/yqlYQL query language issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions