"Invalid argument" error on binary that works on board

Bug #802228 reported by Gustavo Niemeyer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro QEMU
Fix Released
Undecided
Unassigned

Bug Description

The binary that is going to be attached was generated by Go targeting ARMv7. It works fine in a real board, but fails when run under qemu with the "Invalid argument" error.

Peter Maydell already debugged the issue little more than a month ago, and said the the following patch has been submitted upstream:

    http://patchwork.ozlabs.org/patch/95928/

The Linaro qemu packages don't seem to include the patch, and continue failing with said error.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :
Changed in qemu-linaro:
status: New → Confirmed
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

I've attempted to rebuild the current release of qemu-linaro with the patch applied, and unfortunately it still fails to execute the binary properly.

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

(Following email conversation with Gustavo)

The "Invalid argument" bug reported here is fixed by the patch. The binary runs OK if you run qemu on a 32 bit x86 host, but fails on a 64 bit host:
> % ./qemu-arm ~/Downloads/5.out
> throw: runtime: SysReserve returned unaligned address
>
> zsh: segmentation fault ./qemu-arm ~/Downloads/5.out

The test program tries to mmap() 768MB of RAM. qemu fails to persuade the host OS to mmap this RAM at an address which is within the bottom 32 bits which the guest can get at, so it returns -ENOMEM from the mmap2 syscall.

This kind of issue with mmap of 32 bit guests on 64 bit hosts is a known QEMU problem, but we should handle that as a separate bug, I think, so I'm going to close this one.

Changed in qemu-linaro:
status: Confirmed → Fix Committed
milestone: none → 2011.07
Revision history for this message
Peter Maydell (pmaydell) wrote :

a separate bug> bug 806873.

Peter Maydell (pmaydell)
Changed in qemu-linaro:
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.