Discussion:
Release 17.05, base-hw, environment ROM session denied error
Bob Stewart
2017-06-12 20:43:50 UTC
Permalink
Hi,

Migrating over to release 17.05 from 17.02, I'm getting errors from

an unknown source when a os server starts. Grepping for the error

message or portions of it yields nothing and the error tells me nothing

I can relate to. The error does not occur on previous releases.


The complete run script output is attached but the lines at issue are

the dozen or so lines:

"[init] Error: ctrl_module: environment ROM session denied (label="ctrl_module",

ram_quota=6144, cap_quota=3, diag=0) "

What is this message telling me?

Also, further down the log is the following output:


init -> gpio_drv] resource_request: ram_quota=0, cap_quota=4

[init -> gpio_drv] used before freeing emergency=276K

[init -> gpio_drv] used after freeing emergency=260K

I believe these are a result of the gpio server setting up a session through the session interface.

Is the resource request only for the capabilities storage space?...asking for no ram would not

make sense.

The second and third lines would appear to indicate that init had to make an emergency allocation

of ram but that would not make sense either as it was given control of over 400 MB and the loaded

binaries have consumed a small fraction of that.

So how should I interprete this message sequence?

Thanks in advance for any enlightenment.

Bob Stewart

Get Outlook for Android<https://aka.ms/ghei36>
Norman Feske
2017-06-13 08:26:57 UTC
Permalink
Hi Bob,

> "[init] Error: ctrl_module: environment ROM session denied
> (label="ctrl_module",
>
> ram_quota=6144, cap_quota=3, diag=0) "
>
> What is this message telling me?

traditionally, init created the initial sessions (aka environment
sessions) of its children on the children's behalf without considering
any child-specific routing. I.e., a child's PD session, CPU session, the
ROM session with the executable binary, the ROM session with the dynamic
linker were created by init directly via 'Connection' objects.
Therefore, there was no need to route those sessions explicitly in the
configuration.

With version 16.11 and 17.02 [1], we revised the child-creation
procedure. Now, the environment sessions are subjected to the routing
rules as dictated by init's configuration.

[1]
http://genode.org/documentation/release-notes/17.02#Routing_of_environment_sessions

In short, your routing rules for the "ctrl_module" lack a valid route
for the executable binary.

> Also, further down the log is the following output:
>
>
> init -> gpio_drv] resource_request: ram_quota=0,
> cap_quota=4
>
> [init -> gpio_drv] used before freeing
> emergency=276K
>
> [init -> gpio_drv] used after freeing emergency=260K
>
> I believe these are a result of the gpio server setting up a session
> through the session interface.

The 'gpio_drv' component runs out of its capability quota and politely
asks its parent (init) for more (cap_quota=4). Capability quotas are new
in version 17.05 and are described at [2].

[2]
http://genode.org/documentation/release-notes/17.05#Assignment_and_trading_of_capability_quota

You may try to specify a 'caps=200' attribute to the start node of the
corresponding component.

Cheers
Norman

--
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Bob Stewart
2017-06-13 14:32:40 UTC
Permalink
Thanks for the reply, Norman.

I doubt that it is related to explicit routing declarations as I have a default routing set to go through all parents, all children. Or, am I misunderstanding routing? This run script and component code work in 16.11 and 17.02. So the problem is being caused by a change in 17.05.

I finally looked into child.h. The actual error is Service Denied. The ctrl_module component which is having this start up problem is trying to establish a session to a server which accesses a core-only service. I had to create this service because the SOC requires privileged access to enable hardware subsystems or to establish a specific gpio pin mux setting. The associated code has been working well since 2015. I'll trace the code back to the origin of the Service Denied state and find out what I have missed in the 17.05 changes.

Regarding the two log lines:

[init -> gpio_drv] used before freeing emergency=276K
[init -> gpio_drv] used after freeing emergency=260K

These seem to be indicating an emergency allocation of memory had to be made. Does that mean the components RAM quota was insufficient?

Thanks,
Bob
Get Outlook for Android<https://aka.ms/ghei36>



________________________________
From: Norman Feske <***@genode-labs.com>
Sent: Tuesday, June 13, 2017 4:26:57 AM
To: genode-***@lists.sourceforge.net
Subject: Re: Release 17.05, base-hw, environment ROM session denied error

Hi Bob,

> "[init] Error: ctrl_module: environment ROM session denied
> (label="ctrl_module",
>
> ram_quota=6144, cap_quota=3, diag=0) "
>
> What is this message telling me?

traditionally, init created the initial sessions (aka environment
sessions) of its children on the children's behalf without considering
any child-specific routing. I.e., a child's PD session, CPU session, the
ROM session with the executable binary, the ROM session with the dynamic
linker were created by init directly via 'Connection' objects.
Therefore, there was no need to route those sessions explicitly in the
configuration.

With version 16.11 and 17.02 [1], we revised the child-creation
procedure. Now, the environment sessions are subjected to the routing
rules as dictated by init's configuration.

[1]
http://genode.org/documentation/release-notes/17.02#Routing_of_environment_sessions

In short, your routing rules for the "ctrl_module" lack a valid route
for the executable binary.

> Also, further down the log is the following output:
>
>
> init -> gpio_drv] resource_request: ram_quota=0,
> cap_quota=4
>
> [init -> gpio_drv] used before freeing
> emergency=276K
>
> [init -> gpio_drv] used after freeing emergency=260K
>
> I believe these are a result of the gpio server setting up a session
> through the session interface.

The 'gpio_drv' component runs out of its capability quota and politely
asks its parent (init) for more (cap_quota=4). Capability quotas are new
in version 17.05 and are described at [2].

[2]
http://genode.org/documentation/release-notes/17.05#Assignment_and_trading_of_capability_quota

You may try to specify a 'caps=200' attribute to the start node of the
corresponding component.

Cheers
Norman

--
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Stefan Kalkowski
2017-06-14 08:24:35 UTC
Permalink
Hi Bob,

On 06/13/2017 04:32 PM, Bob Stewart wrote:
> Thanks for the reply, Norman.
>
> I doubt that it is related to explicit routing declarations as I have a
> default routing set to go through all parents, all children. Or, am I
> misunderstanding routing? This run script and component code work in
> 16.11 and 17.02. So the problem is being caused by a change in 17.05.
>
> I finally looked into child.h. The actual error is Service Denied. The
> ctrl_module component which is having this start up problem is trying to
> establish a session to a server which accesses a core-only service. I
> had to create this service because the SOC requires privileged access to
> enable hardware subsystems or to establish a specific gpio pin mux
> setting. The associated code has been working well since 2015. I'll
> trace the code back to the origin of the Service Denied state and find
> out what I have missed in the 17.05 changes.
>
> Regarding the two log lines:
>
> [init -> gpio_drv] used before freeing emergency=276K
> [init -> gpio_drv] used after freeing emergency=260K
>
> These seem to be indicating an emergency allocation of memory had to be
> made. Does that mean the components RAM quota was insufficient?
>

Apart from the hints mentioned by Norman, we observed a regression
related to base-hw after introducing the new capability quota trading in
Genode. It has to do with capability memory shortage in the kernel. The
already available memory upgrade mechanism does not work correctly
anymore, because it got overloaded with other PD session upgrades. The
emergency memory release you are observing can be an indicator for this
problem.
Unfortunately, the regression got part of the release 17.05, but there
are two commits available that solve the problem. Those are its hashes:

fb447f0727ca84d2f8907c344fa1954b7a9b217e
e54b7174bcdb3fdc47d5b99e501c3620ea131caf

Alternatively, you may use today's staging branch to proceed, which do
already contain both commits.

Best regards
Stefan

