Hi David,
On 03/08/2016 10:15 PM, David Werner wrote:
Hi Genode-mailing-list,
i have a little problem with my ram and rm custom implementations.
When i try to create a child component which uses my custom sessions/services by running the following code:
int main(void) { PDBG("--- start proxy_server ---\n");
PDBG("--- announcing proxy services --- "); Cap_connection cap; static Sliced_heap sliced_heap(env()->ram_session(), env()->rm_session()); enum { STACK_SIZE = 8*1024 }; static Rpc_entrypoint ep(&cap, STACK_SIZE, "proxy_ep"); static Proxy::Prm_root prm_root(&ep, &ep, &sliced_heap); PDBG("PRM_root created and back in server-main!"); static Proxy::Pram_root pram_root(&ep, &ep, &sliced_heap); PDBG("PRAM_root created and back in server-main!");
env()->parent()->announce(ep.manage(&prm_root)); PDBG("PRM service announced!");
env()->parent()->announce(ep.manage(&pram_root)); PDBG("PRAM service announced!");
PDBG("--- starting test child ---"); /* Creating session for child environment */ static Rom_connection rom("proxy_test_client"); static Pd_connection pd; static Proxy::Pram_connection pram; <---------------- custom
service, execution fails here. static Cpu_connection cpu; static Proxy::Prm_connection prm; <---------------- custom service static Cap_connection child_cap;
/* declaring ref account for child's ram session and transferring
quota */
enum { CHILD_QUOTA = 1*1024*1024 }; pram.ref_account(env()->ram_session_cap());
env()->ram_session()->transfer_quota(pram.ram_cap(), CHILD_QUOTA);
/* creating test child */ Test_child proxy_test_child(rom.dataspace(), pd.cap(), pram.cap(),
cpu.cap(), prm.cap(), &child_cap);
PDBG("--- proxy_server is going to sleep ---"); sleep_forever(); PDBG("Server still awake - This output should not be reached!"); return 0;
}
I get this output:
Genode 15.11-71-g2e0e767 int main(): --- create local services --- int main(): --- start init --- int main(): transferred 112 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open ROM session for module "ld.lib.so" [init -> proxy_server] int main(): --- start proxy_server --- [init -> proxy_server] int main(): --- announcing proxy services --- [init -> proxy_server] Proxy::Prm_root::Prm_root(Genode::Rpc_entrypoint*, Genode::Rpc_entrypoint*, Genode::Allocator*): Creating Prm_root_component... [init -> proxy_server] int main(): PRM_root created and back in server-main! [init -> proxy_server] Proxy::Pram_root::Pram_root(Genode::Rpc_entrypoint*, Genode::Rpc_entrypoint*, Genode::Allocator*): Creating Pram_root_component... [init -> proxy_server] int main(): PRAM_root created and back in server-main! [init -> proxy_server] int main(): PRM service announced! [init -> proxy_server] int main(): PRAM service announced! [init -> proxy_server] int main(): --- starting test child --- [init -> proxy_server] virtual Proxy::Pram_session_component* Proxy::Pram_root::_create_session(const char*): Creating Pram_session_component...
KERNEL: Warning: nothing mapped: (Obj_space) from [0xfffffffffccfe5d8/38]: 0000000000000237 size: 0000000000000001 to [0xfffffffffccfe5d8/38]
Here the Fiasco.OC kernel claims that a capability should be mapped from one component to another, which failed because it was invalid. It seems it actually is a mapping within the same component (due to the same task addresses in square brackets).
Error: Test execution timed out make: *** [run/proxy] Fehler 254
I have no idea why this may happen. When running a component which is started by init and which is no child of my server component opening a
connection to my custom service works perfectly fine.
Are you sure that in the scenario, where the child is created directly by init, your service's PRAM and PRM interfaces are used at all? When you route the child's RM and RAM session requests to your component that does not mean they are used to create the child. For this purpose the routes of init itself are decisive. Only RM and RAM sessions opened by the child itself are routed according to the child's policy.
I'd be very grateful for a little bit of help here.
I would localize further where in the creation of Pram_session_component the kernel warning is shown. You can always enter the kernel debugger via 'enter_kdebug("some string");'. Also enabling IPC logging in the kernel debugger shortly before the kernel warning might help you. You can inspect the IPC log messages via the trace buffer again within the kernel debugger.
I'm afraid I cannot help you without more knowledge about your implementation details.
Regards Stefan
Best regards,
David
Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main