-
Notifications
You must be signed in to change notification settings - Fork 18k
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
context: panic in parentCancelCtx when context timeout #64307
Comments
Please fill out the complete issue template. What is the surrounding code that creates the If possible, provide a runnable example using https://go.dev/play/. |
I have added more details into the section
|
Somehow the context is becoming corrupted. Any uses of |
I see no uses of |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. It panics in version 1.21 too.
What operating system and processor architecture are you using (
go env
)?uname -a
OutputWhat did you do?
The service is a typical tcp RPC service.
In my business handler, I will copy the context passed from the RPC handler or the redo machine, pass it to rpc calling function both in sync or async ways. It panic in our production environment occasionally, and I haven't found the actual path. But as
NewThsContext
creates a new context from the background, the panic no longer happens.Here is the function I used to copy the context.
The context is passed by a lot of paths, I haven't found the path causing the panic.
Paths mainly include
1. RPC timeout context passed to the business handler
2. Redo timeout context
The default redo context is created in function
New
.What did you expect to see?
What did you see instead?
Here is the stack dumped in version 1.17.3 lately:
Both in go version 1.17.3 and 1.21, our services run in linux vm and container panic in
parent.Done()
in context/context.goThe text was updated successfully, but these errors were encountered: