{"action":"created","issue":{"url":"https://api.github.com/repos/genodelabs/genode/issues/2452","repository_url":"https://api.github.com/repos/genodelabs/genode","labels_url":"https://api.github.com/repos/genodelabs/genode/issues/2452/labels{/name}","comments_url":"https://api.github.com/repos/genodelabs/genode/issues/2452/comments","events_url":"https://api.github.com/repos/genodelabs/genode/issues/2452/events","html_url":"https://github.com/genodelabs/genode/issues/2452","id":236971995,"number":2452,"title":"init: child exit leaves dangling services","user":{"login":"ehmry","id":537775,"avatar_url":"https://avatars2.githubusercontent.com/u/537775?v=3","gravatar_id":"","url":"https://api.github.com/users/ehmry","html_url":"https://github.com/ehmry","followers_url":"https://api.github.com/users/ehmry/followers","following_url":"https://api.github.com/users/ehmry/following{/other_user}","gists_url":"https://api.github.com/users/ehmry/gists{/gist_id}","starred_url":"https://api.github.com/users/ehmry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehmry/subscriptions","organizations_url":"https://api.github.com/users/ehmry/orgs","repos_url":"https://api.github.com/users/ehmry/repos","events_url":"https://api.github.com/users/ehmry/events{/privacy}","received_events_url":"https://api.github.com/users/ehmry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-19T18:00:21Z","updated_at":"2017-06-22T18:51:04Z","closed_at":null,"body":"Consider the case of a component waiting on a driver to initialize and announce a service. If the driver fails to initialize and exits then any component waiting for the driver service should suffer ``Service_denied`` and continue without the service or exit, rather than wait indefinitely. This is most obvious when running scenarios on linux that require the alsa driver, but the driver cannot obtain exclusive access to the device.\r\n"},"comment":{"url":"https://api.github.com/repos/genodelabs/genode/issues/comments/310469616","html_url":"https://github.com/genodelabs/genode/issues/2452#issuecomment-310469616","issue_url":"https://api.github.com/repos/genodelabs/genode/issues/2452","id":310469616,"user":{"login":"nfeske","id":1268399,"avatar_url":"https://avatars2.githubusercontent.com/u/1268399?v=3","gravatar_id":"","url":"https://api.github.com/users/nfeske","html_url":"https://github.com/nfeske","followers_url":"https://api.github.com/users/nfeske/followers","following_url":"https://api.github.com/users/nfeske/following{/other_user}","gists_url":"https://api.github.com/users/nfeske/gists{/gist_id}","starred_url":"https://api.github.com/users/nfeske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfeske/subscriptions","organizations_url":"https://api.github.com/users/nfeske/orgs","repos_url":"https://api.github.com/users/nfeske/repos","events_url":"https://api.github.com/users/nfeske/events{/privacy}","received_events_url":"https://api.github.com/users/nfeske/received_events","type":"User","site_admin":false},"created_at":"2017-06-22T18:51:04Z","updated_at":"2017-06-22T18:51:04Z","body":"I am not confident that the approach of destroying the services of the child will work in all cases. The session objects referring to those services still exist and point to those service objects. Hence, we end up with dangling pointers.\r\n\r\nAnother problem is that service objects are created whenever a new configuration is imported. With the patch, if a server exited, its services would be destroyed on the event of the exit. However when importing the next config (apply_config) new service objects will be created because they appear in the config. To sum it up, the service objects should mirror the configuration, not runtime-dependent state. So the approach goes against the grain of init's design.\r\n\r\nA better way to reflect a server exit as a `Service_denied` error would be to change the state of all sessions that are targeting the exited server but are not established yet. We would not destroy any object but merely change the session state to `SERVICE_DENIED` and wake up the client."}}
{"actor":{"display_login":"nfeske"}}