Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Clean websocket Server Shutdown #20

@jkuszmaul

Description

@jkuszmaul

Currently, when shutting down, the websocket server will sometimes end up corrupting/overwriting random bits of memory and cause seg faults while the process is shutting down (this is mostly an issue when running tests while also having the UI open). I do not believe that there is currently a clean way to shut down the websocket server (there may or may not be any mechanism for it in the websocket library).

Reproduce by:

  1. Build //control:control_test locally.
  2. Open at least 3 tabs of UI pages (not sure why, but for some reason it always worked fine with just 2 windows/tabs on my machine).
  3. Run //control:control_test
  4. Generally speaking, it will then segfault (sometimes SIG_ABRT gets thrown, noting some corrupted doubly-linked list) in between Square and StartInIrons tests (may require running once or twice; I never needed more than 3 tries to reproduce the segfault, and rarely even a second).
  5. If you redo this, but with the hub_ member variable in //ui:server removed (i.e., clearing out the websocket server), then there will be no issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions