Skip to content

fix: prevent NaN in thread pool stats #17988

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
wants to merge 4 commits into from

Conversation

Sazonov99
Copy link

@Sazonov99 Sazonov99 commented May 5, 2025

ub_sanitizer нашел попытку преобразовать NaN в unsigned int

/place/sandbox-data/tasks/8/8/3053489088/__FUSE/mount_path_85659d51-ce9b-4cfe-bbaa-40809fb5ff23/contrib/ydb/core/util/cpuinfo.cpp:108:32: runtime error: -nan is outside the range of representable values of type 'unsigned int'
    #0 0x35c666d6 in NKikimr::TSystemThreadsMonitor::GetThreadPools(TInstant) /-S/contrib/ydb/core/util/cpuinfo.cpp:108:32
    #1 0x35c0d648 in NKikimr::NNodeWhiteboard::TNodeWhiteboardService::Handle(TAutoPtr<NActors::TEventHandle<NKikimr::NNodeWhiteboard::TNodeWhiteboardService::TEvPrivate::TEvUpdateRuntimeStats>, TDelete>&, NActors::TActorContext const&) /-S/contrib/ydb/core/tablet/node_whiteboard.cpp:1152:43
    #2 0x35bfa08c in NKikimr::NNodeWhiteboard::TNodeWhiteboardService::StateFunc(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/contrib/ydb/core/tablet/node_whiteboard.cpp:526:5
    #3 0x16ebbd43 in NActors::IActor::Receive(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/contrib/ydb/library/actors/core/actor.cpp:280:13
    #4 0x331e74cb in NActors::TTestActorRuntimeBase::SendInternal(TAutoPtr<NActors::IEventHandle, TDelete>, unsigned int, bool) /-S/contrib/ydb/library/actors/testlib/test_runtime.cpp:1702:33
    #5 0x331dfe6a in NActors::TTestActorRuntimeBase::DispatchEventsInternal(NActors::TDispatchOptions const&, TInstant) /-S/contrib/ydb/library/actors/testlib/test_runtime.cpp:1295:45
    #6 0x331dd77e in NActors::TTestActorRuntimeBase::DispatchEvents(NActors::TDispatchOptions const&, TInstant) /-S/contrib/ydb/library/actors/testlib/test_runtime.cpp:1091:16
    #7 0x1203075c in NCloud::NStorage::(anonymous namespace)::BootHiveMock(NActors::TTestActorRuntime&, unsigned long, TIntrusivePtr<NCloud::NStorage::(anonymous namespace)::THiveMockState, TDefaultIntrusivePtrOps<NCloud::NStorage::(anonymous namespace)::THiveMockState>>, NCloud::NStorage::(anonymous namespace)::EExternalBootOptions) /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:415:17
    #8 0x11fe3d57 in NCloud::NStorage::(anonymous namespace)::TTestEnv::TTestEnv(NActors::TTestActorRuntime&, TBasicString<char, std::__y1::char_traits<char>>, bool, bool, bool) /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:447:9
    #9 0x11fef7e7 in NCloud::NStorage::NTestSuiteTHiveProxyTest::TTestCaseLockReconnected::Execute_(NUnitTest::TTestContext&) /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:909:18
    #10 0x1202d38f in NCloud::NStorage::NTestSuiteTHiveProxyTest::TCurrentTest::Execute()::'lambda'()::operator()() const /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:802:1
    #11 0x12545679 in NUnitTest::TTestBase::Run(std::__y1::function<void ()>, TBasicString<char, std::__y1::char_traits<char>> const&, char const*, bool) /-S/library/cpp/testing/unittest/registar.cpp:373:18
    #12 0x1202b74f in NCloud::NStorage::NTestSuiteTHiveProxyTest::TCurrentTest::Execute() /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:802:1
    #13 0x12547045 in NUnitTest::TTestFactory::Execute() /-S/library/cpp/testing/unittest/registar.cpp:494:19
    #14 0x1256700c in NUnitTest::RunMain(int, char**) /-S/library/cpp/testing/unittest/utmain.cpp:872:44
    #15 0x7f582a8d8082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #16 0x1001f028 in _start (/tmp/3053489088/tmpscdMvC/build_root/fxqa/007ce8/cloud/storage/core/libs/hive_proxy/ut/cloud-storage-core-libs-hive_proxy-ut+0x1001f028) (BuildId: 6ff85f4ee4c5af508adb6bac1d7e58f9d8052d10)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /place/sandbox-data/tasks/8/8/3053489088/__FUSE/mount_path_85659d51-ce9b-4cfe-bbaa-40809fb5ff23/contrib/ydb/core/util/cpuinfo.cpp:108:32

Changelog entry

#17994
handle zero time delta to avoid NaN in thread metrics

Changelog category

  • Bugfix

Description for reviewers

...

/place/sandbox-data/tasks/8/8/3053489088/__FUSE/mount_path_85659d51-ce9b-4cfe-bbaa-40809fb5ff23/contrib/ydb/core/util/cpuinfo.cpp:108:32: runtime error: -nan is outside the range of representable values of type 'unsigned int'
    #0 0x35c666d6 in NKikimr::TSystemThreadsMonitor::GetThreadPools(TInstant) /-S/contrib/ydb/core/util/cpuinfo.cpp:108:32
    #1 0x35c0d648 in NKikimr::NNodeWhiteboard::TNodeWhiteboardService::Handle(TAutoPtr<NActors::TEventHandle<NKikimr::NNodeWhiteboard::TNodeWhiteboardService::TEvPrivate::TEvUpdateRuntimeStats>, TDelete>&, NActors::TActorContext const&) /-S/contrib/ydb/core/tablet/node_whiteboard.cpp:1152:43
    #2 0x35bfa08c in NKikimr::NNodeWhiteboard::TNodeWhiteboardService::StateFunc(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/contrib/ydb/core/tablet/node_whiteboard.cpp:526:5
    #3 0x16ebbd43 in NActors::IActor::Receive(TAutoPtr<NActors::IEventHandle, TDelete>&) /-S/contrib/ydb/library/actors/core/actor.cpp:280:13
    #4 0x331e74cb in NActors::TTestActorRuntimeBase::SendInternal(TAutoPtr<NActors::IEventHandle, TDelete>, unsigned int, bool) /-S/contrib/ydb/library/actors/testlib/test_runtime.cpp:1702:33
    #5 0x331dfe6a in NActors::TTestActorRuntimeBase::DispatchEventsInternal(NActors::TDispatchOptions const&, TInstant) /-S/contrib/ydb/library/actors/testlib/test_runtime.cpp:1295:45
    #6 0x331dd77e in NActors::TTestActorRuntimeBase::DispatchEvents(NActors::TDispatchOptions const&, TInstant) /-S/contrib/ydb/library/actors/testlib/test_runtime.cpp:1091:16
    #7 0x1203075c in NCloud::NStorage::(anonymous namespace)::BootHiveMock(NActors::TTestActorRuntime&, unsigned long, TIntrusivePtr<NCloud::NStorage::(anonymous namespace)::THiveMockState, TDefaultIntrusivePtrOps<NCloud::NStorage::(anonymous namespace)::THiveMockState>>, NCloud::NStorage::(anonymous namespace)::EExternalBootOptions) /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:415:17
    #8 0x11fe3d57 in NCloud::NStorage::(anonymous namespace)::TTestEnv::TTestEnv(NActors::TTestActorRuntime&, TBasicString<char, std::__y1::char_traits<char>>, bool, bool, bool) /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:447:9
    #9 0x11fef7e7 in NCloud::NStorage::NTestSuiteTHiveProxyTest::TTestCaseLockReconnected::Execute_(NUnitTest::TTestContext&) /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:909:18
    #10 0x1202d38f in NCloud::NStorage::NTestSuiteTHiveProxyTest::TCurrentTest::Execute()::'lambda'()::operator()() const /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:802:1
    #11 0x12545679 in NUnitTest::TTestBase::Run(std::__y1::function<void ()>, TBasicString<char, std::__y1::char_traits<char>> const&, char const*, bool) /-S/library/cpp/testing/unittest/registar.cpp:373:18
    #12 0x1202b74f in NCloud::NStorage::NTestSuiteTHiveProxyTest::TCurrentTest::Execute() /-S/cloud/storage/core/libs/hive_proxy/hive_proxy_ut.cpp:802:1
    #13 0x12547045 in NUnitTest::TTestFactory::Execute() /-S/library/cpp/testing/unittest/registar.cpp:494:19
    #14 0x1256700c in NUnitTest::RunMain(int, char**) /-S/library/cpp/testing/unittest/utmain.cpp:872:44
    #15 0x7f582a8d8082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #16 0x1001f028 in _start (/tmp/3053489088/tmpscdMvC/build_root/fxqa/007ce8/cloud/storage/core/libs/hive_proxy/ut/cloud-storage-core-libs-hive_proxy-ut+0x1001f028) (BuildId: 6ff85f4ee4c5af508adb6bac1d7e58f9d8052d10)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /place/sandbox-data/tasks/8/8/3053489088/__FUSE/mount_path_85659d51-ce9b-4cfe-bbaa-40809fb5ff23/contrib/ydb/core/util/cpuinfo.cpp:108:32
Copy link

github-actions bot commented May 5, 2025

🟢 2025-05-06 07:46:57 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented May 5, 2025

2025-05-05 06:27:15 UTC Pre-commit check linux-x86_64-relwithdebinfo for 18ce7e9 has started.
2025-05-05 06:27:26 UTC Artifacts will be uploaded here
2025-05-05 06:30:22 UTC ya make is running...
🟡 2025-05-05 07:44:19 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
28818 26139 0 6 2633 40

2025-05-05 07:46:40 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-05 08:00:13 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
156 (only retried tests) 124 0 1 2 29

2025-05-05 08:00:21 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-05-05 08:13:11 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
106 (only retried tests) 76 0 1 0 29

🟢 2025-05-05 08:13:17 UTC Build successful.
🟢 2025-05-05 08:13:41 UTC ydbd size 2.2 GiB changed* by +48 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: 8e34779 merge: 18ce7e9 diff diff %
ydbd size 2 342 846 768 Bytes 2 342 846 816 Bytes +48 Bytes +0.000%
ydbd stripped size 492 768 192 Bytes 492 768 256 Bytes +64 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented May 5, 2025

2025-05-05 06:27:47 UTC Pre-commit check linux-x86_64-release-asan for 18ce7e9 has started.
2025-05-05 06:27:59 UTC Artifacts will be uploaded here
2025-05-05 06:30:54 UTC ya make is running...
🟡 2025-05-05 07:57:27 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14035 13829 0 135 47 24

2025-05-05 07:58:39 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-05 08:27:16 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1059 (only retried tests) 941 0 62 33 23

2025-05-05 08:27:31 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-05 08:55:56 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
808 (only retried tests) 699 0 50 36 23

🟢 2025-05-05 08:56:08 UTC Build successful.
🟢 2025-05-05 08:56:42 UTC ydbd size 3.8 GiB changed* by +48 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: 8e34779 merge: 18ce7e9 diff diff %
ydbd size 4 121 690 776 Bytes 4 121 690 824 Bytes +48 Bytes +0.000%
ydbd stripped size 1 429 126 808 Bytes 1 429 126 936 Bytes +128 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions github-actions bot added bugfix and removed bugfix labels May 5, 2025
Copy link

github-actions bot commented May 12, 2025

2025-05-12 11:40:47 UTC Pre-commit check linux-x86_64-relwithdebinfo for ada4702 has started.
2025-05-12 11:40:59 UTC Artifacts will be uploaded here
2025-05-12 11:42:58 UTC Check cancelled

Copy link

github-actions bot commented May 12, 2025

2025-05-12 11:48:47 UTC Pre-commit check linux-x86_64-relwithdebinfo for d59a332 has started.
2025-05-12 11:48:58 UTC Artifacts will be uploaded here
2025-05-12 11:51:54 UTC ya make is running...
🟡 2025-05-12 13:03:20 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
28928 26253 0 6 2633 36

2025-05-12 13:05:40 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-05-12 13:30:20 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
352 (only retried tests) 320 0 0 0 32

🟢 2025-05-12 13:30:28 UTC Build successful.
🟢 2025-05-12 13:30:48 UTC ydbd size 2.2 GiB changed* by +64 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: da5cb37 merge: d59a332 diff diff %
ydbd size 2 351 909 104 Bytes 2 351 909 168 Bytes +64 Bytes +0.000%
ydbd stripped size 494 236 496 Bytes 494 236 560 Bytes +64 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented May 12, 2025

2025-05-12 11:48:53 UTC Pre-commit check linux-x86_64-release-asan for d59a332 has started.
2025-05-12 11:49:05 UTC Artifacts will be uploaded here
2025-05-12 11:52:04 UTC ya make is running...
🟡 2025-05-12 13:23:12 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13944 13762 0 106 47 29

2025-05-12 13:24:32 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-12 13:59:10 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1541 (only retried tests) 1398 0 70 46 27

2025-05-12 13:59:27 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-12 14:33:36 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1235 (only retried tests) 1117 0 55 37 26

🟢 2025-05-12 14:33:59 UTC Build successful.
🟢 2025-05-12 14:34:31 UTC ydbd size 3.9 GiB changed* by +112 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: da5cb37 merge: d59a332 diff diff %
ydbd size 4 137 940 728 Bytes 4 137 940 840 Bytes +112 Bytes +0.000%
ydbd stripped size 1 435 922 080 Bytes 1 435 922 272 Bytes +192 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@Sazonov99 Sazonov99 closed this by deleting the head repository Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant