go: runtime: SIGILL: illegal instruction from runtime.deductSweepCredit

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

$ go version
go version go1.11.4 linux/amd64

Does this issue reproduce with the latest release?

Yes, go 1.11.4. But happened only once.

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

go env Output
$ go env

/usr/local/go1.11.4/go/bin# ./go env GOARCH=“amd64” GOBIN=“” GOCACHE=“/root/.cache/go-build” GOEXE=“” GOFLAGS=“” GOHOSTARCH=“amd64” GOHOSTOS=“linux” GOOS=“linux” GOPATH=“/var/jenkins_home/workspace” GOPROXY=“” GORACE=“” GOROOT=“/usr/local/go1.11.4/go” GOTMPDIR=“” GOTOOLDIR=“/usr/local/go1.11.4/go/pkg/tool/linux_amd64” GCCGO=“gccgo” CC=“gcc” CXX=“g++” CGO_ENABLED=“1” GOMOD=“” CGO_CFLAGS=“-g -O2” CGO_CPPFLAGS=“” CGO_CXXFLAGS=“-g -O2” CGO_FFLAGS=“-g -O2” CGO_LDFLAGS=“-g -O2” PKG_CONFIG=“pkg-config” GOGCCFLAGS=“-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build108139547=/tmp/go-build -gno-record-gcc-switches”

What did you do?

Nothing specific was being done. This code has been running unmodified for few days without any issue.

What did you expect to see?

No panic

What did you see instead?

SIGILL: illegal instruction PC=0x420c60 m=8 sigcode=2

goroutine 0 [idle]: runtime.deductSweepCredit(0x2000, 0x0) /usr/local/go1.11.4/go/src/runtime/mgcsweep.go:390 runtime.(*mcentral).cacheSpan(0x1385618, 0xc0005cfca8) /usr/local/go1.11.4/go/src/runtime/mcentral.go:43 +0x60 runtime.(*mcache).refill(0x7f95da4e3000, 0xc0005cfc11) /usr/local/go1.11.4/go/src/runtime/mcache.go:122 +0x95 runtime.(*mcache).nextFree.func1() /usr/local/go1.11.4/go/src/runtime/malloc.go:749 +0x32 runtime.systemstack(0x0) /usr/local/go1.11.4/go/src/runtime/asm_amd64.s:351 +0x66 runtime.mstart() /usr/local/go1.11.4/go/src/runtime/proc.go:1229

goroutine 444 [running]: runtime.systemstack_switch() /usr/local/go1.11.4/go/src/runtime/asm_amd64.s:311 fp=0xc0005cf9a0 sp=0xc0005cf998 pc=0x4581d0 runtime.(*mcache).nextFree(0x7f95da4e3000, 0x11, 0x1000100, 0xc0005cfa40, 0x40a03d) /usr/local/go1.11.4/go/src/runtime/malloc.go:748 +0xb6 fp=0xc0005cf9f8 sp=0xc0005cf9a0 pc=0x40b756 runtime.mallocgc(0x70, 0xb96800, 0x1, 0x0) /usr/local/go1.11.4/go/src/runtime/malloc.go:903 +0x793 fp=0xc0005cfa98 sp=0xc0005cf9f8 pc=0x40c0a3 runtime.makeslice(0xb96800, 0x65, 0x65, 0x0, 0x0, 0xa891ff)

… rax 0x2000 rbx 0x7f95d827c350 rcx 0x8 rdx 0x440 rdi 0x4553c0 rsi 0x137ddc0 rbp 0xc000399f70 rsp 0xc000399f30 r8 0x1 r9 0x11 r10 0x7f95d827c350 r11 0x7fffffffffffff r12 0x0 r13 0x49 r14 0x49 r15 0x49 rip 0x420c60 rflags 0x10206 cs 0x33 fs 0x0 gs 0x0

Processor

processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel® Xeon® CPU @ 2.20GHz stepping : 0 microcode : 0x1 cpu MHz : 2200.000 cache size : 56320 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat arch_capabilities bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf bogomips : 4400.00 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management:

Runtime

Kubernetes 1.11.6 with Google COS os.

docker version Client: Version: 17.03.2-ce API version: 1.27 Go version: go1.10.3 Git commit: f5ec1e2 Built: Thu Oct 25 10:42:32 2018 OS/Arch: linux/amd64 Server: Version: 17.03.2-ce API version: 1.27 (minimum version 1.12) Go version: go1.10.3 Git commit: f5ec1e2 Built: Thu Oct 25 10:42:32 2018 OS/Arch: linux/amd64 Experimental: false

Assembly a the PC

(gdb) disassemble 0x420c60 Dump of assembler code for function runtime.deductSweepCredit: 0x0000000000420c60 <+0>: mov %fs:0xfffffffffffffff8,%rcx 0x0000000000420c69 <+9>: cmp 0x10(%rcx),%rsp 0x0000000000420c6d <+13>: jbe 0x420dc8 <runtime.deductSweepCredit+360> 0x0000000000420c73 <+19>: sub $0x20,%rsp 0x0000000000420c77 <+23>: mov %rbp,0x18(%rsp) 0x0000000000420c7c <+28>: lea 0x18(%rsp),%rbp 0x0000000000420c81 <+33>: movsd 0xf642cf(%rip),%xmm0 # 0x1384f58 <runtime.mheap_+4280> 0x0000000000420c89 <+41>: xorps %xmm1,%xmm1 0x0000000000420c8c <+44>: ucomisd %xmm1,%xmm0 0x0000000000420c90 <+48>: jne 0x420c98 <runtime.deductSweepCredit+56> 0x0000000000420c92 <+50>: jnp 0x420dbe <runtime.deductSweepCredit+350> 0x0000000000420c98 <+56>: lea 0xf6a751(%rip),%rax # 0x138b3f0 <runtime.trace+16> 0x0000000000420c9f <+63>: cmpb $0x0,(%rax) 0x0000000000420ca2 <+66>: jne 0x420daa <runtime.deductSweepCredit+330> 0x0000000000420ca8 <+72>: mov 0x28(%rsp),%rcx 0x0000000000420cad <+77>: mov 0x30(%rsp),%rdx 0x0000000000420cb2 <+82>: jmp 0x420d1c <runtime.deductSweepCredit+188> 0x0000000000420cb4 <+84>: lea 0xf6a735(%rip),%rax # 0x138b3f0 <runtime.trace+16> 0x0000000000420cbb <+91>: mov 0x28(%rsp),%rcx 0x0000000000420cc0 <+96>: mov 0x30(%rsp),%rdx 0x0000000000420cc5 <+101>: mov 0x8(%rsp),%rbx 0x0000000000420cca <+106>: mov 0x10(%rsp),%rsi 0x0000000000420ccf <+111>: xorps %xmm1,%xmm1 0x0000000000420cd2 <+114>: mov 0xf64267(%rip),%rdi # 0x1384f40 <runtime.mheap_+4256> 0x0000000000420cd9 <+121>: sub %rbx,%rdi 0x0000000000420cdc <+124>: cmp %rdi,%rsi 0x0000000000420cdf <+127>: jle 0x420d72 <runtime.deductSweepCredit+274> 0x0000000000420ce5 <+133>: callq 0x4201c0 <runtime.gosweepone> 0x0000000000420cea <+138>: cmpq $0xffffffffffffffff,(%rsp) 0x0000000000420cef <+143>: je 0x420d67 <runtime.deductSweepCredit+263> 0x0000000000420cf1 <+145>: mov 0xf64250(%rip),%rax # 0x1384f48 <runtime.mheap_+4264> 0x0000000000420cf8 <+152>: mov 0x8(%rsp),%rcx 0x0000000000420cfd <+157>: cmp %rcx,%rax 0x0000000000420d00 <+160>: je 0x420cb4 <runtime.deductSweepCredit+84>

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

Yes, I am suggesting a hardware problem.

Of course if it happens on a different machine then my suggestion is almost certainly wrong. But a single occurrence of SIGILL on a single machine is likely a hardware problem. They do happen.