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: confusing '...additional frames elided...' for stack overflow #19708

Closed
LionNatsu opened this issue Mar 25, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@LionNatsu
Copy link
Contributor

commented Mar 25, 2017

go 1.8

Frames of stack usually repeat it self millions of times, when a stack overflow occurs. Eliding the 'additional frames' is undoubtedly friendly for error report.

But, most of the time, to understand where the problem is, we need to check the bottom of those repeated frames, not the top (100, so far) of them.

For example (218 lines with 100 frames from the top):

runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x51a9a8, 0xe)
        /usr/lib/go/src/runtime/panic.go:596 +0x95
runtime.newstack(0x0)
        /usr/lib/go/src/runtime/stack.go:1089 +0x3f2
runtime.morestack()
        /usr/lib/go/src/runtime/asm_amd64.s:398 +0x86

goroutine 1 [running]:
runtime.(*_type).nameOff(0x7f9ef73b9260, 0xf97c, 0x0)
        /usr/lib/go/src/runtime/type.go:198 +0x4c fp=0xc44008a358 sp=0xc44008a350
runtime.(*_type).string(0x7f9ef73b9260, 0x0, 0x0)
        /usr/lib/go/src/runtime/type.go:46 +0x36 fp=0xc44008a380 sp=0xc44008a358
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:543 +0x73 fp=0xc44008a4a8 sp=0xc44008a380
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008a5d0 sp=0xc44008a4a8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008a6f8 sp=0xc44008a5d0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008a820 sp=0xc44008a6f8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008a948 sp=0xc44008a820
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008aa70 sp=0xc44008a948
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008ab98 sp=0xc44008aa70
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008acc0 sp=0xc44008ab98
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008ade8 sp=0xc44008acc0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008af10 sp=0xc44008ade8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008b038 sp=0xc44008af10
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008b160 sp=0xc44008b038
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008b288 sp=0xc44008b160
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008b3b0 sp=0xc44008b288
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008b4d8 sp=0xc44008b3b0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008b600 sp=0xc44008b4d8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008b728 sp=0xc44008b600
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008b850 sp=0xc44008b728
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008b978 sp=0xc44008b850
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008baa0 sp=0xc44008b978
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008bbc8 sp=0xc44008baa0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008bcf0 sp=0xc44008bbc8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008be18 sp=0xc44008bcf0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008bf40 sp=0xc44008be18
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008c068 sp=0xc44008bf40
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008c190 sp=0xc44008c068
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008c2b8 sp=0xc44008c190
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008c3e0 sp=0xc44008c2b8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008c508 sp=0xc44008c3e0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008c630 sp=0xc44008c508
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008c758 sp=0xc44008c630
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008c880 sp=0xc44008c758
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008c9a8 sp=0xc44008c880
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008cad0 sp=0xc44008c9a8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008cbf8 sp=0xc44008cad0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008cd20 sp=0xc44008cbf8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008ce48 sp=0xc44008cd20
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008cf70 sp=0xc44008ce48
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008d098 sp=0xc44008cf70
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008d1c0 sp=0xc44008d098
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008d2e8 sp=0xc44008d1c0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008d410 sp=0xc44008d2e8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008d538 sp=0xc44008d410
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008d660 sp=0xc44008d538
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008d788 sp=0xc44008d660
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008d8b0 sp=0xc44008d788
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008d9d8 sp=0xc44008d8b0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008db00 sp=0xc44008d9d8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008dc28 sp=0xc44008db00
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008dd50 sp=0xc44008dc28
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008de78 sp=0xc44008dd50
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008dfa0 sp=0xc44008de78
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008e0c8 sp=0xc44008dfa0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008e1f0 sp=0xc44008e0c8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008e318 sp=0xc44008e1f0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008e440 sp=0xc44008e318
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008e568 sp=0xc44008e440
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008e690 sp=0xc44008e568
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008e7b8 sp=0xc44008e690
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008e8e0 sp=0xc44008e7b8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008ea08 sp=0xc44008e8e0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008eb30 sp=0xc44008ea08
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008ec58 sp=0xc44008eb30
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008ed80 sp=0xc44008ec58
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008eea8 sp=0xc44008ed80
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008efd0 sp=0xc44008eea8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008f0f8 sp=0xc44008efd0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008f220 sp=0xc44008f0f8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008f348 sp=0xc44008f220
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008f470 sp=0xc44008f348
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008f598 sp=0xc44008f470
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008f6c0 sp=0xc44008f598
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008f7e8 sp=0xc44008f6c0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008f910 sp=0xc44008f7e8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008fa38 sp=0xc44008f910
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008fb60 sp=0xc44008fa38
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008fc88 sp=0xc44008fb60
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc44008fdb0 sp=0xc44008fc88
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc44008fed8 sp=0xc44008fdb0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440090000 sp=0xc44008fed8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440090128 sp=0xc440090000
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440090250 sp=0xc440090128
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440090378 sp=0xc440090250
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc4400904a0 sp=0xc440090378
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc4400905c8 sp=0xc4400904a0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc4400906f0 sp=0xc4400905c8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440090818 sp=0xc4400906f0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440090940 sp=0xc440090818
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440090a68 sp=0xc440090940
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440090b90 sp=0xc440090a68
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440090cb8 sp=0xc440090b90
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440090de0 sp=0xc440090cb8
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440090f08 sp=0xc440090de0
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440091030 sp=0xc440090f08
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc440091158 sp=0xc440091030
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc440091280 sp=0xc440091158
runtime.typesEqual(0x7f9ef73b9260, 0x503d60, 0x4f4201)
        /usr/lib/go/src/runtime/type.go:615 +0x740 fp=0xc4400913a8 sp=0xc440091280
runtime.typesEqual(0x7f9ef73b6460, 0x501060, 0x501060)
        /usr/lib/go/src/runtime/type.go:580 +0x229 fp=0xc4400914d0 sp=0xc4400913a8
...additional frames elided...

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/lib/go/src/runtime/asm_amd64.s:2197 +0x1
exit status 2

Well 97 frames is totally useless for debugging.
There is no any frame in the scope of 'my code'.

@randall77

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2017

Dup of #7181

@randall77 randall77 closed this Mar 25, 2017

@golang golang locked and limited conversation to collaborators Mar 25, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.