Skip to content

src/test: test vectored/buffered sync i/o with buffers exceeding 2GiB in total len - #58481

Merged
chrisphoffman merged 2 commits into
ceph:mainfrom
dparmar18:wip-66771
Aug 20, 2026
Merged

chrisphoffman merged 2 commits into
ceph:mainfrom
dparmar18:wip-66771

Conversation

@dparmar18

@dparmar18 dparmar18 commented Jul 9, 2024 •

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added cephfs Ceph File System tests labels Jul 9, 2024
@dparmar18
dparmar18 requested a review from a team July 9, 2024 14:38

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Please squash the top 3 (test related) commits.

Comment thread src/test/libcephfs/test.cc Resolved
Comment thread src/test/client/syncio.cc Resolved
@dparmar18

Copy link
Copy Markdown
Contributor Author

Looks good. Please squash the top 3 (test related) commits.

Doable for 2nd and 3rd but if you see the first one is temp.

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Dec 16, 2024
@dparmar18 dparmar18 removed the stale label Dec 16, 2024
@dparmar18

Copy link
Copy Markdown
Contributor Author

ping @rishabh-d-dave

@rishabh-d-dave rishabh-d-dave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skipped the "temp" commit since it belongs to a different PR and will eventually be removed from this PR. Left few nits, but otherwise this PR looks okay to me.

Comment thread src/test/client/syncio.cc Resolved
Comment thread src/test/client/syncio.cc Resolved
Comment thread src/test/libcephfs/test.cc Resolved
Comment thread src/test/libcephfs/test.cc Resolved
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions

github-actions Bot commented Mar 3, 2025

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Comment thread src/test/client/syncio.cc Resolved
@chrisphoffman

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by choffman started 2026-07-15-15:47.

@chrisphoffman

Copy link
Copy Markdown
Contributor

@dparmar18 windows test is failing, please take a look

@dparmar18

Copy link
Copy Markdown
Contributor Author

no logs, re-triggering win test

@dparmar18

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@dparmar18

dparmar18 commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor Author

https://jenkins.ceph.com/job/ceph-windows-pull-requests/83662/consoleFull

/home/ubuntu/ceph/src/test/libcephfs/test.cc:5173:24: error: use of undeclared identifier 'FSCRYPT_MAXIO_SIZE'
    READ_WRITE_LIMIT = FSCRYPT_MAXIO_SIZE;

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@dparmar18

Copy link
Copy Markdown
Contributor Author

@dparmar18 windows test is failing, please take a look

added a tiny portability shim setting FSCRYPT_MAX_IO in the test.cc and syncio.cc if they are not defined. PTAL @chrisphoffman

@chrisphoffman

Copy link
Copy Markdown
Contributor

It looks like there's another failure on the windows tests, @dparmar18

@dparmar18

Copy link
Copy Markdown
Contributor Author

It looks like there's another failure on the windows tests, @dparmar18

ha! https://jenkins.ceph.com/job/ceph-windows-pull-requests/83785/consoleFull

[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_fscrypt failed. Error: Command returned non-zero code(1): "cmd /c 'C:\ceph\ceph_test_libcephfs_fscrypt.exe --gtest_output=xml:C:\workspace\test_results\out\ceph_test_libcephfs_fscrypt\ceph_test_libcephfs_fscrypt_results.xml --gtest_filter="-LibCephFS.Deleg*" >> C:\workspace\test_results\out\ceph_test_libcephfs_fscrypt\ceph_test_libcephfs_fscrypt_results.log 2>&1'".
[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_lazyio passed.
[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_newops passed.
[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_perfcounters passed.
[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_snapdiff passed.
[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_suidsgid passed.
[2026-07-21T23:47:37.000Z] [isolated][googletest] ceph_test_libcephfs_vxattr passed.
[2026-07-21T23:47:37.000Z] [isolated][googletest] unittest_admin_socket passed.
unittest_global_doublefree
ceph_test_libcephfs_fscrypt.LibCephFS.BuffersOverLimit
The process tried to write to a nonexistent pipe.
[2026-07-21T23:47:39.000Z] subunit-trace reports failures: Command failed: type C:\workspace\test_results\subunit.out | subunit-trace
One or more test suites have failed
At C:\workspace\repos\ceph-win32-tests\test_host\run_tests.ps1:28 char:9
+         throw "One or more test suites have failed"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (One or more test suites have failed:String) [], RuntimeException
    + FullyQualifiedErrorId : One or more test suites have failed
 
+ EXIT_CODE=1

@dparmar18

Copy link
Copy Markdown
Contributor Author

@chrisphoffman there is nothing in the console log that can tell the reason. What i think happened is it got OOM killed. I've seen it happen on my workstation a couple of times. I'll rebase this PR hoping for a pass.

@dparmar18

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@dparmar18

Copy link
Copy Markdown
Contributor Author

@dparmar18

Copy link
Copy Markdown
Contributor Author

thanks for pointing me to the windows test case log @chrisphoffman:

the failure is not OOM, apologies for that but it's:

Expected equality of these values:
  ceph_write(cmount, fd, out_buf.get(), BUFSIZE, 0)
    Which is: 2147483647
  READ_WRITE_LIMIT
    Which is: 2147479552

the test case tries to write BUFSIZE = static_cast<size_t>(3) * 1024 * 1024 * 1024 which would be capped to FSCRYPT_MAXIO_SIZE or INT_MAX but since it's windows it falls back to else directive:

#if defined(__linux__)
  /* We can't return bytes written larger than INT_MAX, clamp size to
   * that or FSCRYPT_MAXIO_SIZE*/
  Inode *in = fh->inode.get();
  if (in->is_fscrypt_enabled()) {
    size = std::min(size, (loff_t)FSCRYPT_MAXIO_SIZE);
  } else {
    size = std::min(size, (loff_t)INT_MAX);
  }
#else
  size = std::min(size, (loff_t)INT_MAX);  ////// <--------------------- this

i'm adding the guard #if defined(__linux__)

@dparmar18

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@dparmar18

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@dparmar18

Copy link
Copy Markdown
Contributor Author

@chrisphoffman all checks passed (finally!)

@chrisphoffman chrisphoffman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job! I'll rerun it through the next test run.

@chrisphoffman

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by choffman started 2026-08-06-18:43.

@chrisphoffman

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by choffman started 2026-08-11-17: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.

4 participants