Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Orphaned taskprocessors cause shutdown delays #379

Closed
1 task done
gtjoseph opened this issue Oct 19, 2023 · 0 comments · Fixed by #380
Closed
1 task done

[bug]: Orphaned taskprocessors cause shutdown delays #379

gtjoseph opened this issue Oct 19, 2023 · 0 comments · Fixed by #380
Assignees
Labels
bug support-level-core Functionality with core support level

Comments

@gtjoseph
Copy link
Member

Severity

Trivial

Versions

18,20,21,master

Components/Modules

res_pjsip_exten_state.c,res_pjsip_mwi.c

Operating Environment

all

Frequency of Occurrence

Constant

Issue Description

Commit f66f77f last year prevents the res_pjsip_exten_state and res_pjsip_mwi modules from unloading due to possible pjproject asserts if the modules are reloaded. A side effect of the implementation is that the taskprocessors these modules use aren't being released. When asterisk is doing a graceful shutdown, it waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all taskprocessors to stop but since those 2 modules don't release theirs, the shutdown hangs for that amount of time. It's not a long wait but it can be annoying when you're doing things like using the leak sanitizer since that requires a graceful shutdown.

Relevant log output

ERROR[1993568]: taskprocessor.c:338 tps_shutdown: Asertion may occur, the following taskprocessors are still runing:
ERROR[1993568]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/exten_state'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-00000068'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-00000069'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-0000006a'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-0000006b'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-0000006c'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-0000006d'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-0000006e'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'pjsip/mwi-0000006f'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1171@default-00000079'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1172@default-00000077'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1173@default-00000078'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1174@default-00000073'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1175@default-00000074'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1176@default-00000070'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1177@default-00000071'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1178@default-00000075'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1179@default-00000076'
ERROR[1983902]: taskprocessor.c:349 tps_shutdown: taskprocessor 'stasis/p:mwi:all/1180@default-00000072'

Asterisk Issue Guidelines

  • Yes, I have read the Asterisk Issue Guidelines
@gtjoseph gtjoseph added bug triage support-level-core Functionality with core support level and removed triage labels Oct 19, 2023
@gtjoseph gtjoseph self-assigned this Oct 19, 2023
gtjoseph added a commit to gtjoseph/asterisk that referenced this issue Oct 19, 2023
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: asterisk#379
asterisk-org-access-app bot pushed a commit that referenced this issue Oct 20, 2023
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
asterisk-org-access-app bot pushed a commit that referenced this issue Oct 20, 2023
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
asterisk-org-access-app bot pushed a commit that referenced this issue Oct 20, 2023
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
asterisk-org-access-app bot pushed a commit that referenced this issue Oct 20, 2023
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
asterisk-org-access-app bot pushed a commit that referenced this issue Jan 12, 2024
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
(cherry picked from commit 3e4024e)
asterisk-org-access-app bot pushed a commit that referenced this issue Jan 12, 2024
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
(cherry picked from commit 9efc4bd)
asterisk-org-access-app bot pushed a commit that referenced this issue Jan 12, 2024
Commit f66f77f last year prevents the res_pjsip_exten_state and
res_pjsip_mwi modules from unloading due to possible pjproject
asserts if the modules are reloaded. A side effect of the
implementation is that the taskprocessors these modules use aren't
being released. When asterisk is doing a graceful shutdown, it
waits AST_TASKPROCESSOR_SHUTDOWN_MAX_WAIT seconds for all
taskprocessors to stop but since those 2 modules don't release
theirs, the shutdown hangs for that amount of time.

This change allows the modules to be unloaded and their resources to
be released when ast_shutdown_final is true.

Resolves: #379
(cherry picked from commit b9ee664)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug support-level-core Functionality with core support level
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant