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

kv/kvserver: TestStoreSplitRangeLookupRace failed #75198

Closed
cockroach-teamcity opened this issue Jan 20, 2022 · 9 comments · Fixed by #75272
Closed

kv/kvserver: TestStoreSplitRangeLookupRace failed #75198

cockroach-teamcity opened this issue Jan 20, 2022 · 9 comments · Fixed by #75272
Assignees
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.

Comments

@cockroach-teamcity
Copy link
Member

kv/kvserver.TestStoreSplitRangeLookupRace failed with artifacts on master @ 506412ffdb6d0f6d4952d2599b81cb9294a123a1:

Fatal error:

panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest

Stack:

goroutine 54534400 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc015bd42d0, {0x539f838, 0xc0068979a0})
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:251 +0x94
panic({0x3c6bf40, 0xc01bfc14d0})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).divideAndSendBatchToRanges.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1233 +0x314
panic({0x3c6bf40, 0xc01bfc14d0})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc015bd42d0, {0x5383918, 0xc00a57d860})
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:251 +0x94
panic({0x3c6bf40, 0xc01bfc14d0})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store_send.go:95 +0x1ff
panic({0x3c6bf40, 0xc01bfc14d0})
	/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/cockroachdb/cockroach/pkg/kv/kvserver_test.TestStoreSplitRangeLookupRace.func1({_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, 0x0}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/client_split_test.go:3021 +0x170
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).sendWithRangeID(0xc0010e8a80, {0x5383918, 0xc01bfc1470}, 0x100000001, 0xc011e6e800)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:254 +0x629
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).Send(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:96
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store_send.go:190 +0x6c5
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Stores).Send(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/stores.go:191 +0x1e8
github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal.func1({0x5383918, 0xc00a57d860})
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:957 +0x26b
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr(0xc015bd42d0, {0x5383918, 0xc00a57d860}, {0xc002a27190, 0x1}, 0xc002a27198)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344 +0xdd
github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal(0xc0111ac000, {0x5383918, 0xc00a57d860}, {0x0}, 0xc013035b00)
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:945 +0x149
github.com/cockroachdb/cockroach/pkg/server.(*Node).Batch(0xc0111ac000, {0x5383918, 0xc00a57d800}, 0xc013035b00)
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:1014 +0x14b
github.com/cockroachdb/cockroach/pkg/rpc.internalClientAdapter.Batch(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/rpc/context.go:559
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*grpcTransport).sendBatch(_, {_, _}, _, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport.go:209 +0x15e
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*grpcTransport).SendNext(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport.go:191 +0x132
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).sendToReplicas(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1980 +0x11ee
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).sendPartialBatch(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1572 +0xce5
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).divideAndSendBatchToRanges(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1339 +0xfe5
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).Send(_, {_, _}, {{{0x16cbec82c4d7f653, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:798 +0x705
github.com/cockroachdb/cockroach/pkg/kv.lookupRangeRevScan({0x5383918, 0xc00be6e3f0}, {0x52ee0e0, 0xc0057ca000}, {0xc00d490780, 0x3c43de0, 0x7b7d9d0}, 0x1, 0xc002ce7598, 0x1, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:381 +0x6cd
github.com/cockroachdb/cockroach/pkg/kv.RangeLookup({0x5383918, 0xc00be6e3f0}, {0x52ee0e0, 0xc0057ca000}, {0xc00d490780, 0x6, 0x8}, 0x7, 0x3b22a00, 0x1)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:202 +0x3a7
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).RangeLookup(0xc0057ca000, {0x5383918, 0xc00be6e3f0}, {0xc00d490780, 0x6, 0x8}, 0x10)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:497 +0xaa
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).performRangeLookup(0xc013345c80, {0x53838e0, 0xc025a9d980}, {0xc00d490780, 0x6, 0x8}, 0x37)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:824 +0x2ac
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1.1.1({0x53838e0, 0xc025a9d980})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:672 +0x57
github.com/cockroachdb/cockroach/pkg/util/contextutil.RunWithTimeout({0x5383918, 0xc00be6e360}, {0x41b058e, 0xc}, 0x2540be400, 0xc002ce7c78)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/contextutil/context.go:91 +0xb4
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1.1({0x539f838, 0xc0068979a0})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:669 +0x22f
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr(0xc015bd42d0, {0x539f838, 0xc0068979a0}, {0x60de26, 0xc0021c21c8}, 0xc000065ed0)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344 +0xdd
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:657 +0x145
github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).doCall(0xc013345cc8, 0xc01ba8f310, {0xc01d14f310, 0xb}, 0xc02403a790)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:128 +0x43
created by github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).DoChan
	/go/src/github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:121 +0x306
Log preceding fatal error

=== RUN   TestStoreSplitRangeLookupRace
    test_log_scope.go:79: test logs captured to: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestStoreSplitRangeLookupRace3826463982
    test_log_scope.go:80: use -show-logs to present logs inline

Help

See also: How To Investigate a Go Test Failure (internal)
Parameters in this failure:

  • TAGS=deadlock

  • GOFLAGS=-parallel=2

/cc @cockroachdb/kv

This test on roachdash | Improve this report!

@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. labels Jan 20, 2022
@cockroach-teamcity
Copy link
Member Author

kv/kvserver.TestStoreSplitRangeLookupRace failed with artifacts on master @ 506412ffdb6d0f6d4952d2599b81cb9294a123a1:

Fatal error:

panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest

Stack:

goroutine 824981 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc008a302d0, {0x90c6418, 0xc00505d0a8})
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:251 +0xde
panic({0x5b21900, 0xc00d208c30})
	/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).divideAndSendBatchToRanges.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1233 +0x574
panic({0x5b21900, 0xc00d208c30})
	/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc008a302d0, {0x90aa4f8, 0xc00d208ae0})
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:251 +0xde
panic({0x5b21900, 0xc00d208c30})
	/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store_send.go:95 +0x5e8
panic({0x5b21900, 0xc00d208c30})
	/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/cockroachdb/cockroach/pkg/kv/kvserver_test.TestStoreSplitRangeLookupRace.func1({_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, 0x0}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/client_split_test.go:3021 +0x236
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).sendWithRangeID(0xc0035b5500, {0x90aa4f8, 0xc00d208b10}, 0x100000001, 0xc004fbeb00)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:254 +0x7f0
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).Send(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:96
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store_send.go:190 +0x855
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Stores).Send(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/stores.go:191 +0x248
github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal.func1({0x90aa4f8, 0xc00d208ae0})
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:957 +0x2fc
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr(0xc008a302d0, {0x90aa4f8, 0xc00d208ae0}, {0x0, 0x499865}, 0xc0051f9970)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344 +0x162
github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal(0xc00471a000, {0x90aa4f8, 0xc00d208ae0}, {0x58d38e}, 0xc004fbea00)
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:945 +0x20d
github.com/cockroachdb/cockroach/pkg/server.(*Node).Batch(0xc00471a000, {0x90aa4f8, 0xc00d208a50}, 0xc004fbea00)
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:1014 +0x21a
github.com/cockroachdb/cockroach/pkg/rpc.internalClientAdapter.Batch(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/rpc/context.go:559
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*grpcTransport).sendBatch(_, {_, _}, _, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport.go:209 +0x242
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*grpcTransport).SendNext(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport.go:191 +0x1ec
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.raceTransport.SendNext({{_, _}}, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x0, 0x0, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport_race.go:79 +0x2b0
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).sendToReplicas(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1980 +0x15f6
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).sendPartialBatch(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1572 +0xee8
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).divideAndSendBatchToRanges(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1339 +0x1812
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).Send(_, {_, _}, {{{0x16cbed940200e710, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:798 +0xa25
github.com/cockroachdb/cockroach/pkg/kv.lookupRangeRevScan({0x90aa4f8, 0xc00c8a4de0}, {0x901af60, 0xc005a84d80}, {0xc005f62fb8, 0x6, 0x8}, 0x1, 0x8, 0x1, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:381 +0x82d
github.com/cockroachdb/cockroach/pkg/kv.RangeLookup({0x90aa4f8, 0xc00c8a4de0}, {0x901af60, 0xc005a84d80}, {0xc005f62fb8, 0x6, 0x8}, 0x1, 0x8, 0x1)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:202 +0x3b2
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).RangeLookup(0xc005a84d80, {0x90aa4f8, 0xc00c8a4de0}, {0xc005f62fb8, 0x6, 0x8}, 0xe2)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:497 +0x112
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).performRangeLookup(0xc009829500, {0x90aa4c0, 0xc002522ea0}, {0xc005f62fb8, 0x6, 0x8}, 0x97)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:824 +0x3f7
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1.1.1({0x90aa4c0, 0xc002522ea0})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:672 +0xb8
github.com/cockroachdb/cockroach/pkg/util/contextutil.RunWithTimeout({0x90aa4f8, 0xc00c8a4d50}, {0x606cc07, 0xc}, 0x2540be400, 0xc002f1cb30)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/contextutil/context.go:91 +0xee
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1.1({0x90c6418, 0xc00505d0a8})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:669 +0x2c5
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr(0xc008a302d0, {0x90c6418, 0xc00505d0a8}, {0x12, 0x4a817c800}, 0xc002f1ce88)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344 +0x162
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:657 +0x1f7
github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).doCall(0xc009829550, 0xc007c46aa0, {0xc0071c2910, 0xb}, 0xc007c46a00)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:128 +0x68
created by github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).DoChan
	/go/src/github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:121 +0x59b
Log preceding fatal error

=== RUN   TestStoreSplitRangeLookupRace
    test_log_scope.go:79: test logs captured to: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestStoreSplitRangeLookupRace573257137
    test_log_scope.go:80: use -show-logs to present logs inline

Help

See also: How To Investigate a Go Test Failure (internal)
Parameters in this failure:

  • GOFLAGS=-race -parallel=2

This test on roachdash | Improve this report!

@tbg
Copy link
Member

tbg commented Jan 20, 2022

This

The test hasn't changed, are we now using reverse lookups in more places? cc @nvanbenschoten

@irfansharif
Copy link
Contributor

Repros pretty readily, could just bisect:

$ dev test pkg/kv/kvserver -f=TestStoreSplitRangeLookupRace -v --timeout 1m --stress
...
8 runs completed, 1 failures, over 2s
Target //pkg/kv/kvserver:kvserver_test up-to-date:
  _bazel/bin/pkg/kv/kvserver/kvserver_test_/kvserver_test
INFO: Elapsed time: 2.752s, Critical Path: 2.11s
INFO: 15 processes: 14 internal, 1 local.
INFO: Build completed, 1 test FAILED, 15 total actions
//pkg/kv/kvserver:kvserver_test                                          FAILED in 2.1s

@irfansharif
Copy link
Contributor

Don't even have to bisect, 365b4da is the gift that keeps on giving.

$ git co 365b4da8bd02c06ee59d2130a56dec74ffc9ce21~1
$ dev test pkg/kv/kvserver -f=TestStoreSplitRangeLookupRace -v --timeout 1m --stress
[ ... ]
513 runs completed, 0 failures, over 1m0s
SUCCESS
Target //pkg/kv/kvserver:kvserver_test up-to-date:
  _bazel/bin/pkg/kv/kvserver/kvserver_test_/kvserver_test
INFO: Elapsed time: 391.221s, Critical Path: 371.68s
INFO: 2736 processes: 2216 remote cache hit, 42 internal, 477 darwin-sandbox, 1 local.
INFO: Build completed successfully, 2736 total actions
//pkg/kv/kvserver:kvserver_test                                          PASSED in 60.8s


$ git co 365b4da8bd02c06ee59d2130a56dec74ffc9ce21
$ dev test pkg/kv/kvserver -f=TestStoreSplitRangeLookupRace -v --timeout 1m --stress
[...]
3 runs completed, 1 failures, over 3s
context canceled
FAIL
FAIL: //pkg/kv/kvserver:kvserver_test (see /private/var/tmp/_bazel_irfansharif/99e666e4e674209ecdb66b46371278df/execroot/cockroach/bazel-out/darwin-fastbuild/testlogs/pkg/kv/kvserver/kvserver_test/test.log)
Target //pkg/kv/kvserver:kvserver_test up-to-date:
  _bazel/bin/pkg/kv/kvserver/kvserver_test_/kvserver_test
INFO: Elapsed time: 136.697s, Critical Path: 135.72s
INFO: 457 processes: 375 remote cache hit, 25 internal, 56 darwin-sandbox, 1 local.
INFO: Build completed, 1 test FAILED, 457 total actions
//pkg/kv/kvserver:kvserver_test                                          FAILED in 3.6s

@cockroach-teamcity
Copy link
Member Author

kv/kvserver.TestStoreSplitRangeLookupRace failed with artifacts on master @ 58ceac139a7e83052171121b28026a7366f16f7e:

Fatal error:

panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest [recovered]
	panic: interface conversion: roachpb.Request is *roachpb.ReverseScanRequest, not *roachpb.ScanRequest

Stack:

goroutine 56155142 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc006b28630, {0x53b0d48, 0xc00a5853a0})
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:251 +0x94
panic({0x3c78c40, 0xc00782e930})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).divideAndSendBatchToRanges.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1233 +0x312
panic({0x3c78c40, 0xc00782e930})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).Recover(0xc006b28630, {0x5394db8, 0xc01c1be5d0})
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:251 +0x94
panic({0x3c78c40, 0xc00782e930})
	/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store_send.go:95 +0x1ff
panic({0x3c78c40, 0xc00782e930})
	/usr/local/go/src/runtime/panic.go:1047 +0x266
github.com/cockroachdb/cockroach/pkg/kv/kvserver_test.TestStoreSplitRangeLookupRace.func1({_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, 0x0}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/client_split_test.go:3021 +0x170
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).sendWithoutRangeID(0xc004c71500, {0x5394db8, 0xc01c1be600}, 0xc013473e00)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:263 +0x5aa
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Replica).Send(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/replica_send.go:96
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Store).Send(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/store_send.go:190 +0x61c
github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Stores).Send(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/stores.go:191 +0x1c8
github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal.func1({0x5394db8, 0xc01c1be5d0})
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:957 +0x24b
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr(0xc006b28630, {0x5394db8, 0xc01c1be5d0}, {0xc00a4b7160, 0x1}, 0xc00a4b7168)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344 +0xdd
github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal(0xc008c22000, {0x5394db8, 0xc01c1be5d0}, {0x0}, 0xc013473d00)
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:945 +0x149
github.com/cockroachdb/cockroach/pkg/server.(*Node).Batch(0xc008c22000, {0x5394db8, 0xc01c1be570}, 0xc013473d00)
	/go/src/github.com/cockroachdb/cockroach/pkg/server/node.go:1014 +0x14b
github.com/cockroachdb/cockroach/pkg/rpc.internalClientAdapter.Batch(...)
	/go/src/github.com/cockroachdb/cockroach/pkg/rpc/context.go:564
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*grpcTransport).sendBatch(_, {_, _}, _, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport.go:209 +0x15e
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*grpcTransport).SendNext(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x1, 0x1, 0x1, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/transport.go:191 +0x12b
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).sendToReplicas(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1977 +0x11af
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).sendPartialBatch(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1569 +0xce5
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).divideAndSendBatchToRanges(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...}, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:1339 +0xfe5
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).Send(_, {_, _}, {{{0x16cc3cbde0bbe346, 0x0, 0x0}, 0x0, {0x0, 0x0, 0x0, ...}, ...}, ...})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:798 +0x6e5
github.com/cockroachdb/cockroach/pkg/kv.lookupRangeRevScan({0x5394db8, 0xc001e10780}, {0x52ff360, 0xc019bec480}, {0xc02879cc18, 0x3c50a80, 0x7b94e70}, 0x1, 0xc0044f5598, 0x1, ...)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:381 +0x690
github.com/cockroachdb/cockroach/pkg/kv.RangeLookup({0x5394db8, 0xc001e10780}, {0x52ff360, 0xc019bec480}, {0xc02879cc18, 0x6, 0x8}, 0x7, 0x3b2f300, 0x1)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/range_lookup.go:202 +0x3a7
github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord.(*DistSender).RangeLookup(0xc019bec480, {0x5394db8, 0xc001e10780}, {0xc02879cc18, 0x6, 0x8}, 0x70)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go:497 +0xaa
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).performRangeLookup(0xc002e0b4a0, {0x5394d80, 0xc01a5266c0}, {0xc02879cc18, 0x6, 0x8}, 0x74)
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:824 +0x2ac
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1.1.1({0x5394d80, 0xc01a5266c0})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:672 +0x57
github.com/cockroachdb/cockroach/pkg/util/contextutil.RunWithTimeout({0x5394db8, 0xc001e106f0}, {0x41be469, 0xc}, 0x2540be400, 0xc0044f5c78)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/contextutil/context.go:91 +0xb4
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1.1({0x53b0d48, 0xc00a5853a0})
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:669 +0x22f
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr(0xc006b28630, {0x53b0d48, 0xc00a5853a0}, {0x611126, 0xc005f6bbc8}, 0xc00363ced0)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:344 +0xdd
github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache.(*RangeCache).tryLookup.func1()
	/go/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangecache/range_cache.go:657 +0x145
github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).doCall(0xc002e0b4e8, 0xc00198c870, {0xc01424dca0, 0xb}, 0xc010be1790)
	/go/src/github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:128 +0x43
created by github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight.(*Group).DoChan
	/go/src/github.com/cockroachdb/cockroach/pkg/util/syncutil/singleflight/singleflight.go:121 +0x306
Log preceding fatal error

=== RUN   TestStoreSplitRangeLookupRace
    test_log_scope.go:79: test logs captured to: /go/src/github.com/cockroachdb/cockroach/artifacts/logTestStoreSplitRangeLookupRace186802263
    test_log_scope.go:80: use -show-logs to present logs inline

Help

See also: How To Investigate a Go Test Failure (internal)
Parameters in this failure:

  • TAGS=deadlock

  • GOFLAGS=-parallel=2

This test on roachdash | Improve this report!

@irfansharif irfansharif self-assigned this Jan 21, 2022
@irfansharif
Copy link
Contributor

Looking.

@irfansharif
Copy link
Contributor

Is this just a faulty assertion? The testing helper we're using makes allowances for both kinds of requests:

// TestingIsRangeLookupRequest returns if the provided Request looks like a single
// RangeLookup scan. It can return false positives and should only be used in
// tests.
func TestingIsRangeLookupRequest(req roachpb.Request) bool {
switch req.(type) {
case *roachpb.ScanRequest:
case *roachpb.ReverseScanRequest:

Curious why we're seeing roachpb.ReverseScanRequests now, and not before.

@irfansharif
Copy link
Contributor

irfansharif commented Jan 21, 2022

Curious why we're seeing roachpb.ReverseScanRequests now, and not before.

Because of this perhaps?

619f395#diff-c06addbc3a4c309a2e688a1a66fb995ad5e8d598ad77cf9e0ff5835f43b0ce93R561-R576

Edit: No, just tried reverting it and still hitting the same.

@irfansharif
Copy link
Contributor

Looks like it's coming from here:

RequestHeader: roachpb.RequestHeaderFromSpan(revBounds.AsRawSpanWithNoLocals()),
})
if !TestingIsRangeLookup(ba) {

Adding a bit of logging and it appears to be because of new query executions we're now doing:

I220121 15:01:50.991868 751 kv/range_lookup.go:378  [n1,job=729766004360577025,intExec=validate-span-cfgs,range-lookup=/Table/47/1/"\x04tsd"] 56  xxx: added reverse scan component

if datums, err := k.ie.QueryRowEx(ctx, "validate-span-cfgs", txn,
sessiondata.InternalExecutorOverride{User: security.RootUserName()},
validationStmt, validationQueryArgs...,

I'm not sure we're doing anything out of the ordinary, just the test needs to be relaxed in expecting both kinds of request types. Sending a PR.

craig bot pushed a commit that referenced this issue Jan 21, 2022
75261: row: fetcher cleanup and improvements r=RaduBerinde a=RaduBerinde

#### rowenc: remove deprecated return from DecodeIndexKey

Release note: None

#### row: minor cleanup around foundNull

This moves around some code to make it clear that it's only relevant in
a specific case.

Release note: None

#### row: clean up ReadIndexKey

Renaming to DecodeIndexKey and removing return value which is no
longer useful.

Release note: None

#### row: more Fetcher cleanup

 - improve comment for `indexKey`;
 - unexport NextKey;
 - slightly change the return value of nextKey to simplify the logic
   (the semantic difference is what the first call returns, which is
   not used);
 - use numKeysPerRow instead of counting the total families; this
   enables the faster paths for more cases.

Release note: None


75272: kvserver: de-flake TestStoreSplitRangeLookupRace r=irfansharif a=irfansharif

Fixes #75198. This test was a bit brittle in expecting only one kind of
range lookup request in a testing filter -- it was always possible to
intercept a ReverseScanRequest, and after enabling span configs
(#73876), we now have an internal query ("validate-span-cfgs") that
makes use of it. See #75198 for more details.

Release note: None

75281: sql: disable span-config on flakey 5node tests r=cucaroach a=cucaroach

Temporary fix for #72802 and 5node/distsql_enum CI failures.

Due to #73876 these tests have become flakey.
With the disable-span-configs option 70 runs of make stress on the opt logic tests pass.

Release note: None


Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: irfan sharif <[email protected]>
Co-authored-by: Tommy Reilly <[email protected]>
@craig craig bot closed this as completed in 38a65a9 Jan 22, 2022
gtr pushed a commit to gtr/cockroach that referenced this issue Jan 24, 2022
Fixes cockroachdb#75198. This test was a bit brittle in expecting only one kind of
range lookup request in a testing filter -- it was always possible to
intercept a ReverseScanRequest, and after enabling span configs
(cockroachdb#73876), we now have an internal query ("validate-span-cfgs") that
makes use of it. See cockroachdb#75198 for more details.

Release note: None
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants