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

runtime: line-buffer goroutine dump output? #32002

Open
bradfitz opened this issue May 13, 2019 · 1 comment

Comments

@bradfitz
Copy link
Member

commented May 13, 2019

In #31986, the user's bug report reports a stack dump that's oddly formatted:

panic: 
api_1  | 15:58:21 app         | interface conversion: http.http2Frame is *http.http2UnknownFrame, not *http.http2HeadersFrame
api_1  | 15:58:21 app         | 
api_1  | 15:58:21 app         | 	
api_1  | 15:58:21 app         | panic: 
api_1  | 15:58:21 app         | err must be non-nil
api_1  | 15:58:21 app         | 
api_1  | 15:58:21 app         | 
api_1  | 15:58:21 app         | goroutine 
api_1  | 15:58:21 app         | 32
api_1  | 15:58:21 app         |  [
api_1  | 15:58:21 app         | running
api_1  | 15:58:21 app         | ]:
api_1  | 15:58:21 app         | panic
api_1  | 15:58:21 app         | (
api_1  | 15:58:21 app         | 0x9e0580
api_1  | 15:58:21 app         | , 
api_1  | 15:58:21 app         | 0xbb6070
api_1  | 15:58:21 app         | )
api_1  | 15:58:21 app         | 	
api_1  | 15:58:21 app         | /usr/local/go/src/runtime/panic.go
api_1  | 15:58:21 app         | :
api_1  | 15:58:21 app         | 565
api_1  | 15:58:21 app         |  +
api_1  | 15:58:21 app         | 0x2c5
api_1  | 15:58:21 app         |  fp=
api_1  | 15:58:21 app         | 0xc000407b68
api_1  | 15:58:21 app         |  sp=
api_1  | 15:58:21 app         | 0xc000407ad8
api_1  | 15:58:21 app         |  pc=
api_1  | 15:58:21 app         | 0x42bca5
api_1  | 15:58:21 app         | 
api_1  | 15:58:21 app         | net/http.(*http2pipe).closeWithError
api_1  | 15:58:21 app         | (
api_1  | 15:58:21 app         | 0xc0002d76a8
api_1  | 15:58:21 app         | , 
api_1  | 15:58:21 app         | 0xc0002d76f8
api_1  | 15:58:21 app         | , 
api_1  | 15:58:21 app         | 0x0, 0x0, 0x0)
api_1  | 	/usr/local/go/src/net/http/h2_bundle.go:3553 +0x1cd fp=0xc000407b90 sp=0xc000407b68 pc=0x67d70d
api_1  | 15:58:21 app         | net/http.(*http2pipe).CloseWithError
api_1  | 15:58:21 app         | (...)
api_1  | 	/usr/local/go/src/net/http/h2_bundle.go:3540
api_1  | net/http.(*http2clientConnReadLoop).cleanup(0xc000407fb8)
api_1  | 	/usr/local/go/src/net/http/h2_bundle.go:8084 +0x26c fp=0xc000407c90 sp=0xc000407b90 pc=0x694cac
api_1  | 15:58:21 app         | runtime.call32(0x0, 0xae22d8, 0xc00005a0b0, 0x800000008)
api_1  | 	/usr/local/go/src/runtime/asm_amd64.s:519 +0x3b fp=0xc000407cc0 sp=0xc000407c90 pc=0x45605b
api_1  | panic(0xa18c40, 0xc0005de240)
api_1  | 	/usr/local/go/src/runtime/panic.go:522 +0x1b5 fp=0xc000407d50 sp=0xc000407cc0 pc=0x42bb95
api_1  | 15:58:21 app         | runtime.panicdottypeE
api_1  | 15:58:21 app         | (...)
...

I'm not sure which process supervisor that is, but perhaps Go should internally line-buffer those dumps and only write to stderr on complete lines.

/cc @aclements @cherrymui @ianlancetaylor @rsc

@bradfitz bradfitz added this to the Go1.14 milestone May 13, 2019

@andybons

This comment has been minimized.

Copy link
Member

commented May 14, 2019

@zhangriyueming can you provide more information on your environment (where this snippet came from)? What are you using to run your programs/what is capturing this output?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.