You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the above sample code the WriteHeapDump function devolves into an infinite loop, that can only be exited by killing the program. The thread running WriteHeapDump runs at 100% cpu and the function never returns.
I believe this is the result of a reference loop in the goruntime. This reference loop seems to be made by interfaces which refer to each other in a loop.
The text was updated successfully, but these errors were encountered:
The go 1.4 heapdump is binary incompatible with the go 1.3 heapdump and associated tools (also the documentation had bugs). No public tools currently exists to parse go 1.4 heap dumps. Changes to go 1.3 tools are non trivial, this is a followup from discussion on the mailing list regarding the matter.
While I would loved to see this fixed, it is also worth filing in case anyone else runs into it.
I looked back at the 1.3.3 code. The bug happens with channels of size 0 where the size of the type is larger than the channel header (on 64 bit, 88 bytes). There's an underflow in the loop condition in heapdump.c:951 which makes the loop run ~2^64 iterations.
An easy workaround, and probably something you should do anyway, is pass large objects by reference.
Version: 1.3.3
OS: Fedora 21 X86_64
Sample Code For Reproduction: https://github.com/rfliam/heapdumptest
In the above sample code the WriteHeapDump function devolves into an infinite loop, that can only be exited by killing the program. The thread running WriteHeapDump runs at 100% cpu and the function never returns.
I believe this is the result of a reference loop in the goruntime. This reference loop seems to be made by interfaces which refer to each other in a loop.
The text was updated successfully, but these errors were encountered: