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

Data race в ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h #13503

Open
iddqdex opened this issue Jan 17, 2025 · 0 comments
Assignees
Labels

Comments

@iddqdex
Copy link
Collaborator

iddqdex commented Jan 17, 2025

Выявлено thread санитайзером при прогоне, тест ydb/tests/sql/test_crud.py.TestYdbCrudOperations.test_crud_operations

E   WARNING: ThreadSanitizer: data race (pid=57462)
E   Write of size 8 at 0x7218002ce728 by thread T47:
E   #0 operator=<NMonotonic::TMonotonic, void> /-S/contrib/libs/cxxsupp/libcxx/include/optional (ydbd+0x2490bc7f) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #1 AddStepDuration /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h:125:23 (ydbd+0x2490bc7f)
E   #2 NKikimr::NOlap::NReader::NCommon::TFetchingScriptCursor::FlushDuration() /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h:201:17 (ydbd+0x2490bc7f)
E   #3 Next /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h:223:9 (ydbd+0x24923600) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #4 NKikimr::NOlap::NReader::NCommon::TBlobsFetcherTask::DoOnDataReady(std::__y1::shared_ptr<NKikimr::NOlap::NResourceBroker::NSubscribe::TResourcesGuard> const&) /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/constructor.cpp:10:5 (ydbd+0x24923600)
E   #5 NKikimr::NOlap::NBlobOperations::NRead::ITask::OnDataReady() /-S/ydb/core/tx/columnshard/blobs_reader/task.cpp:113:5 (ydbd+0x21b4abed) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #6 NKikimr::NOlap::NBlobOperations::NRead::ITask::AddData(TBasicString<char, std::__y1::char_traits<char>> const&, NKikimr::NOlap::TBlobRange const&, TBasicString<char, std::__y1::char_traits<char>> const&) /-S/ydb/core/tx/columnshard/blobs_reader/task.cpp:55:9 (ydbd+0x21b4ba38) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #7 NKikimr::NOlap::NBlobOperations::NRead::TActor::Handle(TAutoPtr<NActors::TEventHandle<NKikimr::NBlobCache::TEvBlobCache::TEvReadBlobRangeResult>, TDelete>&) /-S/ydb/core/tx/columnshard/blobs_reader/actor.cpp:23:15 (ydbd+0x21b51d89) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #8 NKikimr::NOlap::NBlobOperations::NRead::TActor::StateWait(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/core/tx/columnshard/blobs_reader/actor.h:27:13 (ydbd+0x21b52c40) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #9 NActors::TActorCallbackBehaviour::Receive(NActors::IActor*, TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor.cpp:260:9 (ydbd+0x17bac7d3) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #10 NActors::IActor::Receive(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor.h:548:23 (ydbd+0x17c0d062) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #11 NActors::TGenericExecutorThread::Execute(NActors::TMailbox*, bool) /-S/ydb/library/actors/core/executor_thread.cpp:281:28 (ydbd+0x17c08c15) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #12 NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*)::$_0::operator()(NActors::TMailbox*, bool) const /-S/ydb/library/actors/core/executor_thread.cpp:475:39 (ydbd+0x17c0ef9e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #13 NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*) /-S/ydb/library/actors/core/executor_thread.cpp:529:13 (ydbd+0x17c0e66e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #14 NActors::TExecutorThread::ThreadProc() /-S/ydb/library/actors/core/executor_thread.cpp:560:9 (ydbd+0x17c0fd29) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #15 void* (anonymous namespace)::ThreadProcWrapper<ISimpleThread>(void*) /-S/util/system/thread.cpp:383:45 (ydbd+0x167d9702) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #16 (anonymous namespace)::TPosixThread::ThreadProxy(void*) /-S/util/system/thread.cpp:244:20 (ydbd+0x167d9cdc) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   
E   Previous write of size 8 at 0x7218002ce728 by thread T48:
E   #0 operator=<NMonotonic::TMonotonic, void> /-S/contrib/libs/cxxsupp/libcxx/include/optional (ydbd+0x2490bc7f) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #1 AddStepDuration /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h:125:23 (ydbd+0x2490bc7f)
E   #2 NKikimr::NOlap::NReader::NCommon::TFetchingScriptCursor::FlushDuration() /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.h:201:17 (ydbd+0x2490bc7f)
E   #3 NKikimr::NOlap::NReader::NCommon::TFetchingScriptCursor::Execute(std::__y1::shared_ptr<NKikimr::NOlap::NReader::NCommon::IDataSource> const&) /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.cpp:64:9 (ydbd+0x2490e489) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #4 NKikimr::NOlap::NReader::NCommon::TStepAction::DoExecuteImpl() /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/fetching.cpp:22:33 (ydbd+0x2490cfc2) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #5 NKikimr::NOlap::NReader::IDataTasksProcessor::ITask::DoExecute(std::__y1::shared_ptr<NKikimr::NConveyor::ITask> const&) /-S/ydb/core/tx/columnshard/engines/reader/common/conveyor_task.cpp:8:19 (ydbd+0x24993d0d) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #6 NKikimr::NConveyor::ITask::Execute(std::__y1::shared_ptr<NKikimr::NConveyor::TTaskSignals>, std::__y1::shared_ptr<NKikimr::NConveyor::ITask> const&) /-S/ydb/core/tx/conveyor/usage/abstract.cpp:13:36 (ydbd+0x248d54d3) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #7 NKikimr::NConveyor::TWorker::ExecuteTask(NKikimr::NConveyor::TWorkerTask const&) /-S/ydb/core/tx/conveyor/service/worker.cpp:10:36 (ydbd+0x30e85de2) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #8 NKikimr::NConveyor::TWorker::HandleMain(TAutoPtr<NActors::TEventHandle<NKikimr::NConveyor::TEvInternal::TEvNewTask>, TDelete>&) /-S/ydb/core/tx/conveyor/service/worker.cpp:28:9 (ydbd+0x30e8634e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #9 NKikimr::NConveyor::TWorker::StateMain(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/core/tx/conveyor/service/worker.h:93:13 (ydbd+0x30e821c4) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #10 NActors::TActorCallbackBehaviour::Receive(NActors::IActor*, TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor.cpp:260:9 (ydbd+0x17bac7d3) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #11 NActors::IActor::Receive(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor.h:548:23 (ydbd+0x17c0d062) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #12 NActors::TGenericExecutorThread::Execute(NActors::TMailbox*, bool) /-S/ydb/library/actors/core/executor_thread.cpp:281:28 (ydbd+0x17c08c15) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #13 NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*)::$_0::operator()(NActors::TMailbox*, bool) const /-S/ydb/library/actors/core/executor_thread.cpp:475:39 (ydbd+0x17c0ef9e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #14 NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*) /-S/ydb/library/actors/core/executor_thread.cpp:529:13 (ydbd+0x17c0e66e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #15 NActors::TExecutorThread::ThreadProc() /-S/ydb/library/actors/core/executor_thread.cpp:560:9 (ydbd+0x17c0fd29) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #16 void* (anonymous namespace)::ThreadProcWrapper<ISimpleThread>(void*) /-S/util/system/thread.cpp:383:45 (ydbd+0x167d9702) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #17 (anonymous namespace)::TPosixThread::ThreadProxy(void*) /-S/util/system/thread.cpp:244:20 (ydbd+0x167d9cdc) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   
E   Location is heap block of size 88 at 0x7218002ce6e0 allocated by thread T48:
E   #0 operator new(unsigned long) /-S/contrib/libs/clang18-rt/lib/tsan/rtl/tsan_new_delete.cpp:64:3 (ydbd+0x166181b7) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #1 __libcpp_operator_new<unsigned long> /-S/contrib/libs/cxxsupp/libcxx/include/new:271:10 (ydbd+0x249380df) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #2 __libcpp_allocate /-S/contrib/libs/cxxsupp/libcxx/include/new:295:10 (ydbd+0x249380df)
E   #3 allocate /-S/contrib/libs/cxxsupp/libcxx/include/__memory/allocator.h:117:32 (ydbd+0x249380df)
E   #4 allocate /-S/contrib/libs/cxxsupp/libcxx/include/__memory/allocator_traits.h:269:16 (ydbd+0x249380df)
E   #5 __allocation_guard<std::__y1::allocator<NKikimr::NOlap::NReader::NCommon::TFetchingScript> > /-S/contrib/libs/cxxsupp/libcxx/include/__memory/allocation_guard.h:56:16 (ydbd+0x249380df)
E   #6 allocate_shared<NKikimr::NOlap::NReader::NCommon::TFetchingScript, std::__y1::allocator<NKikimr::NOlap::NReader::NCommon::TFetchingScript>, const NKikimr::NOlap::NReader::NPlain::TSpecialReadContext &, void> /-S/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h:849:46 (ydbd+0x249380df)
E   #7 make_shared<NKikimr::NOlap::NReader::NCommon::TFetchingScript, const NKikimr::NOlap::NReader::NPlain::TSpecialReadContext &, void> /-S/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h:858:10 (ydbd+0x249380df)
E   #8 NKikimr::NOlap::NReader::NPlain::TSpecialReadContext::BuildColumnsFetchingPlan(bool, bool, bool, bool, bool, bool) const /-S/ydb/core/tx/columnshard/engines/reader/plain_reader/iterator/context.cpp:89:47 (ydbd+0x249380df)
E   #9 NKikimr::NOlap::NReader::NPlain::TSpecialReadContext::DoGetColumnsFetchingPlan(std::__y1::shared_ptr<NKikimr::NOlap::NReader::NCommon::IDataSource> const&) /-S/ydb/core/tx/columnshard/engines/reader/plain_reader/iterator/context.cpp:69:26 (ydbd+0x24937676) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #10 GetColumnsFetchingPlan /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/context.h:50:16 (ydbd+0x248e49b9) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #11 GetColumnsFetchingPlan<NKikimr::NOlap::NReader::NPlain::IDataSource> /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/context.h:46:16 (ydbd+0x248e49b9)
E   #12 NKikimr::NOlap::NReader::NPlain::TScanHead::Start() /-S/ydb/core/tx/columnshard/engines/reader/plain_reader/iterator/scanner.cpp:91:42 (ydbd+0x248e49b9)
E   #13 NKikimr::NOlap::NReader::NPlain::TPlainReadData::DoStart() /-S/ydb/core/tx/columnshard/engines/reader/plain_reader/iterator/plain_read_data.h:22:25 (ydbd+0x248da59a) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #14 NKikimr::NOlap::NReader::IDataReader::Start() /-S/ydb/core/tx/columnshard/engines/reader/abstract/read_context.h:172:16 (ydbd+0x248d4633) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #15 NKikimr::NOlap::NReader::NCommon::TColumnShardScanIterator::Start() /-S/ydb/core/tx/columnshard/engines/reader/common_reader/iterator/iterator.h:74:29 (ydbd+0x248d0b14) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #16 NKikimr::NOlap::NReader::TColumnShardScan::Bootstrap(NActors::TActorContext const&) /-S/ydb/core/tx/columnshard/engines/reader/actor/actor.cpp:88:38 (ydbd+0x24b5a9f6) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #17 NActors::TActorBootstrapped<NKikimr::NOlap::NReader::TColumnShardScan>::StateBootstrap(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor_bootstrapped.h:22:22 (ydbd+0x24b6b47a) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #18 NActors::TActorCallbackBehaviour::Receive(NActors::IActor*, TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor.cpp:260:9 (ydbd+0x17bac7d3) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #19 NActors::IActor::Receive(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/ydb/library/actors/core/actor.h:548:23 (ydbd+0x17c0d062) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #20 NActors::TGenericExecutorThread::Execute(NActors::TMailbox*, bool) /-S/ydb/library/actors/core/executor_thread.cpp:281:28 (ydbd+0x17c08c15) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #21 NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*)::$_0::operator()(NActors::TMailbox*, bool) const /-S/ydb/library/actors/core/executor_thread.cpp:475:39 (ydbd+0x17c0ef9e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #22 NActors::TGenericExecutorThread::ProcessExecutorPool(NActors::IExecutorPool*) /-S/ydb/library/actors/core/executor_thread.cpp:529:13 (ydbd+0x17c0e66e) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #23 NActors::TExecutorThread::ThreadProc() /-S/ydb/library/actors/core/executor_thread.cpp:560:9 (ydbd+0x17c0fd29) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #24 void* (anonymous namespace)::ThreadProcWrapper<ISimpleThread>(void*) /-S/util/system/thread.cpp:383:45 (ydbd+0x167d9702) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #25 (anonymous namespace)::TPosixThread::ThreadProxy(void*) /-S/util/system/thread.cpp:244:20 (ydbd+0x167d9cdc) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   
E   Thread T47 'ydbd.User' (tid=57511, running) created by main thread at:
E   #0 pthread_create /-S/contrib/libs/clang18-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1023:3 (ydbd+0x16597f5b) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #1 Start /-S/util/system/thread.cpp:229:27 (ydbd+0x167d8d09) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #2 TThread::Start() /-S/util/system/thread.cpp:314:34 (ydbd+0x167d8d09)
E   #3 NActors::TBasicExecutorPool::Start() /-S/ydb/library/actors/core/executor_pool_basic.cpp:475:32 (ydbd+0x17bf38c8) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #4 NActors::TCpuManager::Start() /-S/ydb/library/actors/core/cpu_manager.cpp:82:32 (ydbd+0x17bbfb03) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #5 NActors::TActorSystem::Start() /-S/ydb/library/actors/core/actorsystem.cpp:312:21 (ydbd+0x17bb8fca) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #6 NKikimr::TKikimrRunner::KikimrStart() /-S/ydb/core/driver_lib/run/run.cpp:1744:22 (ydbd+0x285a62e1) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #7 NKikimr::MainRun(NKikimr::TKikimrRunConfig const&, std::__y1::shared_ptr<NKikimr::TModuleFactories>) /-S/ydb/core/driver_lib/run/main.cpp:46:17 (ydbd+0x26ff283d) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #8 NKikimr::NDriverClient::TClientCommandServer::Run(NYdb::NConsoleClient::TClientCommand::TConfig&) /-S/ydb/core/driver_lib/cli_utils/cli_cmds_server.cpp:51:12 (ydbd+0x28514970) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #9 NYdb::NConsoleClient::TClientCommand::ValidateAndRun(NYdb::NConsoleClient::TClientCommand::TConfig&) /-S/ydb/public/lib/ydb_cli/common/command.cpp:258:12 (ydbd+0x27033d31) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
E   #10 NYdb::NConsoleClient::TClientCommandTree::Run(NYdb::NConsoleClient::TClientCommand::TConfig&) /-S/ydb/public/lib/ydb_cli/common/command.cpp:417:33 (ydbd+0x27036adb) (BuildId: c246211dd8d6f5e441565a7c2a027dea76b848a5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants