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/tests: TestRandomSyntaxFunctions failed [index out of range in decode_external_plan_gist] #109560

Closed
cockroach-teamcity opened this issue Aug 27, 2023 · 3 comments · Fixed by #109627 or mohini-crl/cockroach#65
Assignees
Labels
branch-master Failures and bugs on the master branch. branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. O-rsg Random Syntax Generator T-sql-queries SQL Queries Team X-noreuse Prevent automatic commenting from CI test failures
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Aug 27, 2023

sql/tests.TestRandomSyntaxFunctions failed with artifacts on master @ 0a895777f13e48209c8cd23f1b304d33f7e1cea1:

Random syntax error:

    rsg_test.go:887: Crash detected: server panic: pq: internal error: runtime error: index out of range [-1]

Query:

        SELECT crdb_internal.decode_external_plan_gist('Ag8f':::STRING) ;
Help

See also: How To Investigate a Go Test Failure (internal)

Same failure on other branches

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-30987

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Aug 27, 2023
@cockroach-teamcity cockroach-teamcity added this to the 23.2 milestone Aug 27, 2023
@cockroach-teamcity
Copy link
Member Author

sql/tests.TestRandomSyntaxFunctions failed with artifacts on master @ a900aa218054812b782c0b3d130b25296c0d14e3:

Random syntax error:

    rsg_test.go:887: Crash detected: server panic: pq: internal error: 9 trailing bytes in encoded value: [4 191 191 4 128 160 0 0 0]

Query:

        SELECT array_cat_agg(ARRAY[(416644234484367676:::INT8,),(NULL,),((-0.12116245180368423):::FLOAT8,)]) ;
Help

See also: How To Investigate a Go Test Failure (internal)

Same failure on other branches

This test on roachdash | Improve this report!

@rafiss rafiss changed the title sql/tests: TestRandomSyntaxFunctions failed sql/tests: TestRandomSyntaxFunctions failed [index out of range in decode_external_plan_gist] Aug 28, 2023
@rafiss rafiss added O-rsg Random Syntax Generator T-sql-queries SQL Queries Team X-noreuse Prevent automatic commenting from CI test failures and removed T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Aug 28, 2023
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Aug 28, 2023
@mgartner mgartner self-assigned this Aug 28, 2023
@mgartner
Copy link
Collaborator

I created #109629 to track the last issue found, which is separate from the original.

@msirek msirek moved this from Triage to Active in SQL Queries Aug 29, 2023
craig bot pushed a commit that referenced this issue Aug 29, 2023
109316: asim: add assertion, mutation-assertion events r=kvoli a=wenyihu6

Previously, the simulator relied on test code to create functions to be called
for delayed events. As we want to introduce more dynamic events through the
randomized testing framework, this approach becomes increasingly complex and
error-prone. In addition, we want to introduce new event types, such as
assertion events and mutation-assertion events to validate the simulation’s
state and verify the effects of prior mutation events.

To achieve these goals, the following changes were made in this patch:
1. Instead of directly adding functions to be invoked to simulator’s
delayEventList, events are now organized into different struct
(`SetSpanConfigEvent`, `AddNodeEvent`, `SetNodeLivenessEvent`, and
`SetCapacityOverrideEvent`). Each struct is equipped to generate its
corresponding function which can be called externally for event execution. These
events can be scheduled with `StaticEvents` using `ScheduleEvent` method with
just the required parameters.
2. `AssertionEvent` struct can now be used to schedule assertion events as part
of the simulation using `ScheduleEvent`.
3. `MutationWithAssertionEvent` can also be used now to schedule mutation events
coupled with subsequent assertion events using the
`ScheduleMutationWithAssertionEvent` method.

Under the hood, these events all implement the event interface. This interface
outlines
1. Func() returns a function that can be called externally.
2. String() returns a formatted output string. To accommodate varying function
types returned by `Func()`, we introduced another interface for different
function types to be used as an event func.

When event executor executes these events at their scheduled time, it retrieves
the functions calling Func() and calls them with the simulator's current state
and history.

Part of: #106192
Release note: none

109381: sqlstats: unskip tests hitting combinedstmts and stmts endpoints r=gtr a=gtr

Fixes: #109184.

Previously, tests which hit the `combinedstmts` and `statements`
endpoints were skipped under stress because they would occaisonally
fail. This commit unskips these tests and instead of unmarshalling the
metadata JSON blob, the select query directly extracts the values needed
from it.

Release note: None

109627: opt: fix bugs in plan gist decoding r=mgartner a=mgartner

#### opt: fix plan gist decoding of inverted filters

Details about inverted filter nodes are not encoded in plan gists. The
plan gist decoder incorrectly assumed there were some details encoded,
and would raise an internal error whenever decoding a plan gist with an
inverted filter. This commit fixes the incorrect assumption to prevent
the internal error.

Fixes #108979

There is no release not because plan gists are an undocumented feature.

Release note: None

#### opt: fix plan gist decoding internal error

This commit fixes some cases where `crdb_internal.decode_plan_gist`
could raise internal index-out-of-bound errors when given incorrectly
formed input.

Fixes #109560

Release note: None


Co-authored-by: wenyihu6 <[email protected]>
Co-authored-by: gtr <[email protected]>
Co-authored-by: Marcus Gartner <[email protected]>
@craig craig bot closed this as completed in a561201 Aug 29, 2023
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries Aug 29, 2023
Copy link

blathers-crl bot commented Oct 29, 2024

Based on the specified backports for linked PR #109627, I applied the following new label(s) to this issue: branch-release-23.1. Please adjust the labels as needed to match the branches actually affected by this issue, including adding any known older branches.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added the branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 label Oct 29, 2024
blathers-crl bot pushed a commit that referenced this issue Oct 29, 2024
This commit fixes some cases where `crdb_internal.decode_plan_gist`
could raise internal index-out-of-bound errors when given incorrectly
formed input.

Fixes #109560

Release note: None
mohini-crl pushed a commit to mohini-crl/cockroach that referenced this issue Dec 19, 2024
This commit fixes some cases where `crdb_internal.decode_plan_gist`
could raise internal index-out-of-bound errors when given incorrectly
formed input.

Fixes cockroachdb#109560

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. branch-release-23.1 Used to mark GA and release blockers, technical advisories, and bugs for 23.1 C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. O-rsg Random Syntax Generator T-sql-queries SQL Queries Team X-noreuse Prevent automatic commenting from CI test failures
Projects
Archived in project
Archived in project
3 participants