-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
mds: relax certain asserts in mdlog replay thread #55639
Conversation
jenkins test make check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
so with this if the journaler turns unreadable by the time we hit this: Lines 1412 to 1417 in b11e6e2
then this will mean we |
I don't think so - it should enter the |
EDIT: are you seeing any other case when the above is not true @dparmar18 ? |
im trying to think of a case where we're stuck in this loop forever, i.e. readable at |
@
this seems to be almost impossible to hit, btw do you think we should log it if the read failure occured:
|
We can rely on the log messages from the retry. |
An explanation in the commit message (and PR intro comment) about why this fixes anything would be great. It looks like it's just straight-up dropping an assert and anything that modifies those kinds of invariants should always come with the logic around why. |
Sure! |
The calls to journaler->is_readable() and journaler->get_error() in MDLog::_replay_thread() will drop Journaler::lock between invocations, so, theoretically, its possible that the initial check: // loop int r = 0; while (1) { // wait for read? while (!journaler->is_readable() && journaler->get_read_pos() < journaler->get_write_pos() && !journaler->get_error()) { C_SaferCond readable_waiter; journaler->wait_for_readable(&readable_waiter); r = readable_waiter.wait(); } if (journaler->get_error()) { r = journaler->get_error(); dout(0) << "_replay journaler got error " << r << ", aborting" << dendl; journaler->is_readable() returned true, thereby breaking out of the (inner) while loop and by passing the journaler->get_error() check, and by the time this hits the next set of checks: if (!journaler->is_readable() && journaler->get_read_pos() == journaler->get_write_pos()) break; ceph_assert(journaler->is_readable() || mds->is_daemon_stopping()); It's possible that the journal is unreadable due to some error that happened during prefetch. In short, these checks are racy. So, remove these racy assert check along with journaler->is_readable() check when validating the journal end and rely on the next iteration of reading the journal for error handling. Fixes: http://tracker.ceph.com/issues/57048 Signed-off-by: Venky Shankar <vshankar@redhat.com>
fc8138f
to
90393de
Compare
Commit message fixed and updated. Please check @ceph/cephfs |
* refs/pull/55639/head: mds: relax certain asserts in mdlog replay thread Reviewed-by: Milind Changire <mchangir@redhat.com>
Reruning tests with #55909 and #55908 included. See - https://pulpito.ceph.com/vshankar-2024-03-04_08:26:39-fs-wip-vshankar-testing-20240304.042522-testing-default-smithi/ |
jenkins retest this please |
Fixes: http://tracker.ceph.com/issues/57048
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
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