Killing L4Linux

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue May 17 15:51:18 CEST 2005


On Tue May 17, 2005 at 02:51:47 -0700, gjoel123 at fastmail.fm wrote:
> I have gotten past the problem by adding the loader's "kill" code
> to l4linux2.4's  shutdown code: this avoids the permission problems (a
> thread is allowed
> to kill itself). I can halt l4linux completely by calling "halt" from
> bash. Thanks for your insight.

Another simple solution is just falling out of the main function. 2.6
uses that to exit.

> However, it seems like the memory manager does not correctly de-allocate
> memory:
> After starting and halting l4linux about 7 times, 
> the next time I load l4linux, I get 
> DMphys  | [7.0] dm_phys/server/src/pages.c:1148:dmphys_pages_allocate():
> DMphys  |  DMphys: no memory, size 65536KB, left 44968KB
> DMphys  | [7.0] dm_phys/server/src/open.c:97:__create_ds():
> DMphys  |  DMphys: memory allocation failed!
> l4lx    | [12.3] dm_mem/lib/clientlib/src/open.c:79:l4dm_mem_open():
> l4lx    |  libdm_mem: open dataspace at 7.00 failed (ret -2, exc 0)
> l4lx    | setup_l4env_memory: Can't get main memory: out of memory(-2)!
> 
> Every time I halt an l4linux, I still see it's info when I hit 'a'
> in the DROPS console:
>       .
>       .
> "vmlinuz-slave.l4env",#12
>   0 ds 70: 003ff000-0067e000 r-x beg
>     ds 71: 0067e000-00a5000 rwx 
>     ds 72: 00a6000-007880000 rwx 
>     ds 73: 007880000-00789000 r-- end
>   1 ds 74: 0000e000-0002e000 r-x share beg
>     ds 75: 0002e000-00034000 rw- share end
> "vmlinuz-slave.l4env",#12
>   0 ds 70: 003ff000-0067e000 r-x beg
>     ds 71: 0067e000-00a5000 rwx 
>     ds 72: 00a6000-007880000 rwx 
>     ds 73: 007880000-00789000 r-- end
>   1 ds 74: 0000e000-0002e000 r-x share beg
>     ds 75: 0002e000-00034000 rw- share end
> "vmlinuz-slave.l4env",#12
>   0 ds 70: 003ff000-0067e000 r-x beg
>     ds 71: 0067e000-00a5000 rwx 
>     ds 72: 00a6000-007880000 rwx 
>     ds 73: 007880000-00789000 r-- end
>   1 ds 74: 0000e000-0002e000 r-x share beg
>     ds 75: 0002e000-00034000 rw- share end
> 
> Any ideas? Is there a known bug in the memory manager?

Not really. There's a server called 'events' that listens for 'exit'
events and notifies all servers to free their resources, including
dm_phys. When using it memory is supposed to free up and the l4linux
entry in the list should disappear.

To use it start events as the first server and add an --events argument
to names, dm_phys, simple_ts, con and loader. 



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list