newsql: don't send a postponed row that was never saved: cldeadlock fix - #6176
Merged
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:
sc_truncate [db unavailable at finish]
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
run_stmt() set postponed_write even when the postponing send_row() failed, so post_sqlite_processing() sent a row that was never saved and newsql_write_postponed_evbuffer() dereferenced a NULL appdata->postponed. Signed-off-by: Mark Hannum <[email protected]>
markhannum
force-pushed
the
fix-postponed-row-segv
branch
from
August 28, 2026 20:10
eba203a to
585f295
Compare
WalidNejmi
approved these changes
Aug 28, 2026
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:
sc_constraints
sc_constraints_logicalsc_generated
timepart_retro
unionpar_maxqueue
sc_resume
sc_resume_logicalsc_generated **quarantined**
sc_partial_datacopy
sc_partial_datacopy_logicalsc_generated **quarantined**
sc_datacopy_logicalsc_generated **quarantined**
sc_datacopy
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.
run_stmt()setpostponed_writeeven when the postponingsend_row()failed, sopost_sqlite_processing()went on to send a row that was never saved andnewsql_write_postponed_evbuffer()dereferenced a NULLappdata->postponed.Only set
postponed_writewhen the save succeeded, and NULL-check innewsql_send_postponed_row()as a backstop.Surfaced under cldeadlock. Rows are only postponed for a select replayed inside a transaction; which encode failure left
appdata->postponedNULL there is not confirmed. The fix holds regardless of which one fired.Issue discovered by the 'cldeadlock' test.