[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1696353] Re: golang binaries fail to start under linux
From: |
John Paul Adrian Glaubitz |
Subject: |
[Qemu-devel] [Bug 1696353] Re: golang binaries fail to start under linux-user |
Date: |
Sat, 16 Dec 2017 15:07:18 -0000 |
I just gave it a test with qemu-arm and Go binaries still crash for me,
albeit differently:
address@hidden:/# cat hello.go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
address@hidden:/# gccgo-7 hello.go -o hello
address@hidden:/# ./hello
mmap errno 9
fatal error: mmap
runtime stack:
mmap errno 9
fatal error: mmap
panic during panic
runtime stack:
mmap errno 9
fatal error: mmap
stack trace unavailable
address@hidden:/#
Should I file a new bug report?
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1696353
Title:
golang binaries fail to start under linux-user
Status in QEMU:
Won't Fix
Bug description:
With current master golang binaries fail when run under linux-user,
for example:
address@hidden qemu]$ ./arm-linux-user/qemu-arm glide
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x45f879, 0x9)
/usr/lib/golang/src/runtime/panic.go:566 +0x78
runtime.newosproc(0x1092c000, 0x1093bfe0)
/usr/lib/golang/src/runtime/os_linux.go:160 +0x1b0
runtime.newm(0x4ae1e8, 0x0)
/usr/lib/golang/src/runtime/proc.go:1572 +0x12c
runtime.main.func1()
/usr/lib/golang/src/runtime/proc.go:126 +0x24
runtime.systemstack(0x5ef900)
/usr/lib/golang/src/runtime/asm_arm.s:247 +0x80
runtime.mstart()
/usr/lib/golang/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/lib/golang/src/runtime/asm_arm.s:192 +0x4 fp=0x109287ac
sp=0x109287a8
runtime.main()
/usr/lib/golang/src/runtime/proc.go:127 +0x5c fp=0x109287d4
sp=0x109287ac
runtime.goexit()
/usr/lib/golang/src/runtime/asm_arm.s:998 +0x4 fp=0x109287d4
sp=0x109287d4
The reason for this is that the golang runtime does not pass the
CLONE_SYSVMEM flag to clone so the clone flags checks fail:
https://github.com/golang/go/blob/master/src/runtime/os_linux.go#L155
The attached patch allows golang binaries to start under linux-user.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1696353/+subscriptions
- [Qemu-devel] [Bug 1696353] Re: golang binaries fail to start under linux-user,
John Paul Adrian Glaubitz <=