Skip to content

Fix flaky ut TPDiskTest.ChunkWriteDifferentOffsetAndSize#34455

Merged
rosik merged 1 commit intoydb-platform:mainfrom
rosik:fix-pdisk-ut-flaky
Feb 19, 2026
Merged

Fix flaky ut TPDiskTest.ChunkWriteDifferentOffsetAndSize#34455
rosik merged 1 commit intoydb-platform:mainfrom
rosik:fix-pdisk-ut-flaky

Conversation

@rosik
Copy link
Collaborator

@rosik rosik commented Feb 18, 2026

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

Flaky test:

VERIFY failed (2026-02-16T03:23:04.874435Z): Invalid random number range [0, 0)
  util/random/common_ops.h:50
  GenUniform(): requirement max > 0 failed
NPrivate::InternalPanicImpl(int, char const*, char const*, int, int, int, TBasicStringBuf<char, std::__y1::char_traits<char>>, char const*, unsigned long)+438 (0x24556C6)
NPrivate::Panic(NPrivate::TStaticBuf const&, int, char const*, char const*, char const*, ...)+263 (0x244C257)
NKikimr::GenParts(TReallyFastRng32&, unsigned long)+2428 (0x20AAE5C)
NKikimr::NTestSuiteTPDiskTest::ChunkWriteDifferentOffsetAndSizeImpl(bool, bool)+1843 (0x20F9523)
NKikimr::NTestSuiteTPDiskTest::TTestCaseChunkWriteDifferentOffsetAndSize::Execute_(NUnitTest::TTestContext&)+13 (0x20FA45D)
NKikimr::NTestSuiteTPDiskTest::TCurrentTest::Execute()::'lambda'()::operator()() const+71 (0x2124177)
NUnitTest::TTestBase::Run(std::__y1::function<void ()>, TBasicString<char, std::__y1::char_traits<char>> const&, char const*, bool)+120 (0x24E9ED8)
NKikimr::NTestSuiteTPDiskTest::TCurrentTest::Execute()+435 (0x2123B23)
NUnitTest::TTestFactory::Execute()+817 (0x24EA621)
NUnitTest::RunMain(int, char**)+3229 (0x24FCE4D)
??+0 (0x7F0754CCBD90)
__libc_start_main+128 (0x7F0754CCBE40)
_start+41 (0x2042029)

@rosik rosik requested a review from eivanov89 February 18, 2026 18:52
@rosik rosik self-assigned this Feb 18, 2026
Copilot AI review requested due to automatic review settings February 18, 2026 18:52
@ydbot
Copy link
Collaborator

ydbot commented Feb 18, 2026

Run Extra Tests

Run additional tests for this PR. You can customize:

  • Test Size: small, medium, large (default: all)
  • Test Targets: any directory path (default: ydb/)
  • Sanitizers: ASAN, MSAN, TSAN
  • Coredumps: enable for debugging (default: off)
  • Additional args: custom ya make arguments

▶  Run tests

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a flaky unit test TPDiskTest.ChunkWriteDifferentOffsetAndSize that had an 85.7% success rate due to a bug in random data generation. The issue was in the GenParts function which could cause an abort when calling rng.Uniform(0) in certain edge cases.

Changes:

  • Fixed random part size generation to avoid calling Uniform with an empty range that would trigger an abort

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

2026-02-18 18:56:21 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7c50db8 has started.
2026-02-18 18:56:38 UTC Artifacts will be uploaded here
2026-02-18 18:58:55 UTC ya make is running...
🟢 2026-02-18 19:05:04 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
255 255 0 0 0 0

🟢 2026-02-18 19:05:12 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

2026-02-18 18:56:52 UTC Pre-commit check linux-x86_64-release-asan for 7c50db8 has started.
2026-02-18 18:57:10 UTC Artifacts will be uploaded here
2026-02-18 18:59:23 UTC ya make is running...
🟢 2026-02-18 19:00:22 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2026-02-18 19:00:28 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

🟢 2026-02-19 10:25:00 UTC The validation of the Pull Request description is successful.

@rosik rosik merged commit f64ca5f into ydb-platform:main Feb 19, 2026
18 checks passed
@ydbot
Copy link
Collaborator

ydbot commented Feb 19, 2026

Backport

To backport this PR, click the button next to the target branch and then click "Run workflow" in the Run Actions UI.

Branch Run
stable-25-3, stable-25-3-1, stable-25-4, stable-25-4-1 ▶  Backport
stable-25-4, stable-25-4-1 ▶  Backport
stable-25-4 ▶  Backport

▶  Backport manual

@rosik rosik deleted the fix-pdisk-ut-flaky branch February 19, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mute ydb/core/blobstorage/pdisk/ut/TPDiskTest.ChunkWriteDifferentOffsetAndSize in main

4 participants

Comments