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

storage: TestEngineKeyValidate failed #109919

Closed
cockroach-teamcity opened this issue Sep 1, 2023 · 7 comments · Fixed by #110122
Closed

storage: TestEngineKeyValidate failed #109919

cockroach-teamcity opened this issue Sep 1, 2023 · 7 comments · Fixed by #110122
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. sync-me T-storage Storage Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Sep 1, 2023

storage.TestEngineKeyValidate failed with artifacts on master @ d9c137d7883892e354b767b299bd383576d2a542:

=== RUN   TestEngineKeyValidate
--- FAIL: TestEngineKeyValidate (0.02s)
=== RUN   TestEngineKeyValidate/randomized
    --- FAIL: TestEngineKeyValidate/randomized (0.01s)
=== RUN   TestEngineKeyValidate/randomized/LockTableKey
    engine_key_test.go:304: 
        	Error Trace:	github.com/cockroachdb/cockroach/pkg/storage/engine_key_test.go:304
        	Error:      	Not equal: 
        	            	expected: 0
        	            	actual  : 1
        	Test:       	TestEngineKeyValidate/randomized/LockTableKey
        --- FAIL: TestEngineKeyValidate/randomized/LockTableKey (0.01s)

Parameters: TAGS=bazel,gss , stress=true

Help

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

/cc @cockroachdb/storage

This test on roachdash | Improve this report!

Jira issue: CRDB-31155

@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. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-storage Storage Team labels Sep 1, 2023
@cockroach-teamcity cockroach-teamcity added this to the 23.2 milestone Sep 1, 2023
@jbowens
Copy link
Collaborator

jbowens commented Sep 1, 2023

Failed here with an allocation during EngineKey.Validate:

require.Equal(t, 0.0, testing.AllocsPerRun(1, func() {
_ = ek.Validate()
}))

@arulajmani, @nvanbenschoten is it possible we introduced an allocation during parsing of the new lock strengths?

@jbowens
Copy link
Collaborator

jbowens commented Sep 1, 2023

is it possible we introduced an allocation during parsing of the new lock strengths?

Doesn't look like it. This was probably always flaky, just rarely so.

@jbowens jbowens removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Sep 1, 2023
@RaduBerinde
Copy link
Member

Why would we do only 1 run (first arg to AllocsPerRun) instead of averaging over say 1000?

@jbowens
Copy link
Collaborator

jbowens commented Sep 6, 2023

The expectation was that it would never allocate. I'm unsure where this one allocation is originating.

@nvanbenschoten
Copy link
Member

I'm unable to reproduce as well.

@RaduBerinde
Copy link
Member

RaduBerinde commented Sep 6, 2023

It could be any background task, perhaps in the runtime or in the testing package itself.. Averaging over many runs would "erase" this kind of blip.

@nvanbenschoten
Copy link
Member

I left this running under stress and eventually hit the failure:

--- FAIL: TestEngineKeyValidate (0.24s)
    --- FAIL: TestEngineKeyValidate/"a"/0,0 (0.00s)
        engine_key_test.go:274:
            	Error Trace:	github.com/cockroachdb/cockroach/pkg/storage/engine_key_test.go:274
            	Error:      	Not equal:
            	            	expected: 0
            	            	actual  : 1
            	Test:       	TestEngineKeyValidate/"a"/0,0

Notice that this was not TestEngineKeyValidate/randomized/LockTableKey, so it isn't specific to lock table keys.

craig bot pushed a commit that referenced this issue Sep 6, 2023
108973: roachtest: allow local execution of tests that need gs fixtures r=yuzefovich a=yuzefovich

We recently (in a2ba442) skipped running some tests that need gs fixtures when ran not on gce cloud. However, I think it should be ok to run these tests locally too.

Epic: None

Release note: None

109514: upgrade: retry errors when dialing instances r=ajstorm a=healthy-pod

Release note: None
Epic: none
Closes #108860

110068: sql: change ordering of (re)creating secondary indexes in ALTER PK r=Xiang-Gu a=Xiang-Gu

If we alter the primary key on a table with secondary indexes, we will recreate those secondary indexes as well as creating a new unique secondary index on the old primary key column(s). Previously, in the legacy schema changer, we'd create the new unique secondary index first and then recreate all existing secondary indexes. This is different from how declarative schema changer processes ALTER PK, in which the ordering is the opposite. This is not an issue per se; the only time it shows a difference is when you inspect the table after altering PK via, say, `SHOW CREATE t`, where you'd then observe a slightly different ordering of the indexes. This is actually easier to change the legacy schema changer so both schema changer would produce the same ordering of secondary indexes after an ALTER PK. This will help clean several test cases.

Epic: None
Release note: None

110122: storage: deflake TestEngineKeyValidate r=RaduBerinde a=jbowens

Average the allocs across many runs to avoid flakes from a single alloc (perhaps from the runtime or testing package?).

Epic: None
Fixes #109919.
Release note: none

Co-authored-by: Yahor Yuzefovich <[email protected]>
Co-authored-by: healthy-pod <[email protected]>
Co-authored-by: Xiang Gu <[email protected]>
Co-authored-by: Jackson Owens <[email protected]>
@craig craig bot closed this as completed in 114c01b Sep 6, 2023
@jbowens jbowens moved this to Done in [Deprecated] Storage Jun 4, 2024
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-robot Originated from a bot. sync-me T-storage Storage Team
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants