Many Start/Stops in Launchpad cause crash with little core memory

Norman Feske norman.feske at ...1...
Fri Sep 24 14:20:39 CEST 2010


Hi Matthias,

> after playing around with the demo scenario and launchpad a bit, Genode
> exited with an error message:
> 
> “virtual bool Genode::Sliced_heap::alloc(Genode::size_t, void**): Could
> not allocate dataspace with size 4096”. More details on the setup below.
> The more memory is “left for core” (see comment before the lines in
> main.cc), the later this error message occurs. Is there any other
> possibility to avoid this behavior than increasing memory “left for
> core”? Or am I doing something wrong?

the observed behaviour stems from missing resource accounting for some
core services, most particularly the regions allocated by RM sessions.

In principle, Genode provides a mechanism for a client to lend memory
quota to a server during the use of a session. The concept is meant to
enable a server to use resources provided by the client only. However,
in core, not all services make use of this feature yet. For example, the
RM service for managing address spaces receives a quota donation of 4K
but the actual memory usage depends on how many regions are attached to
the RM session. A client that uses a lot of regions will consumes
unaccounted core memory, resulting in the effect that you observed. To
solve this issue, the RM session must restrict the number of regions
according to the RAM quota supplied by the client.

This is a known limitation, which is certainly on our list of things to
improve. It is not terribly hard to fix but until know, the work-around
of supplying some slack quota to core sufficed for our use cases. In a
production system, this issue should be fixed - and, if Genode is used
in such a setting, will do so, of course. :-)

Cheers
Norman




More information about the users mailing list