Repository navigation
[AIPROFVIS-468] Report failed or interrupted SQLite scans instead of returning partial data as success - #1228
Open
dhingora-amd wants to merge 1 commit into
Open
dhingora-amd wants to merge 1 commit into
dhingora-amd wants to merge 1 commit into
Conversation
…returning partial data as success
dhingora-amd
requested review from
drchen-amd,
tomk-amd and
vstempen
as code owners
November 27, 2026 19:43
dhingora-amd
temporarily deployed
to
legacy-nightly
November 27, 2026 19:43 — with
GitHub Actions
Inactive
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
This branch was previously deployed
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.
Motivation
Sqlite3Execstepped rows withwhile(sqlite3_step(stmt) == SQLITE_ROW)and returned the result ofsqlite3_prepare_v2, discarding the codes fromsqlite3_stepandsqlite3_finalize. A scan that stopped early (SQLITE_INTERRUPTfrom a cancel, orSQLITE_CORRUPT,SQLITE_IOERR,SQLITE_BUSY,SQLITE_NOMEM) therefore reported success. Slices, tables, level tables and histograms were built from partial data with no error shown, and some of them were saved into the trace's cache tables, so the gaps survived a reopen.Technical Details
Sqlite3Execkeeps the lastsqlite3_stepresult. If the loop ends with anything other thanSQLITE_DONE, that code is returned. A callback that stops the loop on purpose still returns its own code, as before.sqlite3_finalizeis returned when nothing earlier failed.ExecuteSQLQuerymapsSQLITE_INTERRUPTtokRocProfVisDmResultDbAbort, the same asSQLITE_ABORT, so a cancel is reported as a cancel rather than as a database error.datamodel-system-testsontrace_70b_1024_32.rpd(1099 assertions) androcpd-transpose.db(561 assertions), anddatamodel-compute-testsonrocprof_compute_23ed6f36.db. All pass, with the same results as onmain.linux-releaseand opened the RPD sample in the app.