Skip to content

Improve and decide on shutdown handling #21

Open

Description

@cliffg-softwarelibre

Shutting down has lingering object cleanup issues. Investigate and improve shutdown logic. This may include using "post to the executor" logic instead of directly calling state change callbacks.

Activity

  1. cliffg-softwarelibre commented on Jun 4, 2019

    @cliffg-softwarelibre
    MemberAuthor

    Significant work has gone into shutdown logic improvement and is merged the week of June 3rd. However, there is still additional testing needed and design decisions to be made related to shutdown, so this issue remains open. Specifically, it is still to be decided whether all resources can and should be cleaned up in various destructors, or whether calling "stop" on a net_entity is required for graceful shutdown.

  2. cliffg-softwarelibre commented on Jul 6, 2019

    @cliffg-softwarelibre
    MemberAuthor

    All known internal shutdown sequencing issues have been addressed (there may still be undiscovered problems). However, there is an API / usage question still unresolved:

    • Do we require applications to call stop on a net_entity, or can we call stop in a destructor (which destructor and where is still TBD). Putting non-trivial code in a destructor can cause many different kinds of problems, but it's also questionable whether we should always require apps to call stop.
  3. changed the title [-]Improve internal shutdown handling[/-] [+]Improve and decide on shutdown handling[/+] on Jul 20, 2019
  4. self-assigned this
    on Nov 12, 2019
  5. n-deutsch commented on Nov 12, 2019

    @n-deutsch
    Member

    Going to investigate this while I'm waiting for PR #40 to get merged in

  6. cliffg-softwarelibre commented on Nov 19, 2019

    @cliffg-softwarelibre
    MemberAuthor

    A related possible change (and if needed we can create a separate issue): Chops Net IP uses std::make_shared consistently. In general, this is a "good thing". However, we may be the exception to the rule. Arne Metz has a good blog post:

    https://arne-mertz.de/2018/09/make_shared-vs-the-normal-shared_ptr-constructor/

    Part of this investigation should be changing the std::make_shared to new in appropriate places (i.e. for the shared pointers that will have associated weak pointers to them) to see how this affects shutdown and memory cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

code enhancementImprove or modernize code, no significant design changes

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions