[Asterisk-code-review] taskprocessor.c: Prevent crash on graceful shutdown (asterisk[16])

Michael Bradeen asteriskteam at digium.com
Thu Feb 3 13:25:12 CST 2022


Attention is currently required from: Michael Bradeen.
Hello Joshua Colp, Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/17955

to look at the new patch set (#2).

Change subject: taskprocessor.c: Prevent crash on graceful shutdown
......................................................................

taskprocessor.c: Prevent crash on graceful shutdown

When tps_shutdown is called as part of the cleanup process there is a
chance that one of the taskprocessors that references the
tps_singletons object is still running.  The change is to allow for
tps_shutdown to check tps_singleton's container count and give the
running taskprocessors a chance to finish.  If after
AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT (10) seconds there are still
container references we shutdown anyway as this is most likely a bug
due to a taskprocessor not being unreferenced.

ASTERISK-29365

Change-Id: Ia932fc003d316389b9c4fd15ad6594458c9727f1
---
M include/asterisk/taskprocessor.h
M main/taskprocessor.c
2 files changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/55/17955/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17955
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia932fc003d316389b9c4fd15ad6594458c9727f1
Gerrit-Change-Number: 17955
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220203/2751ef91/attachment.html>


More information about the asterisk-code-review mailing list