1

Watchdog should wait for the worker to shutdown by Smjert · Pull Request #7116 ·...

 2 years ago
source link: https://github.com/osquery/osquery/pull/7116
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Member

Smjert commented on May 20, 2021

  • Wait for the worker to shutdown
  • Increase the default alarm timeout to 15 seconds, but limit the minimum to 10
  • Stop extensions and the worker in parallel, so that the time it takes
    to stop them doesn't always fully add up.

Fixes #7073

The alarm timeout has been increased to a default of 15 seconds which is ample time and should be below the most common services timeout for each platform (last time I checked 20 seconds are the timeout for macOS, other platforms have more).

The minimum limit of 10 seconds is to give some breathing space for the processes to close, especially the worker if it's processing some query. With that limit the worker would actually have 6 seconds to close gracefully and 2 to close brutally/via SIGKILL.
I think that in general to avoid corruption of the DB it's better to leave some time so that the processes can close gracefully.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK