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

roachtest: multitenant/distsql/instances=20/bundle=off/timeout=0 failed #89720

Closed
cockroach-teamcity opened this issue Oct 11, 2022 · 2 comments · Fixed by #89905
Closed

roachtest: multitenant/distsql/instances=20/bundle=off/timeout=0 failed #89720

cockroach-teamcity opened this issue Oct 11, 2022 · 2 comments · Fixed by #89905
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Oct 11, 2022

roachtest.multitenant/distsql/instances=20/bundle=off/timeout=0 failed with artifacts on master @ 8a8855eaf1a34223523d7631600481f1c2577a96:

test artifacts and logs in: /artifacts/multitenant/distsql/instances=20/bundle=off/timeout=0/run_1
(test_runner.go:926).1: test panicked: runtime error: index out of range [-1]

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=4 , ROACHTEST_encrypted=false , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-20391

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Oct 11, 2022
@cockroach-teamcity cockroach-teamcity added this to the 22.2 milestone Oct 11, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Oct 11, 2022
@cucaroach cucaroach self-assigned this Oct 11, 2022
@cockroach-teamcity
Copy link
Member Author

roachtest.multitenant/distsql/instances=20/bundle=off/timeout=0 failed with artifacts on master @ d1962deb662c115ceec158a0c09d3f797eca3e71:

test artifacts and logs in: /artifacts/multitenant/distsql/instances=20/bundle=off/timeout=0/run_1
(test_runner.go:926).1: test panicked: runtime error: index out of range [-1]

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=4 , ROACHTEST_encrypted=false , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.multitenant/distsql/instances=20/bundle=off/timeout=0 failed with artifacts on master @ 4c2c7da2abef4875c44ade99fd4781c85be69637:

test artifacts and logs in: /artifacts/multitenant/distsql/instances=20/bundle=off/timeout=0/run_1
(test_runner.go:926).1: test panicked: runtime error: index out of range [-1]

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=4 , ROACHTEST_encrypted=false , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

craig bot pushed a commit that referenced this issue Oct 13, 2022
89874: cmdccl: remove `enc_utils` r=jbowens a=nicktrav

Remove an obsolete, broken command. The functionality has been superseded by #89095 and #89873.

Touches #89095.
Epic: None.
Release note: None.

89905: multitenant: fix failing distsql test r=cucaroach a=cucaroach

Test was erroneously expecting a bundle in the bundle=off config.

Fixes: #89720

Release note: None


89910: sql: `tree.ParseJSON` should not ignore trailing data r=miretskiy a=miretskiy

`tree.ParseJSON` uses `Decoder.More()` method to determine if the input contains trailing data.  The implementation made incorrect assumptions as to the reason why `Decoder.More()` allows input to contain `]` or `}` characters, even when JSON object has been consumed.

This PR fixes and comments those faulty assumptions, and fixes multiple existing tests that seemed to rely on those faulty assumptions.

In particular, prior to this PR, the following input would be allowed (i.e. extra end of object character `}`):
```
[email protected]:26257/movr> select '{"longKey1":"longValue1"}}'::jsonb;
            jsonb
------------------------------
  {"longKey1": "longValue1"}
(1 row)
```

But so would the following be allowed:
```
[email protected]:26257/movr> select '{"longKey1":"longValue1"}} should this data be ignored?'::jsonb;
            jsonb
------------------------------
  {"longKey1": "longValue1"}
(1 row)
```

So, the  issue is: if above conversion was executed to insert JSONB into the database, we would silently
truncate (corrupt) JSON input, and instead of returning an error, we would return success.

This behavior is wrong, and this PR fixes it so that an error is returned:
```
select '{"longKey1":"longValue1"}} should this data be ignored?'::jsonb;
ERROR: could not parse JSON: trailing characters after JSON document
SQLSTATE: 22P02
```

Release note (bug fix): Do not silently truncate trailing characters when attempting to convert corrupt JSON string input into JSONb.
Release note (backward-incompatible change): This change may be backward incompatible to the applications
that previously might have been able to insert corrupt JSON data, but now will receive an error.

Co-authored-by: Nick Travers <[email protected]>
Co-authored-by: Tommy Reilly <[email protected]>
Co-authored-by: Yevgeniy Miretskiy <[email protected]>
@craig craig bot closed this as completed in 437e82a Oct 13, 2022
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
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. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants