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: crash during sleep on Linux ARMv7 (stack split at bad time) #18803

Closed
hilt0n opened this issue Jan 26, 2017 · 5 comments
Closed

runtime: crash during sleep on Linux ARMv7 (stack split at bad time) #18803

hilt0n opened this issue Jan 26, 2017 · 5 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@hilt0n
Copy link

hilt0n commented Jan 26, 2017

I'm compiling Go on Ubuntu with toolchain made on Yocto. My go version is go1.7.3 linux/amd64 and my env:

GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/lanzy/devel/go/gopath_target:/home/lanzy/devel/go/gopath_target/pkg/linux_arm:/home/lanzy/git/webutils/txtests"
GORACE=""
GOROOT="/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go"
GOTOOLDIR="/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -marm -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build268294020=/tmp/go-build -gno-record-gcc-switches"
CXX="${HOST_CXX}"
CGO_ENABLED="0"

When I use timing function like Sleep:

package main

import (
	"fmt"
	"time"
)

func main() {
	fmt.Println("Before the crash")
	time.Sleep(time.Second * 5)
	fmt.Println("After the crash")
}

I have the following crash:

Before the crash
runtime: newstack sp=0x1041fea0 stack=[0x1041f800, 0x1041fff0]
	morebuf={pc:0x4b83c sp:0x1041fea0 lr:0x0}
	sched={pc:0x17aa4 sp:0x1041fea0 lr:0x4b83c ctxt:0x0}
runtime.futexsleep(0x137acc, 0x0, 0x2a03ecd0, 0x1)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/os_linux.go:60 +0xf4
runtime.notetsleep_internal(0x137acc, 0x2a03ecd0, 0x1, 0x137e00)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/lock_futex.go:174 +0x224
runtime.notetsleepg(0x137acc, 0x2a03ecd0, 0x1, 0x0)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/lock_futex.go:206 +0x90
runtime.timerproc()
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/time.go:209 +0x648
runtime.goexit()
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/asm_arm.s:998 +0x4
fatal error: runtime: stack split at bad time

runtime stack:
runtime.throw(0xedcdc, 0x20)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/panic.go:566 +0xac
runtime.newstack()
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/stack.go:951 +0x790
runtime.morestack()
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/asm_arm.s:309 +0x4c

goroutine 5 [syscall]:
runtime.futexsleep(0x137acc, 0x0, 0x2a03ecd0, 0x1)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/os_linux.go:60 +0xf4 fp=0x1041fed4 sp=0x1041fea0
runtime.notetsleep_internal(0x137acc, 0x2a03ecd0, 0x1, 0x137e00)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/lock_futex.go:174 +0x224 fp=0x1041ff2c sp=0x1041fed4
runtime.notetsleepg(0x137acc, 0x2a03ecd0, 0x1, 0x0)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/lock_futex.go:206 +0x90 fp=0x1041ff48 sp=0x1041ff2c
runtime.timerproc()
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/time.go:209 +0x648 fp=0x1041ffdc sp=0x1041ff48
runtime.goexit()
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/asm_arm.s:998 +0x4 fp=0x1041ffdc sp=0x1041ffdc
created by runtime.addtimerLocked
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/time.go:116 +0x2cc

goroutine 1 [sleep]:
time.Sleep(0x2a05f200, 0x1)
	/opt/poky-wifx/2.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/go/src/runtime/time.go:59 +0x154
main.main()
	/home/lanzy/git/webutils/txtests/src/main/main.go:10 +0xcc

@cherrymui
Copy link
Member

@hilt0n does the crash constantly happen, or occasionally?

@cherrymui cherrymui changed the title Crash during sleep on Linux ARMv7 (stack split at bad time) runtime: crash during sleep on Linux ARMv7 (stack split at bad time) Jan 26, 2017
@josharian
Copy link
Contributor

Will you try with 1.7.5 and 1.8rc3, both of which were just released?

@davecheney
Copy link
Contributor

davecheney commented Jan 26, 2017 via email

@bradfitz bradfitz added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 26, 2017
@hilt0n
Copy link
Author

hilt0n commented Jan 26, 2017

@cherrymui it happends every run
@josharian Ok, I will try this week-end

@hilt0n
Copy link
Author

hilt0n commented Jan 28, 2017

The same on 1.7.5 but fixed on the 1.8rc3, thank you !

@hilt0n hilt0n closed this as completed Jan 28, 2017
@golang golang locked and limited conversation to collaborators Jan 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants