Hello Zachary,
On 15.02.24 15:49, Zachary Zollers wrote:
Hello Genodians,
I am attempting to familiarize myself with some of the provided data structures. When playing around with the Registry class, I encountered an interesting error. [1] is a GitHub gist containing the code I am running. I am wanting to use the Registry class to keep track of services announced by children on a parent component. When looking though the Genode repository, this seemed to be the accepted way to do this (please correct me if I am misunderstanding). When I run this code, I get the following output:
Genode 23.11 87 MiB RAM and 63252 caps assigned to init [init -> parent] Child requested session: 'PD' Error: illegal READ at address 0x4 by pager_object: pd='init -> parent' thread='ep' ip=0x7acf4
I would like to pass a reference to the Registry to each instance of Child_policy so I can use services announced by other children. As an additional experiment however, I tried creating a new Registry as a class member for each Child_policy (see the comment at the top of the Tutorial::Child class). This resulted in the following output:
Genode 23.11 87 MiB RAM and 63252 caps assigned to init [init -> parent] Child requested session: 'PD'
To me, this indicates that the for_each call is blocking. I cannot see, however, what would be holding the mutex before I get to this point. Any pointers in the right direction would be greatly appreciated :)
[1] https://gist.github.com/zgzollers/48181fbc2dac6e51015602c6329593f9
without looking much into your code, does it help to add
! <service name="PD"/>
to the <parent-provides> node?
Regards,
Sebastian