New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774143 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

mojo::edk::Init is called several times

Project Member Reported by chiniforooshan@chromium.org, Oct 12 2017

Issue description

For example, once in service_manager::Main and again in service_manager::RunStandaloneService. The 2nd Init call will create an orphaned mojo::edk::Core (the previous global Core is not deleted).

See https://chromium-review.googlesource.com/c/chromium/src/+/682974 's description and comments for why the fix is not trivial.
 

Comment 1 by roc...@chromium.org, Oct 12 2017

I don't understand why this is non-trivial. service_manager::RunStandaloneService is only invoked by service_manager::Main, so we can just remove the Init call from RunStandaloneService.

Comment 2 by roc...@chromium.org, Oct 12 2017

There are probably also other cases in certain unit test suites where we suffer from duplicate initialization, but those are less concerning I think.
Sorry, I meant making sure Init is called once in "all possible initialization" paths (including in tests) is not trivial :)


Yes, one can fix just the RunStandaloneService case as you suggested (however, also note that in that scenario the 2nd call actually changes the config and that should be handled, too).

Comment 4 by roc...@chromium.org, Oct 12 2017

Right, we want the configuration from service_manager::Main anyway though.
Cc: jcivelli@chromium.org
Cc: -roc...@chromium.org rockot@google.com

Sign in to add a comment