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: uqo: OOM with st_collect #133337

Closed
cockroach-teamcity opened this issue Oct 24, 2024 · 5 comments · Fixed by #136270
Closed

roachtest: uqo: OOM with st_collect #133337

cockroach-teamcity opened this issue Oct 24, 2024 · 5 comments · Fixed by #136270
Assignees
Labels
B-runtime-assertions-enabled 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. O-rsg Random Syntax Generator P-3 Issues/test failures with no fix SLA T-sql-queries SQL Queries Team

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Oct 24, 2024

Note: This build has runtime assertions enabled. If the same failure was hit in a run without assertions enabled, there should be a similar failure without this message. If there isn't one, then this failure is likely due to an assertion violation or (assertion) timeout.

roachtest.unoptimized-query-oracle/disable-rules=half/rand-tables failed with artifacts on master @ 9c1d89e3adb8c6532459cc3e616288db06f966d9:

(query_comparison_util.go:419).runOneRoundQueryComparison: failed to set random seed. 1671 statements run: dial tcp 172.203.236.160:26257: connect: connection refused
test artifacts and logs in: /artifacts/unoptimized-query-oracle/disable-rules=half/rand-tables/run_1

Parameters:

  • ROACHTEST_arch=amd64
  • ROACHTEST_cloud=azure
  • ROACHTEST_coverageBuild=false
  • ROACHTEST_cpu=4
  • ROACHTEST_encrypted=false
  • ROACHTEST_runtimeAssertionsBuild=true
  • ROACHTEST_ssd=0
Help

See: roachtest README

See: How To Investigate (internal)

Grafana is not yet available for azure clusters

This test on roachdash | Improve this report!

Jira issue: CRDB-43547

@cockroach-teamcity cockroach-teamcity added B-runtime-assertions-enabled 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. O-rsg Random Syntax Generator 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 labels Oct 24, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Oct 24, 2024
@cockroach-teamcity

This comment was marked as off-topic.

@DrewKimball
Copy link
Collaborator

Screenshot 2024-11-12 at 12 51 59 PM

@DrewKimball DrewKimball added P-2 Issues/test failures with a fix SLA of 3 months and removed release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Nov 12, 2024
@DrewKimball
Copy link
Collaborator

Looks like we're processing some very large geometry values, leading to OOM.

@cockroach-teamcity

This comment was marked as off-topic.

@mw5h mw5h moved this from Triage to Backlog in SQL Queries Nov 15, 2024
@yuzefovich yuzefovich changed the title roachtest: unoptimized-query-oracle/disable-rules=half/rand-tables failed roachtest: uqo: OOM with large GEOMETRY Nov 26, 2024
@yuzefovich yuzefovich added P-3 Issues/test failures with no fix SLA and removed P-2 Issues/test failures with a fix SLA of 3 months labels Nov 26, 2024
@yuzefovich yuzefovich changed the title roachtest: uqo: OOM with large GEOMETRY roachtest: uqo: OOM with st_collect Nov 26, 2024
@yuzefovich
Copy link
Member

IIUC we first create very large geometry values via st_collect aggregate and then we sort them in the row-by-row engine which requires spilling to disk. The memory accounting of the aggregation phase should be pretty good (I last looked into this about a year ago in b441460), but we don't do a good job of accounting for memory use when spilling to disk (e.g. diskRowContainer.scratchKey can get very large, yet we don't track it) and when reading from disk via pebble.

I'll extract the second failure on this issue into a separate one.

@yuzefovich yuzefovich self-assigned this Nov 26, 2024
@yuzefovich yuzefovich moved this from Backlog to Active in SQL Queries Nov 26, 2024
craig bot pushed a commit that referenced this issue Nov 27, 2024
136271: storage: cap prefix slice reuse between Flushes r=yuzefovich a=yuzefovich

When using temporary storage, in `Put` we reuse the same byte slice by appending the new key to the unique prefix of the temporary storage. Previously, we would never reduce the capacity of the slice which could lead to us holding onto noticeable memory chunk (without accounting for it) if we happen to work with large keys. This commit improves the situation by ensuring that we don't keep the slice larger than 1MiB on every `Flush`.

Informs: #133337.
Epic: None

Release note: None

Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig craig bot closed this as completed in 5eec1c6 Dec 2, 2024
@github-project-automation github-project-automation bot moved this from Active to Done in SQL Queries Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-runtime-assertions-enabled 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. O-rsg Random Syntax Generator P-3 Issues/test failures with no fix SLA T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants