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

Michael Bradeen asteriskteam at digium.com
Wed Feb 9 12:53:13 CST 2022


Attention is currently required from: Joshua Colp, Kevin Harwell, Benjamin Keith Ford.
Michael Bradeen has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17955 )

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


Patch Set 6:

(5 comments)

File include/asterisk/taskprocessor.h:

https://gerrit.asterisk.org/c/asterisk/+/17955/comment/d9fe4b0f_0ac5bbb8 
PS5, Line 67: #define AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT 10
> Move this to taskprocessor.c since it's not referenced from anywhere else.
Done


File main/taskprocessor.c:

https://gerrit.asterisk.org/c/asterisk/+/17955/comment/d675384b_1c7d546e 
PS5, Line 306:     		"taskprocessor shutdown with %d tps object(s) still allocated.\n",	objcount);
> There is a "tab" after the comma here. Should be a space.
Done


https://gerrit.asterisk.org/c/asterisk/+/17955/comment/cd9d5940_cbed7556 
PS5, Line 311:   			while(nanosleep(&delay, &delay));
> Put a space between the "while" and "("
Done


https://gerrit.asterisk.org/c/asterisk/+/17955/comment/45d1524f_d9ee6415 
PS5, Line 317: 			delay.tv_sec = 1;
             : 			delay.tv_sec = 0;
             : 		}
> Log a notice or something on each loop so the user is aware of what's going on. […]
Done


https://gerrit.asterisk.org/c/asterisk/+/17955/comment/86aace43_a6518f11 
PS5, Line 325:   		ast_log(LOG_ERROR,
             :     		"taskprocessor shutdown while tasks still runing, assertion may occur!\n");
> Think it would make sense here to also log the names of any taskprocessors still in the container. […]
Done



-- 
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: 6
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: Benjamin Keith Ford <bford at digium.com>
Gerrit-Comment-Date: Wed, 09 Feb 2022 18:53:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220209/0659bd94/attachment.html>


More information about the asterisk-code-review mailing list