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: race condition in TestRaftSSTableSideloadingSnapshot #29302

Closed
jordanlewis opened this issue Aug 29, 2018 · 2 comments · Fixed by #29341
Closed

storage: race condition in TestRaftSSTableSideloadingSnapshot #29302

jordanlewis opened this issue Aug 29, 2018 · 2 comments · Fixed by #29341
Assignees

Comments

@jordanlewis
Copy link
Member

https://teamcity.cockroachdb.com/viewLog.html?buildId=870129&buildTypeId=Cockroach_UnitTests_Testrace

==================
Write at 0x00c4200d4080 by goroutine 69:
  github.com/cockroachdb/cockroach/pkg/storage/engine.(*RocksDB).Close()
      /go/src/github.com/cockroachdb/cockroach/pkg/storage/engine/rocksdb.go:719 +0x297
  github.com/cockroachdb/cockroach/pkg/storage.TestRaftSSTableSideloadingSnapshot()
      /go/src/github.com/cockroachdb/cockroach/pkg/storage/replica_sideload_test.go:918 +0x84d
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:777 +0x16d

Previous read at 0x00c4200d4080 by goroutine 174:
  github.com/cockroachdb/cockroach/pkg/storage/engine.(*RocksDB).Iterate()
      /go/src/github.com/cockroachdb/cockroach/pkg/storage/engine/rocksdb.go:810 +0x57
  github.com/cockroachdb/cockroach/pkg/storage/compactor.(*Compactor).examineQueue()
      /go/src/github.com/cockroachdb/cockroach/pkg/storage/compactor/compactor.go:469 +0x234
  github.com/cockroachdb/cockroach/pkg/storage/compactor.(*Compactor).Start.func1.1()
      /go/src/github.com/cockroachdb/cockroach/pkg/storage/compactor/compactor.go:134 +0x3f9
  github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunWorker.func1()
      /go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:199 +0x14a

@tschottdorf, looks like this might have been modified recently by Victor, so bubbling up to you.

@petermattis
Copy link
Collaborator

This looks similar to #27232.

@tbg
Copy link
Member

tbg commented Aug 30, 2018

PR incoming.

tbg added a commit to tbg/cockroach that referenced this issue Aug 30, 2018
The test was stopping the engine before the stopper, so the compactor
was sometimes able to use the engine while it was being closed.

Fixes cockroachdb#29302.

Release note: None
tbg added a commit to tbg/cockroach that referenced this issue Aug 30, 2018
The test was stopping the engine before the stopper, so the compactor
was sometimes able to use the engine while it was being closed.

Fixes cockroachdb#29302.

Release note: None
craig bot pushed a commit that referenced this issue Aug 30, 2018
29244: sql: correctly handle NULL arrays in generator funcs r=mjibson a=mjibson

Change both unnest and _pg_expandarray to return UnknownReturnType if
passed NULL as their first argument during type checking. Teach the type
checker that if a func returns UnknownReturnType after type checking,
then it is because we didn't have enough information to generate a
correct type, and so should produce an error immediately. If these
funcs are passed a NULL array during execution (after type checking),
they should still succeed.

Also fix evalAndReplaceSubqueryVisitor to correctly type expressions
during subquery replacement which allows the previous change to work
both in local and distsql execution.

Fixes #29239 
Fixes #28561

Release note (bug fix): The functions `unnest` and `_pg_expandarray`
now return an error when called with NULL as their first argument.

29341: storage: remove test-only data race r=petermattis a=tschottdorf

The test was stopping the engine before the stopper, so the compactor
was sometimes able to use the engine while it was being closed.

Fixes #29302.

Release note: None

Co-authored-by: Matt Jibson <matt.jibson@gmail.com>
Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
@craig craig bot closed this as completed in #29341 Aug 30, 2018
tbg added a commit to tbg/cockroach that referenced this issue Aug 30, 2018
The test was stopping the engine before the stopper, so the compactor
was sometimes able to use the engine while it was being closed.

Fixes cockroachdb#29302.

Release note: None
craig bot pushed a commit that referenced this issue Aug 31, 2018
29390: backport-2.1: storage, roachtest, cli: assorted backports r=petermattis a=tschottdorf

storage: remove test-only data race

   The test was stopping the engine before the stopper, so the compactor was
   sometimes able to use the engine while it was being closed.

   Fixes #29302.

   roachtest: improve TestMonitor

   Add two more test cases about the exit status of the `monitor` invocation
   itself.

   roachtest: fix flake in TestMonitor

   Accidentally changed this in #29178.

   cli: add hex option to debug keys

   This was used in #29252 and I imagine I'll want to use it again whenever we
   see the consistency checker fail in the future.

   storage: skip TestClosedTimestampCanServe

   It won't be the first one I'm looking into.


Release note: None

Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants