Hello Genodians
While Testing the `wasmedge` application that I'm porting with the Goa tool (goa run), I get the following errors:
``` Error: _map_local: lx_mmap failed(addr_in=0x0, addr_out=0xffffffffffffffed/-19) overmap=0 Error: LD: exception during program load: 'Genode::Region_map::Region_conflict' Error: Uncaughht exception of type 'Genode::Region_map::Region_conflict' Warning: abort called - thread: ep ```
I tried to follow the path that leads to this by adding some debug prints to the code in base-linux. If I'm not mistaken, the error happens, when in `load_phdr()` in the file `base/src/lib/ldso/include/file.h` a temporary dataspace is created.
The binary compiled for x86_64 is 312K in size.
Has somebody an idea what could be going wrong?
Best regards, Pirmin
Hello Pirmin,
On Tue, Dec 20, 2022 at 15:21:04 CET, Pirmin Duss wrote:
While Testing the `wasmedge` application that I'm porting with the Goa tool (goa run), I get the following errors:
Error: _map_local: lx_mmap failed(addr_in=0x0, addr_out=0xffffffffffffffed/-19) overmap=0 Error: LD: exception during program load: 'Genode::Region_map::Region_conflict' Error: Uncaughht exception of type 'Genode::Region_map::Region_conflict' Warning: abort called - thread: ep
I tried to follow the path that leads to this by adding some debug prints to the code in base-linux. If I'm not mistaken, the error happens, when in `load_phdr()` in the file `base/src/lib/ldso/include/file.h` a temporary dataspace is created.
The return value of mmap() is -19 "No such device" which is documented in the man page like follows.
ENODEV The underlying filesystem of the specified file does not support memory mapping.
Did you log the file name of the Elf_file? Where is it located? What's the output of "objdump -p elf_file"?
Greets
Hello Christian
On 20.12.22 16:16, Christian Helmuth wrote:
Hello Pirmin,
On Tue, Dec 20, 2022 at 15:21:04 CET, Pirmin Duss wrote:
The return value of mmap() is -19 "No such device" which is documented in the man page like follows.
ENODEV The underlying filesystem of the specified file does not support memory mapping.
Did you log the file name of the Elf_file? Where is it located? What's the output of "objdump -p elf_file"?
Two files are loaded: - name=ld.lib.so - name=binary
I'm guessing, that binary is expanded to the name of the binary to run, which is wamedge.
The output is as follows:
``` % objdump -p var/bin/x86_64/wasmedge
var/bin/x86_64/wasmedge: file format elf64-x86-64
Program Header: INTERP off 0x0000000000001645 vaddr 0x0000000001000645 paddr 0x0000000001000645 align 2**0 filesz 0x000000000000000f memsz 0x000000000000000f flags r-- LOAD off 0x0000000000001000 vaddr 0x0000000001000000 paddr 0x0000000001000000 align 2**12 filesz 0x0000000000000c64 memsz 0x0000000000000c64 flags r-x LOAD off 0x0000000000002000 vaddr 0x0000000001001000 paddr 0x0000000001001000 align 2**12 filesz 0x0000000000000278 memsz 0x00000000000002a0 flags rw- DYNAMIC off 0x00000000000020c8 vaddr 0x00000000010010c8 paddr 0x00000000010010c8 align 2**4 filesz 0x00000000000001b0 memsz 0x00000000000001cc flags rw- EH_FRAME off 0x0000000000001c38 vaddr 0x0000000001000c38 paddr 0x0000000001000c38 align 2**2 filesz 0x000000000000002c memsz 0x000000000000002c flags r--
Dynamic Section: NEEDED libc.lib.so NEEDED libm.lib.so NEEDED posix.lib.so NEEDED c++fs.lib.so NEEDED libspdlog.lib.so NEEDED stdcxx.lib.so NEEDED zlib.lib.so NEEDED ../../lib/api/libwasmedge.lib.so HASH 0x0000000001000658 STRTAB 0x0000000001000848 SYMTAB 0x00000000010006b0 STRSZ 0x0000000000000149 SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x0000000001001250 PLTRELSZ 0x0000000000000018 PLTREL 0x0000000000000007 JMPREL 0x0000000001000998 ```
Regards
Hello Christian
After my last mail I had the idea to use strace to find out which file is loaded. It turned out, that the actual file that was tried to load was <depot_user>/raw/wasmedge/wasmedge, which doesn't exist. after modifying the Goa project slightly, I can start my application again.
Many thanks for your time and help.
Cheers, Pirmin