Repository navigation
mgr/smb: fix sqlite3.InternalError crash on lost RADOS lock - #71094
Conversation
Config Diff Tool Output+ added: cephsqlite_inject_stat_error_probability (global.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
261f44a to
d3e89d4
Compare
batrick
left a comment
There was a problem hiding this comment.
Please break these into separate commits by component.
| if (blocklisted.load()) { | ||
| auto p = ((CephContext*)ioctx.cct())->_conf.get_val<double>( | ||
| "cephsqlite_inject_stat_error_probability"); | ||
| if (blocklisted.load() || rand() % 10000 < p * 10000.0) { |
There was a problem hiding this comment.
This rand is heavy. Only do it if cephsqlite_inject_stat_error_probability is non-zero.
d3e89d4 to
a734b23
Compare
Done. Thanks for the review! |
| desc: Probability that SimpleRADOSStriper::stat() fails with a fake I/O error, | ||
| for testing | ||
| default: 0 | ||
| with_legacy: true |
There was a problem hiding this comment.
with_legacy is discouraged for new configs
| if (p && rand() % 10000 < p * 10000.0) { | ||
| d(5) << "stat failed due to injected error" << dendl; | ||
| return -EIO; | ||
| } |
There was a problem hiding this comment.
this actually does not need to be done here, you can move the injection to libcephsqlite
There was a problem hiding this comment.
Done, moved it into libcephsqlite, but now we have to call get config each time. i don't think it's too bad, we are doing it for most of the configs.
a734b23 to
c109efa
Compare
…) failure FileSize() returned SQLITE_NOTFOUND instead of SQLITE_IOERR_FSTAT on a failed stat(), which Python's sqlite3 module can't map and surfaces as an unhandled sqlite3.InternalError, crashing the calling mgr module. Access() had the same gap, silently reporting an existing file as missing instead of returning an I/O error. Add cephsqlite_inject_stat_error_probability plus a regression test that exercises this deterministically. Fixes: https://tracker.ceph.com/issues/79526 Signed-off-by: Nitzan Mordechai <[email protected]> Assisted-by: IBM-Bob:ClaudeSonnet
db_ready() only caught MgrDBNotReady, so a raw sqlite3.DatabaseError from the db property still crashed the calling module. set_kv()/get_kv() had the same gap; give them the same @MgrModuleRecoverDB retry protection devicehealth already uses for its own db access. Fixes: https://tracker.ceph.com/issues/79526 Signed-off-by: Nitzan Mordechai <[email protected]> Assisted-by: IBM-Bob:ClaudeSonnet
…hing Wire the new fault injector into thrashosds-health.yaml at a low probability so teuthology suites with osd thrasher also add to ignorelist the expected log messages it can produce. Fixes: https://tracker.ceph.com/issues/79526 Signed-off-by: Nitzan Mordechai <[email protected]>
c109efa to
4960356
Compare
|
jenkins test make check arm64 |
|
/config check ok |
|
jenkins test make check arm64 |
|
This PR has been added to wip-bharath7-testing-20260824.015917-main. |
|
jenkins test make check arm64 |
FileSize() returned SQLITE_NOTFOUND instead of SQLITE_IOERR_FSTAT on a failed stat(), which Python's sqlite3 module can't map and surfaces as an unhandled sqlite3.InternalError, crashing the calling mgr module. Also harden db_ready() to catch sqlite3.DatabaseError, and add a probability-based fault injector plus thrash-suite coverage for it.
Fixes: https://tracker.ceph.com/issues/79526
Assisted-by: IBM-Bob:ClaudeSonnet
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.