-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: panic: "fatal error: malloc deadlock" with CPU profile #14599
Comments
The key pieces of information is this part of stack trace: runtime.panicindex() sigprof tries to find the func corresponding to 0x536110, but |
My current guess is that 0x536110 is not actually a C function. If it were a C function, it would fail the
|
Oh, sorry, I'm wrong, the crash is happening when the PC is the first instruction in the C function, which happens to equal |
CL https://golang.org/cl/20219 mentions this issue. |
CL https://golang.org/cl/22042 mentions this issue. |
Also fix compiler-invoked panics to avoid a confusing "malloc deadlock" crash if they are invoked while executing the runtime. Fixes #14599. Change-Id: I89436abcbf3587901909abbdca1973301654a76e Reviewed-on: https://go-review.googlesource.com/20219 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-on: https://go-review.googlesource.com/22042 Reviewed-by: Ian Lance Taylor <[email protected]>
go version go1.6 linux/amd64
Ubuntu 15.10 Wily
Linux 4.2.0-23-generic #28-Ubuntu SMP Sun Dec 27 17:47:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
I'm getting "panic: fatal error: malloc deadlock" quite reproducibly in
my program: https://github.com/ncw/go-nflog-acctd when compiled with go
1.6 and run with cpu profiling.
The code runs clean with the race detector enabled.
The panic only seems to happen when cpu profiling is enabled so I'd
guess it is something to do with that.
To reproduce on a Linux amd64 based system
In another window run
This usually produces a stack trace within a minute or two.
I haven't made it go wrong without the
-cpuprofile z.prof
flag.No traceback
This traceback
And here is one with
GOTRACEBACK=all
And one with
GOTRACEBACK=system
The text was updated successfully, but these errors were encountered: