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

fix(bttest): fix race condition in SampleRowKeys #4207

Merged
merged 2 commits into from Jun 3, 2021

Conversation

coryan
Copy link
Member

@coryan coryan commented Jun 2, 2021

Fixes #2600.

After this change running go test -race . passes cleanly. Before this change running with go test -race I got:

==================
WARNING: DATA RACE
Write at 0x00c001112b98 by goroutine 243:
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x7b1
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Previous read at 0x00c001112b98 by goroutine 237:
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1222 +0x21d
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000517810 by goroutine 237:
  github.com/google/btree.(*BTree).Get()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:819 +0x248
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1222 +0x20d
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c000517810 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:136 +0x6e4
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000517fd0 by goroutine 237:
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:687 +0x74
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c000517fd0 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:136 +0x6e4
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000517fd8 by goroutine 237:
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:688 +0x7bd
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c000517fd8 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:136 +0x6e4
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c00050e3b0 by goroutine 237:
  github.com/google/btree.(*copyOnWriteContext).newNode()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:646 +0x7dc
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:688 +0x7b1
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c00050e3b0 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:138 +0x747
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Write at 0x00c000517fa0 by goroutine 237:
  sync/atomic.CompareAndSwapInt32()
      /usr/lib/google-golang/src/runtime/race_amd64.s:321 +0xb
  sync.(*Mutex).Lock()
      /usr/lib/google-golang/src/sync/mutex.go:74 +0x4d
  github.com/google/btree.(*FreeList).newNode()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:93 +0x3e
  github.com/google/btree.(*copyOnWriteContext).newNode()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:646 +0x7f0
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:688 +0x7b1
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c000517fa0 by goroutine 243:
  github.com/google/btree.NewFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:89 +0x644
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x5dd
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000517fa8 by goroutine 237:
  github.com/google/btree.(*FreeList).newNode()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:94 +0x55
  github.com/google/btree.(*copyOnWriteContext).newNode()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:646 +0x7f0
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:688 +0x7b1
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c000517fa8 by goroutine 243:
  github.com/google/btree.NewFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:89 +0x644
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x5dd
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000517fc8 by goroutine 237:
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:690 +0x996
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c000517fc8 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:136 +0x6e4
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c0005ac470 by goroutine 237:
  github.com/google/btree.(*BTree).Get()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:819 +0x144
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1213 +0xfd
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c0005ac470 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:136 +0x6e4
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c00026de20 by goroutine 237:
  github.com/google/btree.(*BTree).maxItems()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:636 +0x177
  github.com/google/btree.(*BTree).ReplaceOrInsert()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:694 +0x126
  cloud.google.com/go/bigtable/bttest.(*table).mutableRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:1227 +0x3c4
  cloud.google.com/go/bigtable/bttest.(*server).MutateRow()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:795 +0x1bd
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func1()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:307 +0x564
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func2()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:316 +0x51

Previous write at 0x00c00026de20 by goroutine 243:
  github.com/google/btree.NewWithFreeList()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:136 +0x6e4
  github.com/google/btree.New()
      /usr/local/google/home/coryan/go/pkg/mod/github.com/google/btree@v1.0.1/btree.go:128 +0x6b6
  cloud.google.com/go/bigtable/bttest.(*server).DropRowRange()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem.go:264 +0x793
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent.func3()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:331 +0x14c

Goroutine 237 (running) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:315 +0x5f0
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202

Goroutine 243 (finished) created at:
  cloud.google.com/go/bigtable/bttest.TestTableRowsConcurrent()
      /usr/local/google/home/coryan/go-develop/bigtable/bttest/inmem_test.go:325 +0x664
  testing.tRunner()
      /usr/lib/google-golang/src/testing/testing.go:1193 +0x202
==================
--- FAIL: TestTableRowsConcurrent (0.04s)
    testing.go:1092: race detected during execution of test
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "[": error parsing regexp: missing closing ]: `[)$`
2021/06/02 23:05:42 Bad pattern "a\\xC.+": error parsing regexp: invalid escape sequence: `\xC.`
FAIL
FAIL	cloud.google.com/go/bigtable/bttest	0.269s
FAIL

@coryan coryan requested review from crwilcox, kolea2, tritone and a team as code owners June 2, 2021 23:08
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 2, 2021
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice test, thanks @coryan ! @kolea2 or @crwilcox could you take a look as well?

bigtable/bttest/inmem_test.go Outdated Show resolved Hide resolved
@coryan coryan force-pushed the fix-crashes-in-sample-row-keys branch from 9dd3c8a to 2ef7b85 Compare June 3, 2021 14:34
@coryan
Copy link
Member Author

coryan commented Jun 3, 2021

Thanks for the reviews. In case you do not know: I cannot merge into this repo, I cannot set the automerge tag either, I will need help to get this actually merged.

@tritone tritone added the automerge Merge the pull request once unit tests and other checks pass. label Jun 3, 2021
@tritone tritone merged commit 5711fb1 into googleapis:master Jun 3, 2021
@coryan coryan deleted the fix-crashes-in-sample-row-keys branch June 3, 2021 15:01
@coryan
Copy link
Member Author

coryan commented Jun 3, 2021

@tritone thanks for merging the code 🎉

Do we need to take some action to get a new version of the emulator included in a future gcloud release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bigtable: emulator crashes with concurrent operations
3 participants