Skip to content

test/lazy-omap-stats: regex optimize for header index find#55596

Closed
NitzanMordhai wants to merge 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-lazy-omap-stats-test-regex-optimize
Closed

test/lazy-omap-stats: regex optimize for header index find#55596
NitzanMordhai wants to merge 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-lazy-omap-stats-test-regex-optimize

Conversation

@NitzanMordhai
Copy link
Contributor

@NitzanMordhai NitzanMordhai commented Feb 15, 2024

With the current regex, and large output from pg dump, regex_search can sometimes causing a segfault.
by changing the header regex to find less intensive regex the regex_search won't segfault.

Fixes: https://tracker.ceph.com/issues/59196

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@NitzanMordhai
Copy link
Contributor Author

jenkins test make check

@NitzanMordhai
Copy link
Contributor Author

@badone can you please review?

R"((PG_STAT[\s\S]*))"
"\n +\n[0-9]");
regex reg(R"(PG_STAT[^\n]*\n)");
string command = R"({"prefix": "pg dump"})";
Copy link
Contributor

Choose a reason for hiding this comment

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

Of course these are not equivalent and the change should not be necessary but, if you are confident this covers all bases then I'm all for it.

With the current regex, and large output from pg dump, regex_search
can sometimes causing a segfault.
by changing the header regex to find less intensive regex the regex_search
won't segfault.

Fixes: https://tracker.ceph.com/issues/59196
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-lazy-omap-stats-test-regex-optimize branch from 9e0ca27 to ac59bc8 Compare March 12, 2024 10:51
@badone
Copy link
Contributor

badone commented Mar 13, 2024

The failing tests were using the older version of the patch with the change only to LazyOmapStatsTest::wait_for_active_clean() (9e0ca27) and no change to LazyOmapStatsTest::check_one() which is where the test is failing. Can we try again with the patch as it currently stands?

@amathuria
Copy link
Contributor

Saw a segfault in the test run including this PR - https://pulpito.ceph.com/yuriw-2024-03-19_00:09:45-rados-wip-yuri5-testing-2024-03-18-1144-distro-default-smithi/7609959/ in the ceph_test_lazy_omap_stats test.

PRs being tested in this batch are noted here: https://tracker.ceph.com/issues/64974

@badone
Copy link
Contributor

badone commented Mar 22, 2024

Saw a segfault in the test run including this PR - https://pulpito.ceph.com/yuriw-2024-03-19_00:09:45-rados-wip-yuri5-testing-2024-03-18-1144-distro-default-smithi/7609959/ in the ceph_test_lazy_omap_stats test.

PRs being tested in this batch are noted here: https://tracker.ceph.com/issues/64974

This approach is just going to be whack-a-mole I'm afraid due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86164 I'm looking into an alternative approach and I hope that's OK with you @NitzanMordhai ?

@NitzanMordhai
Copy link
Contributor Author

This approach is just going to be whack-a-mole I'm afraid due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86164 I'm looking into an alternative approach and I hope that's OK with you @NitzanMordhai ?

@badone sure, thanks a lot for picking it up!

@badone
Copy link
Contributor

badone commented Mar 29, 2024

Closing in favour of #55596 Thank you for your effort Nitzan.

@badone badone closed this Mar 29, 2024
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.

6 participants