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/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:305](http://github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:5438](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:4325](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:4313](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:3850](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:3808](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:3766](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/protobuf@v1.28.1/internal/impl/legacy_message.go:402](http://google.golang.org/protobuf@v1.28.1/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/protobuf@v1.28.1/proto/encode.go:166](http://google.golang.org/protobuf@v1.28.1/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/protobuf@v1.28.1/proto/encode.go:125](http://google.golang.org/protobuf@v1.28.1/proto/encode.go:125)
[github.com/golang/protobuf/proto.marshalAppend](http://github.com/golang/protobuf/proto.marshalAppend)
	/go/pkg/mod/[github.com/golang/protobuf@v1.5.2/proto/wire.go:40](http://github.com/golang/protobuf@v1.5.2/proto/wire.go:40)
[github.com/golang/protobuf/proto.Marshal](http://github.com/golang/protobuf/proto.Marshal)
	/go/pkg/mod/[github.com/golang/protobuf@v1.5.2/proto/wire.go:23](http://github.com/golang/protobuf@v1.5.2/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/grpc@v1.51.0/encoding/proto/proto.go:45](http://google.golang.org/grpc@v1.51.0/encoding/proto/proto.go:45)
[google.golang.org/grpc.encode](http://google.golang.org/grpc.encode)
	/go/pkg/mod/[google.golang.org/grpc@v1.51.0/rpc_util.go:595](http://google.golang.org/grpc@v1.51.0/rpc_util.go:595)
[google.golang.org/grpc.prepareMsg](http://google.golang.org/grpc.prepareMsg)
	/go/pkg/mod/[google.golang.org/grpc@v1.51.0/stream.go:1708](http://google.golang.org/grpc@v1.51.0/stream.go:1708)
[google.golang.org/grpc.(*clientStream).SendMsg](http://google.golang.org/grpc.(*clientStream).SendMsg)
	/go/pkg/mod/[google.golang.org/grpc@v1.51.0/stream.go:846](http://google.golang.org/grpc@v1.51.0/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/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:2068](http://github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/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/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:519](http://github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/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/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:381](http://github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/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/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:344](http://github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/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