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

client-go batch client batchSendLoop panic #47691

Closed
crazycs520 opened this issue Oct 17, 2023 · 3 comments
Closed

client-go batch client batchSendLoop panic #47691

crazycs520 opened this issue Oct 17, 2023 · 3 comments
Labels
affects-6.5 affects-7.1 affects-7.4 affects-7.5 priority/release-blocker This issue blocks a release. Please solve it ASAP. report/customer Customers have encountered this bug. severity/major sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@crazycs520
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

ref: tikv/client-go#1020

Panic stack log:

[2023/10/13 14:00:33.948 +08:00] [ERROR] [client_batch.go:303] [batchSendLoop] [r={}] [stack="[github.com/tikv/client-go/v2/internal/client.(*batchConn).batchSendLoop.func1](http://github.com/tikv/client-go/v2/internal/client.(*batchConn).batchSendLoop.func1)
	/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:305](http://github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:305)
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:884
runtime.goPanicIndex
	/usr/local/go/src/runtime/panic.go:113
[github.com/pingcap/kvproto/pkg/tikvpb.encodeVarintTikvpb](http://github.com/pingcap/kvproto/pkg/tikvpb.encodeVarintTikvpb)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:5438](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:5438)
[github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest_Request_Coprocessor).MarshalToSizedBuffer](http://github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest_Request_Coprocessor).MarshalToSizedBuffer)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:4325](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:4325)
[github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest_Request_Coprocessor).MarshalTo](http://github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest_Request_Coprocessor).MarshalTo)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:4313](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:4313)
[github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest_Request).MarshalToSizedBuffer](http://github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest_Request).MarshalToSizedBuffer)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3850](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3850)
[github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest).MarshalToSizedBuffer](http://github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest).MarshalToSizedBuffer)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3808](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3808)
[github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest).Marshal](http://github.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest).Marshal)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3766](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3766)
[google.golang.org/protobuf/internal/impl.legacyMarshal](http://google.golang.org/protobuf/internal/impl.legacyMarshal)
	/go/pkg/mod/[google.golang.org/[email protected]/internal/impl/legacy_message.go:402](http://google.golang.org/[email protected]/internal/impl/legacy_message.go:402)
[google.golang.org/protobuf/proto.MarshalOptions.marshal](http://google.golang.org/protobuf/proto.MarshalOptions.marshal)
	/go/pkg/mod/[google.golang.org/[email protected]/proto/encode.go:166](http://google.golang.org/[email protected]/proto/encode.go:166)
[google.golang.org/protobuf/proto.MarshalOptions.MarshalAppend](http://google.golang.org/protobuf/proto.MarshalOptions.MarshalAppend)
	/go/pkg/mod/[google.golang.org/[email protected]/proto/encode.go:125](http://google.golang.org/[email protected]/proto/encode.go:125)
[github.com/golang/protobuf/proto.marshalAppend](http://github.com/golang/protobuf/proto.marshalAppend)
	/go/pkg/mod/[github.com/golang/[email protected]/proto/wire.go:40](http://github.com/golang/[email protected]/proto/wire.go:40)
[github.com/golang/protobuf/proto.Marshal](http://github.com/golang/protobuf/proto.Marshal)
	/go/pkg/mod/[github.com/golang/[email protected]/proto/wire.go:23](http://github.com/golang/[email protected]/proto/wire.go:23)
[google.golang.org/grpc/encoding/proto.codec.Marshal](http://google.golang.org/grpc/encoding/proto.codec.Marshal)
	/go/pkg/mod/[google.golang.org/[email protected]/encoding/proto/proto.go:45](http://google.golang.org/[email protected]/encoding/proto/proto.go:45)
[google.golang.org/grpc.encode](http://google.golang.org/grpc.encode)
	/go/pkg/mod/[google.golang.org/[email protected]/rpc_util.go:595](http://google.golang.org/[email protected]/rpc_util.go:595)
[google.golang.org/grpc.prepareMsg](http://google.golang.org/grpc.prepareMsg)
	/go/pkg/mod/[google.golang.org/[email protected]/stream.go:1708](http://google.golang.org/[email protected]/stream.go:1708)
[google.golang.org/grpc.(*clientStream).SendMsg](http://google.golang.org/grpc.(*clientStream).SendMsg)
	/go/pkg/mod/[google.golang.org/[email protected]/stream.go:846](http://google.golang.org/[email protected]/stream.go:846)
[github.com/pingcap/kvproto/pkg/tikvpb.(*tikvBatchCommandsClient).Send](http://github.com/pingcap/kvproto/pkg/tikvpb.(*tikvBatchCommandsClient).Send)
	/go/pkg/mod/[github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:2068](http://github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:2068)
[github.com/tikv/client-go/v2/internal/client.(*batchCommandsClient).send](http://github.com/tikv/client-go/v2/internal/client.(*batchCommandsClient).send)
	/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:519](http://github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:519)
[github.com/tikv/client-go/v2/internal/client.(*batchConn).getClientAndSend](http://github.com/tikv/client-go/v2/internal/client.(*batchConn).getClientAndSend)
	/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:381](http://github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:381)
[github.com/tikv/client-go/v2/internal/client.(*batchConn).batchSendLoop](http://github.com/tikv/client-go/v2/internal/client.(*batchConn).batchSendLoop)
	/go/pkg/mod/[github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:344](http://github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:344)"]

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

v6.5.5

@crazycs520 crazycs520 added the type/bug The issue is confirmed as a bug. label Oct 17, 2023
@aytrack
Copy link
Contributor

aytrack commented Oct 17, 2023

/sig transaction
/severity major

@ti-chi-bot ti-chi-bot bot added sig/transaction SIG:Transaction severity/major may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 labels Oct 17, 2023
@crazycs520 crazycs520 added affects-7.4 affects-7.5 and removed may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-7.5 labels Oct 17, 2023
@crazycs520 crazycs520 added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label Oct 18, 2023
@cfzjywxk
Copy link
Contributor

cfzjywxk commented Nov 8, 2023

@crazycs520 Is it fixed on the master branch?

ti-chi-bot bot pushed a commit that referenced this issue Nov 22, 2023
@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.4 affects-7.5 priority/release-blocker This issue blocks a release. Please solve it ASAP. report/customer Customers have encountered this bug. severity/major sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants