Skip to content

runtime: panic on memclrNoHeapPointers, unexpected fault address #59382

Closed as not planned
@payall4u

Description

@payall4u

What version of Go are you using (go version)?

$ go version
go1.16.4

Does this issue reproduce with the latest release?

Unable to attempt to reproduce.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOOS="linux"

What did you do?

The problem occurred on our Kubernetes node.
The runc on the node was compiled with golang 1.16.4. And it panic occurred during a probe execution.

We got the stack as follow:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7f69f2b52a13]

goroutine 1 [running, locked to thread]:
runtime.throw(0x7f69f2f4378b, 0x2a)
        runtime/panic.go:1117 +0x74 fp=0xc000143620 sp=0xc0001435f0 pc=0x7f69f2b1af94
runtime.sigpanic()
        runtime/signal_unix.go:718 +0x305 fp=0xc000143658 sp=0xc000143620 pc=0x7f69f2b31f25
runtime.memclrNoHeapPointers(0xc00017e000, 0x2000)
        runtime/memclr_amd64.s:78 +0x113 fp=0xc000143660 sp=0xc000143658 pc=0x7f69f2b52a13
runtime.(*mheap).alloc(0x7f69f338d740, 0x1, 0x7f69f2b10142, 0x7f69f33a0b70)
        runtime/mheap.go:915 +0xd5 fp=0xc0001436b0 sp=0xc000143660 pc=0x7f69f2b0c8f5
runtime.(*mcentral).grow(0x7f69f33a0af8, 0x0)
        runtime/mcentral.go:232 +0x7b fp=0xc0001436f8 sp=0xc0001436b0 pc=0x7f69f2afd89b
runtime.(*mcentral).cacheSpan(0x7f69f33a0af8, 0x7f69f2880af0)
        runtime/mcentral.go:158 +0x2ff fp=0xc000143750 sp=0xc0001436f8 pc=0x7f69f2afd67f
runtime.(*mcache).refill(0x7f69f2874108, 0x42)
        runtime/mcache.go:162 +0xac fp=0xc000143798 sp=0xc000143750 pc=0x7f69f2afcb8c
runtime.(*mcache).nextFree(0x7f69f2874108, 0xc000143842, 0x7f69f2b36f3e, 0xc00017c57c, 0x7f69f2f2b139)
        runtime/malloc.go:882 +0x8d fp=0xc0001437d0 sp=0xc000143798 pc=0x7f69f2af1f2d
runtime.mallocgc(0x480, 0x7f69f308ddc0, 0xc000143a01, 0xc0001438b0)
        runtime/malloc.go:1069 +0x870 fp=0xc000143858 sp=0xc0001437d0 pc=0x7f69f2af2950
runtime.growslice(0x7f69f308ddc0, 0xc00016d440, 0x4, 0x4, 0x5, 0x7f69f2f2b139, 0x2, 0xc00017c570)
        runtime/slice.go:230 +0x1e9 fp=0xc0001438c0 sp=0xc000143858 pc=0x7f69f2b332a9
encoding/json.typeFields(0x7f69f30c6a38, 0x7f69f3041ce0, 0x7f69f3041ce0, 0x0, 0x0, 0x7f69f2b77700)
        encoding/json/encode.go:1314 +0xb30 fp=0xc0001441e0 sp=0xc0001438c0 pc=0x7f69f2cb0f10
encoding/json.cachedTypeFields(0x7f69f30c6a38, 0x7f69f3041ce0, 0xc0001442e8, 0x1007f69f287d328, 0x18, 0xc0001442a8)
        encoding/json/encode.go:1416 +0xf1 fp=0xc000144258 sp=0xc0001441e0 pc=0x7f69f2cb1d51
encoding/json.newStructEncoder(0x7f69f30c6a38, 0x7f69f3041ce0, 0x7f69f302c040)
        encoding/json/encode.go:771 +0x3b fp=0xc0001442b8 sp=0xc000144258 pc=0x7f69f2cacf5b
encoding/json.newTypeEncoder(0x7f69f30c6a38, 0x7f69f3041ce0, 0x7f69f3041c01, 0x7f69f3024ce0)
        encoding/json/encode.go:451 +0x36e fp=0xc0001442f8 sp=0xc0001442b8 pc=0x7f69f2caab2e
encoding/json.typeEncoder(0x7f69f30c6a38, 0x7f69f3041ce0, 0x7f69f3041ce0)
        encoding/json/encode.go:404 +0x19e fp=0xc000144358 sp=0xc0001442f8 pc=0x7f69f2caa69e
encoding/json.newPtrEncoder(0x7f69f30c6a38, 0x7f69f2fe7e80, 0x7f69f302c040)
        encoding/json/encode.go:949 +0x4f fp=0xc000144388 sp=0xc000144358 pc=0x7f69f2caefcf
encoding/json.newTypeEncoder(0x7f69f30c6a38, 0x7f69f2fe7e80, 0x7f69f2fe7e01, 0x7f69f3024ce0)
        encoding/json/encode.go:459 +0x2e5 fp=0xc0001443c8 sp=0xc000144388 pc=0x7f69f2caaaa5
encoding/json.typeEncoder(0x7f69f30c6a38, 0x7f69f2fe7e80, 0x7f69f2fe7e80)
        encoding/json/encode.go:404 +0x19e fp=0xc000144428 sp=0xc0001443c8 pc=0x7f69f2caa69e
encoding/json.newArrayEncoder(0x7f69f30c6a38, 0x7f69f2ff5420, 0x7f69f2fe7e80)
        encoding/json/encode.go:921 +0x4f fp=0xc000144458 sp=0xc000144428 pc=0x7f69f2cae9af
encoding/json.newSliceEncoder(0x7f69f30c6a38, 0x7f69f2ff5420, 0x7f69f302c040)
        encoding/json/encode.go:900 +0x6e fp=0xc000144498 sp=0xc000144458 pc=0x7f69f2cae6ce
encoding/json.newTypeEncoder(0x7f69f30c6a38, 0x7f69f2ff5420, 0x7f69f2ff5401, 0x7f69f3024ce0)
        encoding/json/encode.go:455 +0x3b0 fp=0xc0001444d8 sp=0xc000144498 pc=0x7f69f2caab70
encoding/json.typeEncoder(0x7f69f30c6a38, 0x7f69f2ff5420, 0xc000025010)
        encoding/json/encode.go:404 +0x19e fp=0xc000144538 sp=0xc0001444d8 pc=0x7f69f2caa69e
encoding/json.typeFields(0x7f69f30c6a38, 0x7f69f309c220, 0x7f69f309c220, 0x0, 0x0, 0xc000145b00)
        encoding/json/encode.go:1384 +0x168d fp=0xc000144e58 sp=0xc000144538 pc=0x7f69f2cb1a6d
encoding/json.cachedTypeFields(0x7f69f30c6a38, 0x7f69f309c220, 0x199, 0x7f69f30c6a38, 0x7f69f309c220, 0x0)
        encoding/json/encode.go:1416 +0xf1 fp=0xc000144ed0 sp=0xc000144e58 pc=0x7f69f2cb1d51
encoding/json.(*decodeState).object(0xc0000a4868, 0x7f69f2fe5b40, 0xc0000100b0, 0x16, 0xc0000a4890, 0x7b)
        encoding/json/decode.go:651 +0x285 fp=0xc000145158 sp=0xc000144ed0 pc=0x7f69f2ca3385
encoding/json.(*decodeState).value(0xc0000a4868, 0x7f69f2fe5b40, 0xc0000100b0, 0x16, 0xc000145238, 0x7f69f2cb7319)
        encoding/json/decode.go:370 +0x79 fp=0xc0001451c0 sp=0xc000145158 pc=0x7f69f2ca1a39
encoding/json.(*decodeState).unmarshal(0xc0000a4868, 0x7f69f2fe5b40, 0xc0000100b0, 0x0, 0xc000102e01)
        encoding/json/decode.go:180 +0x1f4 fp=0xc000145248 sp=0xc0001451c0 pc=0x7f69f2ca1194
encoding/json.(*Decoder).Decode(0xc0000a4840, 0x7f69f2fe5b40, 0xc0000100b0, 0x0, 0x0)
        encoding/json/stream.go:73 +0x174 fp=0xc000145288 sp=0xc000145248 pc=0x7f69f2cb70b4
github.com/opencontainers/runc/libcontainer.newContainerInit(0xc00002a037, 0x5, 0xc0000100a8, 0x0, 0xffffffffffffffff, 0x4, 0xc000024e30, 0xc0001453b8, 0x0, 0x0)
        github.com/opencontainers/runc/libcontainer/init_linux.go:82 +0x91 fp=0xc0001452f0 sp=0xc000145288 pc=0x7f69f2e9c131
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc0000fa090, 0x0, 0x0)
        github.com/opencontainers/runc/libcontainer/factory_linux.go:396 +0x4b9 fp=0xc000145558 sp=0xc0001452f0 pc=0x7f69f2e9ad39
main.glob..func6(0xc0000a46e0, 0xc00002d600, 0xc00002d600)
        github.com/opencontainers/runc/init.go:49 +0x4d fp=0xc0001455b0 sp=0xc000145558 pc=0x7f69f2f216ad
github.com/opencontainers/runc/vendor/github.com/urfave/cli.HandleAction(0x7f69f300a3a0, 0x7f69f30ad278, 0xc0000a46e0, 0xc0000a46e0, 0x0)
        github.com/opencontainers/runc/vendor/github.com/urfave/cli/app.go:523 +0x107 fp=0xc0001455d8 sp=0xc0001455b0 pc=0x7f69f2eda9a7
github.com/opencontainers/runc/vendor/github.com/urfave/cli.Command.Run(0x7f69f2f2b999, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f69f2f49a36, 0x51, 0x0, ...)
        github.com/opencontainers/runc/vendor/github.com/urfave/cli/command.go:174 +0x579 fp=0xc0001458d0 sp=0xc0001455d8 pc=0x7f69f2edb719
github.com/opencontainers/runc/vendor/github.com/urfave/cli.(*App).Run(0xc0000b8540, 0xc000020040, 0x2, 0x2, 0x0, 0x0)
        github.com/opencontainers/runc/vendor/github.com/urfave/cli/app.go:276 +0x7e8 fp=0xc000145c00 sp=0xc0001458d0 pc=0x7f69f2ed8948
main.main()
        github.com/opencontainers/runc/main.go:165 +0xd1f fp=0xc000145f88 sp=0xc000145c00 pc=0x7f69f2f16d5f
runtime.main()
        runtime/proc.go:225 +0x263 fp=0xc000145fe0 sp=0xc000145f88 pc=0x7f69f2b1d803
runtime.goexit()
        runtime/asm_amd64.s:1371 +0x1 fp=0xc000145fe8 sp=0xc000145fe0 pc=0x7f69f2b51de1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions