Dear Genodians,
I have been successfully playing around with Networking in the 16.XX releases using the linux_x86 platform as a target. My genode instance used to run in a Ubuntu 14.04 LTS VM with a Windows host. Despite the "creative" setup, the tun/tap setup bridged with one of the VM's adapters worked like a charm.
After a jump to 18.11, using the linux platform as a target, I am experiencing troubles with the linux_nic_drv: The creation the driver component seems to fail during the creation of the file descriptors for its dataspaces: lx_mmap in _map_local fails with 22 (EINVAL) (see attached console output from the lwip_lx example).
I tested under Ubuntu 14.04 LTS in my old build environment as well as on a vanilla 16.04 LTS with a freshly installed genode toolchain & the current master. Other examples, such as the demo scenario, run without any problems.
I have found an older discussion on the list from 2014 about failed memory mappings, but the thread ended without coming to a real conclusion. I'd be more than glad for any idea what where to look for possible reasons for this behavior.
Best regards, Chris
======= console log, for run/lwip_lx ===========
using 'core-linux' as 'core' using 'linux_timer_drv' as 'timer' using 'ld-linux.lib.so' as 'ld.lib.so' spawn ./core Genode 18.11-117-ged65267 <local changes> 17592186044415 MiB RAM and 8998 caps assigned to init [init] parent provides [init] service "ROM" [init] service "IRQ" [init] service "IO_MEM" [init] service "IO_PORT" [init] service "PD" [init] service "RM" [init] service "CPU" [init] service "LOG" [init] child "timer" [init] RAM quota: 776K [init] cap quota: 68 [init] ELF binary: timer [init] priority: 0 [init] provides service Timer [init] child "linux_nic_drv" [init] RAM quota: 3848K [init] cap quota: 68 [init] ELF binary: linux_nic_drv [init] priority: 0 [init] provides service Nic [init] child "test-lwip_httpsrv" [init] RAM quota: 4872K [init] cap quota: 68 [init] ELF binary: test-lwip_httpsrv [init] priority: 0 [init -> linux_nic_drv] Error: _map_local: lx_mmap failed(addr_in=0x0, addr_out=0xffffffffffffffea/-22) overmap=0 [init -> linux_nic_drv] Error: LD: exception during program load: 'Genode::Region_map::Region_conflict' [init -> linux_nic_drv] Error: Uncaught exception of type 'Genode::Region_map::Region_conflict' [init -> linux_nic_drv] Warning: abort called - thread: ep Warning: blocking canceled in entrypoint constructor [init] child "linux_nic_drv" exited with exit value 1 [init -> test-lwip_httpsrv] Error: LD: symbol not found: '_nsyyin' [init -> test-lwip_httpsrv] Error: Uncaught exception of type 'Linker::Not_found' [init -> test-lwip_httpsrv] Warning: abort called - thread: ep [init] child "test-lwip_httpsrv" exited with exit value 1 [init] child "timer" announces service "Timer"
Hello Chris,
please find my answer below.
On Fri, Jan 25, 2019 at 01:32:57PM +0100, Chris via users wrote:
After a jump to 18.11, using the linux platform as a target, I am experiencing troubles with the linux_nic_drv: The creation the driver component seems to fail during the creation of the file descriptors for its dataspaces: lx_mmap in _map_local fails with 22 (EINVAL) (see attached console output from the lwip_lx example).
I tested under Ubuntu 14.04 LTS in my old build environment as well as on a vanilla 16.04 LTS with a freshly installed genode toolchain & the current master. Other examples, such as the demo scenario, run without any problems.
I have found an older discussion on the list from 2014 about failed memory mappings, but the thread ended without coming to a real conclusion. I'd be more than glad for any idea what where to look for possible reasons for this behavior.
[..]
[init -> linux_nic_drv] Error: _map_local: lx_mmap failed(addr_in=0x0, addr_out=0xffffffffffffffea/-22) overmap=0 [init -> linux_nic_drv] Error: LD: exception during program load: 'Genode::Region_map::Region_conflict' [init -> linux_nic_drv] Error: Uncaught exception of type 'Genode::Region_map::Region_conflict' [init -> linux_nic_drv] Warning: abort called - thread: ep Warning: blocking canceled in entrypoint constructor [init] child "linux_nic_drv" exited with exit value 1
The linux_nic_drv is a hybrid component, which means it is part of the Genode scenario but also links to Linux host libraries to use the tap device for networking. Therefore, the component should be loaded by the linux loader and not Genode's ldso. This can be fixed by declaring
<start name="linux_nic_drv" ld="no">
in the linux_nic_drv start node. Beyond that I advise you against using the lwip_lx ruin script because it has further issues and is unmaintained. Please refer to repos/libports/run/fetchurl.lwip and incorporate the linux_nic_drv. All auto-tested (and thus maintained) run scripts can be found in tool/autopilot.list.
[init -> test-lwip_httpsrv] Error: LD: symbol not found: '_nsyyin' [init -> test-lwip_httpsrv] Error: Uncaught exception of type 'Linker::Not_found' [init -> test-lwip_httpsrv] Warning: abort called - thread: ep [init] child "test-lwip_httpsrv" exited with exit value 1
I can't reconstruct this error and have no idea where it stems from. I suspect your source directory is not clean (from info in your log).
Genode 18.11-117-ged65267 <local changes>
You may also rerun the following.
./tool/ports/prepare_port libc lwip
Regards