> Thanks,
> Bob
> Get Outlook for Android <https://aka.ms/ghei36>
>
>
>
> ------------------------------------------------------------------------
> *From:* Norman Feske <***@genode-labs.com>
> *Sent:* Tuesday, June 13, 2017 4:26:57 AM
> *To:* genode-***@lists.sourceforge.net
> *Subject:* Re: Release 17.05, base-hw, environment ROM session denied error
>
> Hi Bob,
>
>> "[init] Error: ctrl_module: environment ROM session denied
>> (label="ctrl_module",
>>
>> ram_quota=6144, cap_quota=3, diag=0) "
>>
>> What is this message telling me?
>
> traditionally, init created the initial sessions (aka environment
> sessions) of its children on the children's behalf without considering
> any child-specific routing. I.e., a child's PD session, CPU session, the
> ROM session with the executable binary, the ROM session with the dynamic
> linker were created by init directly via 'Connection' objects.
> Therefore, there was no need to route those sessions explicitly in the
> configuration.
>
> With version 16.11 and 17.02 [1], we revised the child-creation
> procedure. Now, the environment sessions are subjected to the routing
> rules as dictated by init's configuration.
>
> [1]
> http://genode.org/documentation/release-notes/17.02#Routing_of_environment_sessions
>
> In short, your routing rules for the "ctrl_module" lack a valid route
> for the executable binary.
>
>> Also, further down the log is the following output:
>>
>>
>> init -> gpio_drv] resource_request: ram_quota=0,
>> cap_quota=4
>>
>> [init -> gpio_drv] used before freeing
>> emergency=276K
>>
>> [init -> gpio_drv] used after freeing emergency=260K
>>
>> I believe these are a result of the gpio server setting up a session
>> through the session interface.
>
> The 'gpio_drv' component runs out of its capability quota and politely
> asks its parent (init) for more (cap_quota=4). Capability quotas are new
> in version 17.05 and are described at [2].
>
> [2]
> http://genode.org/documentation/release-notes/17.05#Assignment_and_trading_of_capability_quota
>
> You may try to specify a 'caps=200' attribute to the start node of the
> corresponding component.
>
> Cheers
> Norman
>
> --
> Dr.-Ing. Norman Feske
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> genode-main mailing list
> genode-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> genode-main mailing list
> genode-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>

--
Stefan Kalkowski
Genode Labs

https://github.com/skalk · http://genode.org/
Bob Stewart
2017-06-14 13:06:27 UTC
Permalink
Hi Stefan, thanks for the reply.

I see those two commits and I'll checkout "staging" on the weekend once I figure out my issue with my core-only service access.

Bob

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Stefan Kalkowski <***@genode-labs.com>
Sent: Wednesday, June 14, 2017 4:24:35 AM
To: genode-***@lists.sourceforge.net
Subject: Re: Release 17.05, base-hw, environment ROM session denied error

Hi Bob,

On 06/13/2017 04:32 PM, Bob Stewart wrote:
> Thanks for the reply, Norman.
>
> I doubt that it is related to explicit routing declarations as I have a
> default routing set to go through all parents, all children. Or, am I
> misunderstanding routing? This run script and component code work in
> 16.11 and 17.02. So the problem is being caused by a change in 17.05.
>
> I finally looked into child.h. The actual error is Service Denied. The
> ctrl_module component which is having this start up problem is trying to
> establish a session to a server which accesses a core-only service. I
> had to create this service because the SOC requires privileged access to
> enable hardware subsystems or to establish a specific gpio pin mux
> setting. The associated code has been working well since 2015. I'll
> trace the code back to the origin of the Service Denied state and find
> out what I have missed in the 17.05 changes.
>
> Regarding the two log lines:
>
> [init -> gpio_drv] used before freeing emergency=276K
> [init -> gpio_drv] used after freeing emergency=260K
>
> These seem to be indicating an emergency allocation of memory had to be
> made. Does that mean the components RAM quota was insufficient?
>

Apart from the hints mentioned by Norman, we observed a regression
related to base-hw after introducing the new capability quota trading in
Genode. It has to do with capability memory shortage in the kernel. The
already available memory upgrade mechanism does not work correctly
anymore, because it got overloaded with other PD session upgrades. The
emergency memory release you are observing can be an indicator for this
problem.
Unfortunately, the regression got part of the release 17.05, but there
are two commits available that solve the problem. Those are its hashes:

fb447f0727ca84d2f8907c344fa1954b7a9b217e
e54b7174bcdb3fdc47d5b99e501c3620ea131caf

Alternatively, you may use today's staging branch to proceed, which do
already contain both commits.

Best regards
Stefan

> Thanks,
> Bob
> Get Outlook for Android <https://aka.ms/ghei36>
>
>
>
> ------------------------------------------------------------------------
> *From:* Norman Feske <***@genode-labs.com>
> *Sent:* Tuesday, June 13, 2017 4:26:57 AM
> *To:* genode-***@lists.sourceforge.net
> *Subject:* Re: Release 17.05, base-hw, environment ROM session denied error
>
> Hi Bob,
>
>> "[init] Error: ctrl_module: environment ROM session denied
>> (label="ctrl_module",
>>
>> ram_quota=6144, cap_quota=3, diag=0) "
>>
>> What is this message telling me?
>
> traditionally, init created the initial sessions (aka environment
> sessions) of its children on the children's behalf without considering
> any child-specific routing. I.e., a child's PD session, CPU session, the
> ROM session with the executable binary, the ROM session with the dynamic
> linker were created by init directly via 'Connection' objects.
> Therefore, there was no need to route those sessions explicitly in the
> configuration.
>
> With version 16.11 and 17.02 [1], we revised the child-creation
> procedure. Now, the environment sessions are subjected to the routing
> rules as dictated by init's configuration.
>
> [1]
> http://genode.org/documentation/release-notes/17.02#Routing_of_environment_sessions
>
> In short, your routing rules for the "ctrl_module" lack a valid route
> for the executable binary.
>
>> Also, further down the log is the following output:
>>
>>
>> init -> gpio_drv] resource_request: ram_quota=0,
>> cap_quota=4
>>
>> [init -> gpio_drv] used before freeing
>> emergency=276K
>>
>> [init -> gpio_drv] used after freeing emergency=260K
>>
>> I believe these are a result of the gpio server setting up a session
>> through the session interface.
>
> The 'gpio_drv' component runs out of its capability quota and politely
> asks its parent (init) for more (cap_quota=4). Capability quotas are new
> in version 17.05 and are described at [2].
>
> [2]
> http://genode.org/documentation/release-notes/17.05#Assignment_and_trading_of_capability_quota
>
> You may try to specify a 'caps=200' attribute to the start node of the
> corresponding component.
>
> Cheers
> Norman
>
> --
> Dr.-Ing. Norman Feske
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> genode-main mailing list
> genode-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> genode-main mailing list
> genode-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>

--
Stefan Kalkowski
Genode Labs

https://github.com/skalk · http://genode.org/
Bob Stewart
2017-06-19 00:34:46 UTC
Permalink
Those two commits in "staging" have gotten rid of the emergency allocation warnings, Stefan. Thanks for the suggestion.

Bob

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Bob Stewart <***@gmail.com>
Sent: Wednesday, June 14, 2017 9:06:27 AM
To: genode-***@lists.sourceforge.net; Genode OS Framework Mailing List
Subject: Re: Release 17.05, base-hw, environment ROM session denied error

Hi Stefan, thanks for the reply.

I see those two commits and I'll checkout "staging" on the weekend once I figure out my issue with my core-only service access.

Bob

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Stefan Kalkowski <***@genode-labs.com>
Sent: Wednesday, June 14, 2017 4:24:35 AM
To: genode-***@lists.sourceforge.net
Subject: Re: Release 17.05, base-hw, environment ROM session denied error

Hi Bob,

On 06/13/2017 04:32 PM, Bob Stewart wrote:
> Thanks for the reply, Norman.
>
> I doubt that it is related to explicit routing declarations as I have a
> default routing set to go through all parents, all children. Or, am I
> misunderstanding routing? This run script and component code work in
> 16.11 and 17.02. So the problem is being caused by a change in 17.05.
>
> I finally looked into child.h. The actual error is Service Denied. The
> ctrl_module component which is having this start up problem is trying to
> establish a session to a server which accesses a core-only service. I
> had to create this service because the SOC requires privileged access to
> enable hardware subsystems or to establish a specific gpio pin mux
> setting. The associated code has been working well since 2015. I'll
> trace the code back to the origin of the Service Denied state and find
> out what I have missed in the 17.05 changes.
>
> Regarding the two log lines:
>
> [init -> gpio_drv] used before freeing emergency=276K
> [init -> gpio_drv] used after freeing emergency=260K
>
> These seem to be indicating an emergency allocation of memory had to be
> made. Does that mean the components RAM quota was insufficient?
>

Apart from the hints mentioned by Norman, we observed a regression
related to base-hw after introducing the new capability quota trading in
Genode. It has to do with capability memory shortage in the kernel. The
already available memory upgrade mechanism does not work correctly
anymore, because it got overloaded with other PD session upgrades. The
emergency memory release you are observing can be an indicator for this
problem.
Unfortunately, the regression got part of the release 17.05, but there
are two commits available that solve the problem. Those are its hashes:

fb447f0727ca84d2f8907c344fa1954b7a9b217e
e54b7174bcdb3fdc47d5b99e501c3620ea131caf

Alternatively, you may use today's staging branch to proceed, which do
already contain both commits.

Best regards
Stefan

> Thanks,
> Bob
> Get Outlook for Android <https://aka.ms/ghei36>
>
>
>
> ------------------------------------------------------------------------
> *From:* Norman Feske <***@genode-labs.com>
> *Sent:* Tuesday, June 13, 2017 4:26:57 AM
> *To:* genode-***@lists.sourceforge.net
> *Subject:* Re: Release 17.05, base-hw, environment ROM session denied error
>
> Hi Bob,
>
>> "[init] Error: ctrl_module: environment ROM session denied
>> (label="ctrl_module",
>>
>> ram_quota=6144, cap_quota=3, diag=0) "
>>
>> What is this message telling me?
>
> traditionally, init created the initial sessions (aka environment
> sessions) of its children on the children's behalf without considering
> any child-specific routing. I.e., a child's PD session, CPU session, the
> ROM session with the executable binary, the ROM session with the dynamic
> linker were created by init directly via 'Connection' objects.
> Therefore, there was no need to route those sessions explicitly in the
> configuration.
>
> With version 16.11 and 17.02 [1], we revised the child-creation
> procedure. Now, the environment sessions are subjected to the routing
> rules as dictated by init's configuration.
>
> [1]
> http://genode.org/documentation/release-notes/17.02#Routing_of_environment_sessions
>
> In short, your routing rules for the "ctrl_module" lack a valid route
> for the executable binary.
>
>> Also, further down the log is the following output:
>>
>>
>> init -> gpio_drv] resource_request: ram_quota=0,
>> cap_quota=4
>>
>> [init -> gpio_drv] used before freeing
>> emergency=276K
>>
>> [init -> gpio_drv] used after freeing emergency=260K
>>
>> I believe these are a result of the gpio server setting up a session
>> through the session interface.
>
> The 'gpio_drv' component runs out of its capability quota and politely
> asks its parent (init) for more (cap_quota=4). Capability quotas are new
> in version 17.05 and are described at [2].
>
> [2]
> http://genode.org/documentation/release-notes/17.05#Assignment_and_trading_of_capability_quota
>
> You may try to specify a 'caps=200' attribute to the start node of the
> corresponding component.
>
> Cheers
> Norman
>
> --
> Dr.-Ing. Norman Feske
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> genode-main mailing list
> genode-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> genode-main mailing list
> genode-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>

--
Stefan Kalkowski
Genode Labs

https://github.com/skalk · http://genode.org/
Loading...