osql: don't send startgen with a zeroed rqid: fix for 'cldeadlock' test - #6175
Merged
Conversation
roborivers
suggested changes
Aug 28, 2026
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
ssl_san
sql_logfill_autodisable
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
osql_end() unregistered the session on the lock-desired restart path even when keep_rqid was set, zeroing the rqid the caller still needed, and the master-swing retry resent on an ended session. Keep the rqid when keep_rqid is set, and gate the resend on a live rqid. Signed-off-by: Mark Hannum <[email protected]>
markhannum
force-pushed
the
fix-osql-rqid-zero
branch
from
August 28, 2026 20:12
6b64173 to
b5590cb
Compare
WalidNejmi
approved these changes
Aug 28, 2026
WalidNejmi
left a comment
There was a problem hiding this comment.
very interesting to look over this code and good catch!
roborivers
suggested changes
Aug 29, 2026
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
reco-ddlk-sql **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two paths reach the master with
rqid0 after the session was unregistered:osql_sock_start_int()calledosql_end()on the bdb-lock-desired restart path even whenkeep_rqidwas set.osql_end()unregisters from the checkboard, which zeroesclnt->osql.rqid— butkeep_rqidmeans the caller is restarting this session and still needs it.osql_sock_restart()even when the restart had ended the session.cldeadlock produces both conditions: truncate-under-cursor takes
BDB_WRITELOCKsobdb_lock_desiredis true, and the downgrade loop swings the master every 20s.Keep the rqid when
keep_rqidis set, and gate the resend on a live rqid.Issue discovered by
cldeadlocktest.