My setup/environment: - Source: Branch: master Date: Thu Jun 29 00:18:26 2017 +0200 commit 0d1be4abe2294155e36bc0eb0c1cd61499f08d93 - Target-genode-System: nova x86_64 - Host-System: genode-x86-gcc (GCC) 6.3.0 Ubuntu 17.04 QEMU emulator version 2.8.0(Debian 1:2.8+dfsg-3ubuntu2.3)
Hi @all,
I try to run following system scenario:
make run/launcher KERNEL=nova
but it fails with endless loop of following warning: ... Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) ...
I want to fix that and try to understand what is the root cause for this warning. I read the documentation, mainly 6.2.2. Resource assignment -> Capability budget. But I'm not smart enough to understand this ;-), again I'm a newbie :-). Is there some other documentation or another chapter that I should read ? By the way, I read the hole old documentation 16.05 before.
What I try/understand: In [BUILD_DIR]/var/run/launcher.run I see following: ... <default caps="50"/> ... <start name="drivers" caps="300"> ...
At start time I see following output: ... 5072 MiB RAM and 63254 caps assigned to init ... [init -> drivers] Warning: platform_drv: assigned caps (200) exceed available caps (123) [init -> drivers] Warning: fb_drv: assigned caps (100) exceed available caps (0) [init -> drivers] Warning: ps2_drv: assigned caps (60) exceed available caps (0) [init -> drivers] Warning: usb_drv: assigned caps (100) exceed available caps (0) [init -> drivers] Warning: input_filter: assigned caps (80) exceed available caps (0) Warning: PD (init -> drivers) cap limit (used=44, limit=70) exceeded during transfer_quota(28) [init -> drivers] Error: acpi_drv: unable to initialize cap quota of PD Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 2 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 4 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4)
First, I didn't found any <start> configuration for: - platform_drv - fb_drv - usb_drv - input_filter
But I see at startup time that they are loaded into rom fs: ... :rom_fs: ROM modules: ... ROM: [000000007fb45000,000000007fb86db0) fb_drv ... ROM: [000000007ffe2000,000000007ffff740) input_filter ... ROM: [000000007f6e3000,000000007f71d6d0) platform_drv ... ROM: [000000007fe03000,000000007fef5830) usb_drv ...
I think the root cause is following Error: [init -> drivers] Error: acpi_drv: unable to initialize cap quota of PD I understand that the acpi_drv component need X caps to transfer to the drivers component. But how many caps ?
Then I try to understand the warning for example: [init -> drivers] Warning: ps2_drv: assigned caps (60) exceed available caps (0) What I understand after reading the documentation: ps2_drv try to give the drivers component 60 caps but they have only 0 caps left?
Also I try to understand the following warning: Warning: PD (init -> drivers) cap limit (used=44, limit=70) exceeded during transfer_quota(28) I understand: The drivers component used 44 caps. The component need additional caps of 28 but the limit of 70 caps is exceeded. (44 + 28 = 72 > 70) Why limit 70? In the start configuration we set for the drivers component 300 caps.
So I read in the documentation, that we can enable a diagnostic mode for the PD session. I try this but even then, I did not understand the logs. Here what I get: ... Genode 17.05-86-g0d1be4abe <local changes> 5072 MiB RAM and 63254 caps assigned to init PD (init -> drivers) consumed RPC cap (used=7, limit=280) PD (init -> drivers) consumed RPC cap (used=8, limit=280) PD (init -> drivers) consumed signal-source cap (used=10, limit=280) PD (init -> drivers) consumed RPC cap (used=11, limit=280) PD (init -> drivers) consumed signal-context cap (used=12, limit=280) PD (init -> drivers) transferred 3 caps to 'init' (used=12, limit=277) PD (init -> drivers) transferred 3 caps to 'init' (used=13, limit=280) ... PD (init -> drivers) consumed signal-context cap (used=14, limit=280) PD (init -> drivers) consumed signal-context cap (used=15, limit=280) PD (init -> drivers) consumed signal-context cap (used=16, limit=280) ... PD (init -> drivers) consumed RPC cap (used=18, limit=280) PD (init -> drivers) consumed RPC cap (used=19, limit=280) PD (init -> drivers) consumed RPC cap (used=21, limit=280) PD (init -> drivers) consumed RPC cap (used=22, limit=280) PD (init -> drivers) consumed RPC cap (used=24, limit=280) [init -> drivers] Warning: platform_drv: assigned caps (200) exceed available caps (123) PD (init -> drivers) consumed RPC cap (used=25, limit=280) PD (init -> drivers) consumed RPC cap (used=26, limit=280) PD (init -> drivers) consumed RPC cap (used=28, limit=280) [init -> drivers] Warning: fb_drv: assigned caps (100) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=30, limit=280) PD (init -> drivers) consumed RPC cap (used=31, limit=280) [init -> drivers] Warning: ps2_drv: assigned caps (60) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=33, limit=280) PD (init -> drivers) consumed RPC cap (used=34, limit=280) [init -> drivers] Warning: usb_drv: assigned caps (100) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=38, limit=280) PD (init -> drivers) consumed RPC cap (used=39, limit=280) PD (init -> drivers) consumed RPC cap (used=41, limit=280) [init -> drivers] Warning: input_filter: assigned caps (80) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=42, limit=280) PD (init -> drivers) consumed RPC cap (used=43, limit=280) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=267) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> input_filter' (used=44, limit=267) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=254) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> usb_drv' (used=44, limit=254) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=241) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> ps2_drv' (used=44, limit=241) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=228) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> fb_drv' (used=44, limit=228) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=215) PD (init -> drivers) transferred 91 caps to 'init -> drivers -> platform_drv' (used=44, limit=124) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=111) PD (init -> drivers) transferred 28 caps to 'init -> drivers -> report_rom' (used=44, limit=83) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=70) Warning: PD (init -> drivers) cap limit (used=44, limit=70) exceeded during transfer_quota(28) [init -> drivers] Error: acpi_drv: unable to initialize cap quota of PD PD (init -> drivers) transferred 4 caps to 'init' (used=44, limit=66) PD (init -> drivers) transferred 2 caps to 'init' (used=44, limit=64) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=61) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=58) PD (init -> drivers) transferred 4 caps to 'init' (used=44, limit=54) PD (init -> drivers) transferred 2 caps to 'init' (used=44, limit=52) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=49) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=46) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 2 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4
I start to read and understand the first line... PD (init -> drivers) consumed RPC cap (used=7, limit=280) The drivers component create/consumed a RPC cap and after that they used 7 caps with a limit of 280. Again, why the limit is set to 280 and not 300 ? How many caps are needed for the "RPC consumed" ? Because I see also following line: ... PD (init -> drivers) consumed RPC cap (used=39, limit=280) PD (init -> drivers) consumed RPC cap (used=41, limit=280) ... After consumed RPC cap and using of 39 caps, there is additional consumed RPC with a used of 41 ? Why not 40 ?
Next confusing lines for me: PD (init -> drivers) transferred 3 caps to 'init' (used=12, limit=277) Drivers transferred 3 caps from the limit of 277 to init? After that we get a limit of 280? PD (init -> drivers) transferred 3 caps to 'init' (used=13, limit=280)
etc. I add the full log below.
I'm really sure I missed something, but I don't know what. Maybe the root cause is somewhere else. Hopefully somebody give me a hint and/or explain me the log output of "caps" warning. I found the log in the source but even that, I'm not fully understand the purpose of the log.
Thanks Regards Jörg
NOVA Microhypervisor v7-0d1be4a (x86_64): Aug 1 2017 07:27:06 [gcc 6.3.0] [MBI]
[ 0] TSC:2807562 kHz BUS:1005026 kHz (measured) [ 0] TSC:2000000 kHz BUS:1000000 kHz (adjusted due to instable TSC) [ 0] CORE:0:0:0 6:f:b:0 [0] Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz Hypervisor reports 1x1 CPU Warning: CPU has no invariant TSC. CPU ID (genode->kernel:package:core:thread) remapping remap (0->0:0:0:0) boot cpu Hypervisor info page contains 10 memory descriptors: core image [0000000000100000,0000000000bcc000) binaries region [0000000000226000,0000000000bcc000) free for reuse detected physical memory: 0x0000000000000000 - size: 0x000000000009fc00 use physical memory: 0x0000000000000000 - size: 0x000000000009f000 detected physical memory: 0x0000000000100000 - size: 0x00000000bfee0000 use physical memory: 0x0000000000100000 - size: 0x00000000bfee0000 detected physical memory: 0x0000000100000000 - size: 0x0000000080000000 use physical memory: 0x0000000100000000 - size: 0x0000000080000000 :virt_alloc: Allocator 0x1e78f0 dump: Block: [0000000000002000,0000000000003000) size=4K avail=0 max_avail=0 Block: [0000000000003000,0000000000004000) size=4K avail=0 max_avail=0 Block: [0000000000004000,0000000000005000) size=4K avail=0 max_avail=0 Block: [0000000000005000,0000000000006000) size=4K avail=0 max_avail=0 Block: [0000000000006000,0000000000007000) size=4K avail=0 max_avail=0 Block: [0000000000007000,0000000000008000) size=4K avail=0 max_avail=0 Block: [0000000000008000,0000000000009000) size=4K avail=0 max_avail=0 Block: [0000000000009000,000000000000a000) size=4K avail=0 max_avail=0 Block: [000000000000a000,000000000000b000) size=4K avail=0 max_avail=0 Block: [000000000000b000,000000000000c000) size=4K avail=0 max_avail=0 Block: [000000000000c000,000000000000d000) size=4K avail=0 max_avail=0 Block: [000000000000d000,000000000000e000) size=4K avail=0 max_avail=0 Block: [000000000000e000,000000000000f000) size=4K avail=0 max_avail=0 Block: [000000000000f000,0000000000010000) size=4K avail=0 max_avail=0 Block: [0000000000010000,0000000000011000) size=4K avail=0 max_avail=0 Block: [0000000000011000,0000000000012000) size=4K avail=0 max_avail=0 Block: [0000000000012000,0000000000013000) size=4K avail=0 max_avail=0 Block: [0000000000013000,0000000000014000) size=4K avail=0 max_avail=137434760164K Block: [0000000000014000,0000000000015000) size=4K avail=0 max_avail=0 Block: [0000000000015000,0000000000016000) size=4K avail=0 max_avail=0 Block: [0000000000016000,0000000000017000) size=4K avail=0 max_avail=0 Block: [0000000000017000,0000000000018000) size=4K avail=0 max_avail=0 Block: [0000000000018000,0000000000019000) size=4K avail=0 max_avail=0 Block: [0000000000019000,000000000001a000) size=4K avail=0 max_avail=0 Block: [000000000001a000,000000000001b000) size=4K avail=0 max_avail=0 Block: [000000000001b000,000000000001c000) size=4K avail=0 max_avail=0 Block: [000000000001c000,000000000001d000) size=4K avail=0 max_avail=0 Block: [000000000001d000,000000000001e000) size=4K avail=0 max_avail=0 Block: [000000000001e000,000000000001f000) size=4K avail=0 max_avail=0 Block: [000000000001f000,0000000000020000) size=4K avail=0 max_avail=0 Block: [0000000000020000,0000000000021000) size=4K avail=0 max_avail=0 Block: [0000000000021000,0000000000022000) size=4K avail=0 max_avail=0 Block: [0000000000022000,0000000000023000) size=4K avail=0 max_avail=0 Block: [0000000000023000,0000000000024000) size=4K avail=0 max_avail=0 Block: [0000000000024000,0000000000025000) size=4K avail=0 max_avail=0 Block: [0000000000025000,0000000000026000) size=4K avail=0 max_avail=137434760164K Block: [0000000000026000,0000000000027000) size=4K avail=0 max_avail=0 Block: [0000000000027000,0000000000028000) size=4K avail=0 max_avail=0 Block: [0000000000028000,0000000000029000) size=4K avail=0 max_avail=0 Block: [0000000000029000,000000000002a000) size=4K avail=0 max_avail=0 Block: [000000000002a000,000000000002b000) size=4K avail=0 max_avail=0 Block: [000000000002b000,000000000002c000) size=4K avail=0 max_avail=836K Block: [000000000002c000,000000000002d000) size=4K avail=0 max_avail=0 Block: [000000000002d000,000000000002e000) size=4K avail=0 max_avail=836K Block: [000000000002e000,000000000002f000) size=4K avail=0 max_avail=0 Block: [000000000002f000,0000000000100000) size=836K avail=836K max_avail=836K Block: [0000000000226000,0000000000227000) size=4K avail=0 max_avail=0 Block: [0000000000227000,0000000000228000) size=4K avail=0 max_avail=137434760164K Block: [0000000000228000,0000000000229000) size=4K avail=0 max_avail=0 Block: [0000000000229000,00000000a0000000) size=2619228K avail=2619228K max_avail=2619228K Block: [00000000b0000000,00000000bfeff000) size=261116K avail=261116K max_avail=137434760164K Block: [00000000bff04000,00007fffbfffd000) size=137434760164K avail=137434760164K max_avail=137434760164K => mem_size=140736144932864 (134216446 MB) / mem_avail=140736144736256 (134216446 MB)
:phys_alloc: Allocator 0x1e6820 dump: Block: [0000000000001000,0000000000002000) size=4K avail=0 max_avail=0 Block: [0000000000002000,0000000000003000) size=4K avail=0 max_avail=0 Block: [0000000000003000,0000000000004000) size=4K avail=0 max_avail=0 Block: [0000000000004000,0000000000005000) size=4K avail=0 max_avail=0 Block: [0000000000005000,0000000000006000) size=4K avail=0 max_avail=0 Block: [0000000000006000,0000000000007000) size=4K avail=0 max_avail=0 Block: [0000000000007000,0000000000008000) size=4K avail=0 max_avail=0 Block: [0000000000008000,0000000000009000) size=4K avail=0 max_avail=0 Block: [0000000000009000,000000000000a000) size=4K avail=0 max_avail=0 Block: [000000000000a000,000000000000b000) size=4K avail=0 max_avail=0 Block: [000000000000b000,000000000000c000) size=4K avail=0 max_avail=0 Block: [000000000000c000,000000000000d000) size=4K avail=0 max_avail=0 Block: [000000000000d000,000000000000e000) size=4K avail=0 max_avail=0 Block: [000000000000e000,000000000000f000) size=4K avail=0 max_avail=0 Block: [000000000000f000,0000000000010000) size=4K avail=0 max_avail=0 Block: [0000000000010000,0000000000011000) size=4K avail=0 max_avail=0 Block: [0000000000011000,0000000000012000) size=4K avail=0 max_avail=0 Block: [0000000000012000,0000000000013000) size=4K avail=0 max_avail=0 Block: [0000000000013000,0000000000014000) size=4K avail=0 max_avail=0 Block: [0000000000014000,0000000000015000) size=4K avail=0 max_avail=0 Block: [0000000000015000,0000000000016000) size=4K avail=0 max_avail=0 Block: [0000000000016000,0000000000017000) size=4K avail=0 max_avail=0 Block: [0000000000017000,0000000000018000) size=4K avail=0 max_avail=0 Block: [0000000000018000,0000000000019000) size=4K avail=0 max_avail=2G Block: [0000000000019000,000000000001a000) size=4K avail=0 max_avail=0 Block: [000000000001a000,000000000001b000) size=4K avail=0 max_avail=0 Block: [000000000001b000,000000000001c000) size=4K avail=0 max_avail=0 Block: [000000000001c000,000000000001d000) size=4K avail=0 max_avail=0 Block: [000000000001d000,000000000001e000) size=4K avail=0 max_avail=0 Block: [000000000001e000,000000000001f000) size=4K avail=0 max_avail=0 Block: [000000000001f000,0000000000020000) size=4K avail=0 max_avail=0 Block: [0000000000020000,0000000000021000) size=4K avail=0 max_avail=0 Block: [0000000000021000,0000000000022000) size=4K avail=0 max_avail=0 Block: [0000000000022000,0000000000023000) size=4K avail=0 max_avail=0 Block: [0000000000023000,0000000000024000) size=4K avail=0 max_avail=0 Block: [0000000000024000,0000000000025000) size=4K avail=0 max_avail=2G Block: [0000000000025000,0000000000026000) size=4K avail=0 max_avail=0 Block: [0000000000026000,0000000000027000) size=4K avail=0 max_avail=0 Block: [0000000000027000,0000000000028000) size=4K avail=0 max_avail=0 Block: [0000000000028000,0000000000029000) size=4K avail=0 max_avail=0 Block: [0000000000029000,000000000002a000) size=4K avail=0 max_avail=0 Block: [000000000002a000,000000000002b000) size=4K avail=0 max_avail=0 Block: [000000000002b000,000000000002c000) size=4K avail=0 max_avail=0 Block: [000000000002c000,000000000002d000) size=4K avail=0 max_avail=444K Block: [000000000002d000,000000000002e000) size=4K avail=0 max_avail=0 Block: [000000000002e000,000000000002f000) size=4K avail=0 max_avail=444K Block: [000000000002f000,0000000000030000) size=4K avail=0 max_avail=0 Block: [0000000000030000,000000000009f000) size=444K avail=444K max_avail=444K Block: [0000000000100000,0000000000101000) size=4K avail=0 max_avail=2G Block: [0000000000101000,0000000000102000) size=4K avail=0 max_avail=0 Block: [0000000000102000,0000000001000000) size=15352K avail=15352K max_avail=15352K Block: [0000000003400000,0000000003401000) size=4K avail=0 max_avail=2G Block: [0000000003401000,000000007f533000) size=2032840K avail=2032840K max_avail=2032840K Block: [0000000080001000,00000000bffe0000) size=1048444K avail=1048444K max_avail=2G Block: [0000000100000000,0000000180000000) size=2G avail=2G max_avail=2G => mem_size=5319098368 (5072 MB) / mem_avail=5318893568 (5072 MB)
:io_mem_alloc: Allocator 0x1e89d8 dump: Block: [0000000000000000,0000000000001000) size=4K avail=4K max_avail=4K Block: [000000000009f000,0000000000100000) size=388K avail=388K max_avail=388K Block: [00000000bffe0000,0000000100000000) size=1048704K avail=1048704K max_avail=18014398503190524K Block: [0000000180000000,fffffffffffff000) size=18014398503190524K avail=18014398503190524K max_avail=18014398503190524K => mem_size=18446744068341370880 (17592186039296 MB) / mem_avail=18446744068341370880 (17592186039296 MB)
:rom_fs: ROM modules: ROM: [000000007ff33000,000000007ff49448) acpi_drv ROM: [000000007fbdf000,000000007fbf5e58) backdrop ROM: [000000007fb09000,000000007fb0b1ae) config ROM: [000000007f65a000,000000007f688850) decorator ROM: [000000007f819000,000000007f819357) decorator_init.config ROM: [000000007ff4b000,000000007ffc7ba8) device_pd ROM: [000000007ffc8000,000000007ffc923e) drivers.config ROM: [000000007fa83000,000000007fa845d1) en_us.chargen ROM: [000000007fb45000,000000007fb86db0) fb_drv ROM: [000000007ff4a000,000000007ff4a033) fb_drv.config ROM: [000000007fab2000,000000007fad0b68) floating_window_layouter ROM: [000000007faed000,000000007faf1d38) genode_logo.png ROM: [000000007fa85000,000000007fa85246) grid.png ROM: [000000000002e000,000000000002f000) hypervisor_info_page ROM: [000000007fef6000,000000007ff326d0) init ROM: [000000007ffe2000,000000007ffff740) input_filter ROM: [000000007f83e000,000000007f83e1e5) input_filter.config ROM: [000000007fc54000,000000007fc96580) launcher ROM: [000000007f71e000,000000007f7cbb70) launchpad ROM: [000000007f9d7000,000000007fa82b28) ld.lib.so ROM: [000000007fc97000,000000007fdc8068) libc.lib.so ROM: [000000007f7f1000,000000007f8184a0) libm.lib.so ROM: [000000007fc2a000,000000007fc53cb0) libpng.lib.so ROM: [000000007fb0c000,000000007fb44eb0) liquid_fb ROM: [000000007fdc9000,000000007fdebd00) menu_view ROM: [000000007f82f000,000000007f83e000) menu_view_styles.tar ROM: [000000007f6c8000,000000007f6e20d8) nit_fader ROM: [000000007fbf6000,000000007fc0d9c8) nit_fb ROM: [000000007fc0e000,000000007fc29310) nitlog ROM: [000000007f689000,000000007f6c72d0) nitpicker ROM: [000000007f6e3000,000000007f71d6d0) platform_drv ROM: [000000000002c000,000000000002d000) platform_info ROM: [000000007fbb5000,000000007fbc4ce0) pointer ROM: [000000007fbc5000,000000007fbddcf8) ps2_drv ROM: [000000007ffca000,000000007ffe1770) report_rom ROM: [000000007fdec000,000000007fe02ba0) rom_filter ROM: [000000007f83f000,000000007f9d6148) scout ROM: [000000007fad1000,000000007faec5f8) status_bar ROM: [000000007f7cc000,000000007f7f0740) test-libpng_static ROM: [000000007fba1000,000000007fbb4088) testnit ROM: [000000007f81a000,000000007f82e6a8) timer ROM: [000000007fe03000,000000007fef5830) usb_drv ROM: [000000007fa86000,000000007fab18a0) wm ROM: [000000007fbde000,000000007fbdec92) wm.config ROM: [000000007fb87000,000000007fba0268) xray_trigger ROM: [000000007faf2000,000000007fb08208) zlib.lib.so
Genode 17.05-86-g0d1be4abe <local changes> 5072 MiB RAM and 63254 caps assigned to init PD (init -> drivers) consumed RPC cap (used=7, limit=280) PD (init -> drivers) consumed RPC cap (used=8, limit=280) PD (init -> drivers) consumed signal-source cap (used=10, limit=280) PD (init -> drivers) consumed RPC cap (used=11, limit=280) PD (init -> drivers) consumed signal-context cap (used=12, limit=280) PD (init -> drivers) transferred 3 caps to 'init' (used=12, limit=277) PD (init -> drivers) transferred 3 caps to 'init' (used=13, limit=280) [init] child "decorator_config" announces service "ROM" [init] child "report_rom" announces service "Report" [init] child "report_rom" announces service "ROM" PD (init -> drivers) consumed signal-context cap (used=14, limit=280) PD (init -> drivers) consumed signal-context cap (used=15, limit=280) PD (init -> drivers) consumed signal-context cap (used=16, limit=280) [init -> report_rom] Warning: parsing legacy <rom> policies [init] child "timer" announces service "Timer" [init -> report_rom] Warning: parsing legacy <rom> policies [init -> report_rom] Warning: parsing legacy <rom> policies [init -> report_rom] Warning: parsing legacy <rom> policies [init -> report_rom] Warning: parsing legacy <rom> policies [init -> decorator_config] upgrading quota donation for PD session (0 bytes, 4 caps) [init -> decorator_config] resource_request: ram_quota=0, cap_quota=4 [init] child "decorator_config" requests resources: ram_quota=0, cap_quota=4 [init -> report_rom] Warning: parsing legacy <rom> policies [init -> report_rom] Warning: parsing legacy <rom> policies Warning: PD (init -> layouter) cap limit (used=18, limit=18) exceeded during transfer_quota(3) [init -> layouter] resource_request: cap_quota=3 [init] child "layouter" requests resources: cap_quota=3 PD (init -> drivers) consumed RPC cap (used=18, limit=280) PD (init -> drivers) consumed RPC cap (used=19, limit=280) PD (init -> drivers) consumed RPC cap (used=21, limit=280) PD (init -> drivers) consumed RPC cap (used=22, limit=280) PD (init -> drivers) consumed RPC cap (used=24, limit=280) [init -> drivers] Warning: platform_drv: assigned caps (200) exceed available caps (123) PD (init -> drivers) consumed RPC cap (used=25, limit=280) PD (init -> drivers) consumed RPC cap (used=26, limit=280) PD (init -> drivers) consumed RPC cap (used=28, limit=280) [init -> drivers] Warning: fb_drv: assigned caps (100) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=30, limit=280) PD (init -> drivers) consumed RPC cap (used=31, limit=280) [init -> drivers] Warning: ps2_drv: assigned caps (60) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=33, limit=280) PD (init -> drivers) consumed RPC cap (used=34, limit=280) [init -> drivers] Warning: usb_drv: assigned caps (100) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=38, limit=280) PD (init -> drivers) consumed RPC cap (used=39, limit=280) PD (init -> drivers) consumed RPC cap (used=41, limit=280) [init -> drivers] Warning: input_filter: assigned caps (80) exceed available caps (0) PD (init -> drivers) consumed RPC cap (used=42, limit=280) PD (init -> drivers) consumed RPC cap (used=43, limit=280) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=267) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> input_filter' (used=44, limit=267) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=254) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> usb_drv' (used=44, limit=254) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=241) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> ps2_drv' (used=44, limit=241) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=228) PD (init -> drivers) transferred 0 caps to 'init -> drivers -> fb_drv' (used=44, limit=228) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=215) PD (init -> drivers) transferred 91 caps to 'init -> drivers -> platform_drv' (used=44, limit=124) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=111) PD (init -> drivers) transferred 28 caps to 'init -> drivers -> report_rom' (used=44, limit=83) PD (init -> drivers) transferred 13 caps to 'init' (used=44, limit=70) Warning: PD (init -> drivers) cap limit (used=44, limit=70) exceeded during transfer_quota(28) [init -> drivers] Error: acpi_drv: unable to initialize cap quota of PD PD (init -> drivers) transferred 4 caps to 'init' (used=44, limit=66) PD (init -> drivers) transferred 2 caps to 'init' (used=44, limit=64) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=61) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=58) PD (init -> drivers) transferred 4 caps to 'init' (used=44, limit=54) PD (init -> drivers) transferred 2 caps to 'init' (used=44, limit=52) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=49) PD (init -> drivers) transferred 3 caps to 'init' (used=44, limit=46) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 2 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 4 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 8 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 [init -> drivers] Warning: re-attempted CPU session request 16 times (args: diag=0, label="ps2_drv", ram_quota=36K, cap_quota=4) Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) [init -> drivers] resource_request: cap_quota=4 [init] child "drivers" requests resources: cap_quota=4 Expect: 'interact' received 'strg+c' and was cancelled
Hi Jörg,
thanks for the detailed description of the issue. Please find my comments inline.
I must admit that the launcher.run scenario is outdated since I use it very sporadically - only when working on one of the used components. Whenever I use it for this purpose, I use to run it on base-linux. So the current resource assignments are in general insufficient for other base platforms. It would be a good idea to move such kinds of "development-vehicle" scenarios to a dedicated place as discussed in [1] to spare people like you such negative surprises.
[1] https://github.com/genodelabs/genode/issues/1372
... Warning: PD (init -> drivers) cap limit (used=44, limit=46) exceeded during transfer_quota(4) ...
I want to fix that and try to understand what is the root cause for this warning. I read the documentation, mainly 6.2.2. Resource assignment -> Capability budget.
When a client creates a new session, its tells its parent to transfer some of the client's resources to the server. In this case, the client is willing to lend 4 caps to the server. The common parent of the client and server will try to decrease the limit of the client by 4 and increase the limit of the server by the same value. However, since client has only 2 unused caps on its account, this attempt fails.
This message points at a too scarce resource assignment for the 'drivers' subsystem. In the run script, there are merely 300 caps assigned to the 'drivers'. The value suffices for the little driver support needed for 'drivers_interactive-linux' but not for the much more complex 'drivers_interactive-pc' subsystem (as selected on NOVA). When setting the value to 1000 (as done in the wm.run script), the repeated error messages disappear.
While giving the scenario a quick spin, I observed another cap-quota issue, which is caused by the too low default value of 50 - the value used for all <start> notes that lack an explicit 'caps' attribute. By setting this value to 100, the scenario starts up with NOVA on Qemu (tested on the current staging branch). However, apparently the launcher component also needs a few quota adjustments. I just fixed the corresponding parts in the commit [2] on the staging branch. May you give it a try?
[2] https://github.com/genodelabs/genode/commit/94ef138f223ce6d9ab4a2608bc7cc73a...
But I'm not smart enough to understand this ;-), again I'm a newbie :-). Is there some other documentation or another chapter that I should read ? By the way, I read the hole old documentation 16.05 before.
The release notes for 17.05 may hopefully be helpful [3].
[3] http://genode.org/documentation/release-notes/17.05#Assignment_and_trading_o...
First, I didn't found any <start> configuration for:
- platform_drv
- fb_drv
- usb_drv
- input_filter
These components come from the 'drivers' subsystem, which is incorporated via the 'drivers_interactive-pc' depot package. The depot mechanism is brand new and may admittedly still be a bit rough around the edges. You can find its documentation at [4].
[4] http://genode.org/documentation/developer-resources/package_management
I think the root cause is following Error: [init -> drivers] Error: acpi_drv: unable to initialize cap quota of PD I understand that the acpi_drv component need X caps to transfer to the drivers component. But how many caps ?
You are spot on. The best practices regarding the assignment of cap quotas are still in flux. As a rule of thumb, I'd account 100 caps per component. The 'drivers' subsystem [5] is an init instance with 7 children (as of now). Hence, assigning 1000 caps to the subsystem seems to be reasonable.
[5] repos/os/recipes/raw/drivers_interactive-pc/drivers.config
Then I try to understand the warning for example: [init -> drivers] Warning: ps2_drv: assigned caps (60) exceed available caps (0) What I understand after reading the documentation: ps2_drv try to give the drivers component 60 caps but they have only 0 caps left?
It is a subsequent error of the one discussed above. During the creation of the 'drivers' children, the cap quota of the 'drivers' subsystem exhausts so that no caps are left for the PS2 driver. The problem is fixed with the increased quota of the 'drivers' subsystem.
Also I try to understand the following warning: Warning: PD (init -> drivers) cap limit (used=44, limit=70) exceeded during transfer_quota(28) I understand: The drivers component used 44 caps. The component need additional caps of 28 but the limit of 70 caps is exceeded. (44 + 28 = 72 > 70) Why limit 70? In the start configuration we set for the drivers component 300 caps.
The limit of a component decreases each time it creates a session to a service where it transfers some of its own quota limit to the server.
Initially, the limit of 'drivers' is 300. But as soon as 'drivers' creates sessions to the outside, its limit decreases step by step. You can think of the limit as the balance of a bank account. It you transfer money to another account, the balance decreases. The "used" value is the fraction of the quota that the component turned into actual resources (like RPC objects, dataspaces, signal handlers). To stay with the analogy, these are the purchased goods.
PD (init -> drivers) consumed RPC cap (used=41, limit=280) ... After consumed RPC cap and using of 39 caps, there is additional consumed RPC with a used of 41 ? Why not 40 ?
The messages only cover the allocation and destruction of RPC capabilities. But there are also dataspace capabilities and signal-context capabilities, which not shown but still are accounted for. The most likely case is that the component creates a signal handler or a dataspace.
But even the creation of an RPC object may result in the consumption of more than one capability: Whenever core needs to extend the backing store for its book keeping (e.g., for keeping track of the RPC caps created by a PD), core creates a new dataspace, which implicitly requires a dataspace capability. All these meta-data costs are accounted for.
I'm really sure I missed something, but I don't know what. Maybe the root cause is somewhere else. Hopefully somebody give me a hint and/or explain me the log output of "caps" warning. I found the log in the source but even that, I'm not fully understand the purpose of the log.
I hope the above explanation sounds logical. Thanks for bringing up this topic on the mailing list. You may not be the only one confused by the messages. Finally, let me compliment you for using the "diag" feature and for including all important details of your scenario at the start of your posting.
Cheers Norman
Hi Norman,
Am Freitag, 4. August 2017 11:56:38 CEST schrieb Norman Feske:
While giving the scenario a quick spin, I observed another cap-quota issue, which is caused by the too low default value of 50 - the value used for all <start> notes that lack an explicit 'caps' attribute. By setting this value to 100, the scenario starts up with NOVA on Qemu (tested on the current staging branch). However, apparently the launcher component also needs a few quota adjustments. I just fixed the corresponding parts in the commit [2] on the staging branch. May you give it a try?
[2] https://github.com/genodelabs/genode/commit/94ef138f223ce6d9ab4a2608bc7cc73a...
I have tested it quickly, I checkout staging (commit 005820bb7bf6cb8b833b4227b8377984df5f9ceb) and build the launcher scenario. Now the scenario is started. Thanks Norman for your quick fix.
The 'drivers' subsystem [5] is an init instance with 7 children (as of now). Hence, assigning 1000 caps to the subsystem seems to be reasonable.
[5] repos/os/recipes/raw/drivers_interactive-pc/drivers.config
Ok, drivers 'subsystem', that is what I missed. I haven't realized that the 'drivers.config' is a subsystem configuration.
The limit of a component decreases each time it creates a session to a service where it transfers some of its own quota limit to the server.
Initially, the limit of 'drivers' is 300. But as soon as 'drivers' creates sessions to the outside, its limit decreases step by step. You can think of the limit as the balance of a bank account. It you transfer money to another account, the balance decreases. The "used" value is the fraction of the quota that the component turned into actual resources (like RPC objects, dataspaces, signal handlers). To stay with the analogy, these are the purchased goods.
Ok, limit means also the 'free cap ressouces' for the component and this will be transfered to other 'server components'. 'used' is only showing the using of RPC objects, dataspaces, signal handlers of the actual/current component, not also from the other 'server component'. Now I got it.
I hope the above explanation sounds logical.
Yes, many thanks for your detailed explanation. I think, I understood now.
Thanks for bringing up this topic on the mailing list. You may not be the only one confused by the messages. Finally, let me compliment you for using the "diag" feature and for including all important details of your scenario at the start of your posting.
No, problem. I'm also a C++ developer in my company and I get sometimes 'problems/crash dumps' from my colleagues/customer to fix them without any infos (build/version number, etc) :-).
Cheers Jörg