Skip to content

Fix issues/races in RPZ code when shutting down.

Witold Krecicki requested to merge wpk-shutdown-rpz-crashes into master

Lock maint_lock on rpzs when detaching from an rpz, to make sure nobody changes anything. We set 'updaterunning' only after the first event was fired. We could have a race when we:

  1. send the event to updater task, updatepending=true, updaterunning=false
  2. shutdown, since updaterunning == false we don't purge events from task and free task structure that's enqueued
  3. task processed the, now freed, event, crash Fixed it by purging the event if it's linked. We detached updater task before all the events have been processed, now detach it only after all rpzs have been detached.

Merge request reports