Skip to content
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

sql: add randomized testing for gist decoding #117634

Closed
rytaft opened this issue Jan 10, 2024 · 2 comments · Fixed by #122864
Closed

sql: add randomized testing for gist decoding #117634

rytaft opened this issue Jan 10, 2024 · 2 comments · Fixed by #122864
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) E-quick-win Likely to be a quick win for someone experienced. P-2 Issues/test failures with a fix SLA of 3 months T-sql-queries SQL Queries Team

Comments

@rytaft
Copy link
Collaborator

rytaft commented Jan 10, 2024

Is your feature request related to a problem? Please describe.
We have found that there are cases where decoding a gist can cause panics when the encoded format doesn't exactly match what is expected by the code. For example, see #113900. This is especially likely when decoding a gist that was encoded by a different version of CockroachDB.

The DB console performs gist decoding of sampled queries, making it likely that a customer might run into this issue in production.

Describe the solution you'd like
We'd like to discover cases where gist decoding can cause panics so they can be fixed before customers run into them in production. One idea is to randomly generate queries using sqlsmith, encode them as a gist, and then make sure they can be decoded without a panic. We could also write this as a mixed version roach test.

Jira issue: CRDB-35283

@rytaft rytaft added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jan 10, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Jan 10, 2024
@yuzefovich yuzefovich added T-sql-queries SQL Queries Team E-quick-win Likely to be a quick win for someone experienced. P-2 Issues/test failures with a fix SLA of 3 months labels Jan 16, 2024
@yuzefovich yuzefovich self-assigned this Jan 16, 2024
@yuzefovich yuzefovich moved this from Triage to 24.1 Release in SQL Queries Jan 16, 2024
@mgartner
Copy link
Collaborator

@yuzefovich are you still planning on doing this during 24.1 stability, or should we push to the backlog or 24.2?

@yuzefovich
Copy link
Member

I still plan to do it during the stability period.

@yuzefovich yuzefovich moved this from 24.1 Release to Active in SQL Queries Apr 22, 2024
@craig craig bot closed this as completed in a7aad51 May 20, 2024
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) E-quick-win Likely to be a quick win for someone experienced. P-2 Issues/test failures with a fix SLA of 3 months T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants