Skip to content

runtime: unexpected fault address runtime.memhash16 #33635

Open
@kevinconaway

Description

@kevinconaway

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

go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"

$ uname -a
Linux {pod name} 4.15.0-1033-aws #35-Ubuntu SMP Wed Feb 6 13:29:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

What did you do?

What did you expect to see?

What did you see instead?

Our application is occasionally crashing with the following error:

unexpected fault address 0x432200
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x432200 pc=0x432200]

goroutine 2373 [running]:
runtime.throw(0x1306be9, 0x5)
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/panic.go:617 +0x72 fp=0xc007f9cd28 sp=0xc007f9ccf8 pc=0x45dc92
runtime.sigpanic()
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/signal_unix.go:397 +0x401 fp=0xc007f9cd58 sp=0xc007f9cd28 pc=0x473251
runtime.memhash16(0xc007f9ce1e, 0xd2bd649e, 0x0)
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/alg.go:56 fp=0xc007f9cd60 sp=0xc007f9cd58 pc=0x432200
runtime.mapassign(0x1146c80, 0xc001b329f0, 0xc007f9ce1e, 0x11)
	/root/.gimme/versions/go1.12.5.linux.amd64/src/runtime/map.go:593 +0x73 fp=0xc007f9cde8 sp=0xc007f9cd60 pc=0x43e273
...snip...

The code in question looks like:

type MessageReader struct {
        //...
	latency map[string]map[uint16]int64
}

func (mr *MessageReader) captureLatency(timestamp int64, cluster string, partition uint16) {
	if _, ok := mr.latency[cluster]; !ok {
		mr.latency[cluster] = make(map[uint16]int64)
	}
	mr.latency[cluster][partition] = time.Now().Unix() - timestamp
}

This particular application is processing messages and calling this once per message at a rate of ~75k / second. We've seen this happen twice over the past week or so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Triage Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions