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 a panic that occurs when grpc stream Recv() method returns an err… #4784

Merged
merged 1 commit into from Nov 18, 2022

Conversation

druvv
Copy link
Contributor

@druvv druvv commented Nov 14, 2022

…or before stream is closed

Stack trace from dolthubapi-asyncworker:

...
2022-11-11T20:01:12.919Z	ERROR	process/process.go:273	finished unary call with code Unknown	{"grpc.start_time": "2022-11-11T20:01:12Z", "grpc.request.deadline": "2022-11-11T20:11:12Z", "system": "grpc", "span.kind": "server", "grpc.service": "ld.services.dolthubapi.internal.v1alpha1.BountyService", "grpc.method": "ProcessMergeCommit", "request_id": "b947de69-f3d8-4b05-8d09-38cb2c11c326", "invocation_id": "01d9a1a2-0cc3-4619-b919-42a666a257d0", "error": "pq: duplicate key value violates unique constraint \"scoreboard_build_shards_pkey\"", "grpc.code": "Unknown", "grpc.time_ms": 102.431}
2022-11-11T20:01:12.920Z	INFO	request_logging/request_logging.go:21	beginning unary call	{"grpc.start_time": "2022-11-11T20:01:12Z", "grpc.request.deadline": "2022-11-11T20:01:13Z", "system": "grpc", "span.kind": "server", "grpc.service": "grpc.health.v1.Health", "grpc.method": "Check", "invocation_id": "a149d64f-e063-4f7b-ae40-a304bf86f50e"}
2022-11-11T20:01:12.920Z	INFO	process/process.go:273	finished unary call with code OK	{"grpc.start_time": "2022-11-11T20:01:12Z", "grpc.request.deadline": "2022-11-11T20:01:13Z", "system": "grpc", "span.kind": "server", "grpc.service": "grpc.health.v1.Health", "grpc.method": "Check", "invocation_id": "a149d64f-e063-4f7b-ae40-a304bf86f50e", "grpc.code": "OK", "grpc.time_ms": 0.124}
2022-11-11T20:01:12.922Z	INFO	zap/grpclogger.go:73	[transport]transport: loopyWriter.run returning. connection error: desc = "transport is closing"	{"system": "grpc", "grpc_log": true}
panic: runtime error: index out of range [1] with length 1

goroutine 2252120 [running]:
github.com/dolthub/dolt/go/libraries/doltcore/remotestorage.(*DoltChunkStore).getDLLocs.func2.2.2()
	external/com_github_dolthub_dolt_go/libraries/doltcore/remotestorage/chunk_store.go:603 +0x269
golang.org/x/sync/errgroup.(*Group).Go.func1()
	external/org_golang_x_sync/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	external/org_golang_x_sync/errgroup/errgroup.go:72 +0xa5

@druvv druvv requested a review from reltuk November 14, 2022 21:22
Copy link
Contributor

@reltuk reltuk left a comment

Choose a reason for hiding this comment

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

LGTM!

@druvv druvv merged commit 1956ca9 into main Nov 18, 2022
@Hydrocharged Hydrocharged deleted the dhruv/fix-remotesapi-panic branch February 23, 2023 20:19
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 this pull request may close these issues.

None yet

2 participants