Go binaries panic with "mmap errno 9" on qemu-user

Bug #1738545 reported by John Paul Adrian Glaubitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Go binaries panic with "mmap errno 9" on qemu-user.

root@nofan:/# cat hello.go
package main

import "fmt"

func main() {
    fmt.Println("hello world")
}
root@nofan:/# gccgo-7 hello.go -o hello
root@nofan:/# ./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
root@nofan:/#

Tested with qemu from git master with Debian unstable for armel.

Same binaries work fine on real hardware.

Revision history for this message
Peter Maydell (pmaydell) wrote :

With current QEMU (and in particular with 4.1.0 rc3 or later with commit 5bfce0b74fbd5d5308 that fixes sigaltstack) go binaries work OK. I think we must have fixed this mmap issue at some point between when this bug was reported and now (or possibly the go runtime was made a bit more forgiving of QEMU's eccentricities).

Changed in qemu:
status: New → Fix Committed
Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

Oh, that's interesting. I will verify this and if it indeed works, I will enable Go binaries for sh4 in Debian.

Thanks a lot for the update!

Revision history for this message
Peter Maydell (pmaydell) wrote :

I haven't tested sh4 specifically, but arm (subject of this bug report) definitely works, as does arm64.

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

I can confirm that the issue has been resolved on arm. Unfortunately, on sh4, the Go binaries are still crashing, albeit differently now. I verified that they work fine on real sh4 hardware.

Revision history for this message
Peter Maydell (pmaydell) wrote :

Could you file a separate bug for the sh4 case, then, please (with repro instructions)?

Revision history for this message
Thomas Huth (th-huth) wrote :

I'm marking this bug as "fix released" now since the Arm problem has been fixed. If there is something else to do for sh4, please open a new bug as suggested by Peter.

Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.