manager.c: Add CLI command to kick AMI sessions.#486
Merged
asterisk-org-access-app[bot] merged 1 commit intoMar 21, 2024
Conversation
Contributor
Author
|
cherry-pick-to: 18 |
gtjoseph
requested changes
Dec 11, 2023
Member
There was a problem hiding this comment.
session kicked is being leaked....
From leak sanitizer...
*CLI> manager show connected
Username IP Address Start Elapsed FileDes HttpCnt Read Write
test 127.0.0.1 1702314226 6 26 0 04079 04851
*CLI> manager kick session 26
Kicking manager session connected using file descriptor 26
*CLI> [Dec 11 10:04:30] == Manager 'test' kicked from 127.0.0.1
*CLI> manager show connected
Username IP Address Start Elapsed FileDes HttpCnt Read Write
0 users connected.
*CLI> core stop gracefully
Direct leak of 1576 byte(s) in 1 object(s) allocated from:
#0 0x7fc4b281393a in __interceptor_calloc (/lib64/liblsan.so.0+0x1393a) (BuildId: 076f298eb96a5f09f5ad6f392a25f85db2d186d4)
#1 0x464911 in __ast_repl_calloc /usr/src/asterisk/asterisk/main/astmm.c:1537
#2 0x464b38 in __ast_calloc /usr/src/asterisk/asterisk/main/astmm.c:1607
#3 0x46643e in internal_ao2_alloc /usr/src/asterisk/asterisk/main/astobj2.c:697
#4 0x4667b6 in __ao2_alloc /usr/src/asterisk/asterisk/main/astobj2.c:771
#5 0x658439 in build_mansession /usr/src/asterisk/asterisk/main/manager.c:2357
#6 0x66a440 in session_do /usr/src/asterisk/asterisk/main/manager.c:7655
#7 0x5df776 in handle_tcptls_connection /usr/src/asterisk/asterisk/main/tcptls.c:274
#8 0x5fcf6d in dummy_start /usr/src/asterisk/asterisk/main/utils.c:1607
#9 0x7fc4b16ac896 in start_thread (/lib64/libc.so.6+0x8e896) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)
Indirect leak of 136 byte(s) in 1 object(s) allocated from:
#0 0x7fc4b281393a in __interceptor_calloc (/lib64/liblsan.so.0+0x1393a) (BuildId: 076f298eb96a5f09f5ad6f392a25f85db2d186d4)
#1 0x464911 in __ast_repl_calloc /usr/src/asterisk/asterisk/main/astmm.c:1537
#2 0x464b38 in __ast_calloc /usr/src/asterisk/asterisk/main/astmm.c:1607
#3 0x46643e in internal_ao2_alloc /usr/src/asterisk/asterisk/main/astobj2.c:697
#4 0x4667b6 in __ao2_alloc /usr/src/asterisk/asterisk/main/astobj2.c:771
#5 0x46a600 in __ao2_container_alloc_hash /usr/src/asterisk/asterisk/main/astobj2_hash.c:1079
#6 0x46a67e in __ao2_container_alloc_list /usr/src/asterisk/asterisk/main/astobj2_hash.c:1089
#7 0x6584bf in build_mansession /usr/src/asterisk/asterisk/main/manager.c:2363
#8 0x66a440 in session_do /usr/src/asterisk/asterisk/main/manager.c:7655
#9 0x5df776 in handle_tcptls_connection /usr/src/asterisk/asterisk/main/tcptls.c:274
#10 0x5fcf6d in dummy_start /usr/src/asterisk/asterisk/main/utils.c:1607
#11 0x7fc4b16ac896 in start_thread (/lib64/libc.so.6+0x8e896) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)
Indirect leak of 136 byte(s) in 1 object(s) allocated from:
#0 0x7fc4b281393a in __interceptor_calloc (/lib64/liblsan.so.0+0x1393a) (BuildId: 076f298eb96a5f09f5ad6f392a25f85db2d186d4)
#1 0x464911 in __ast_repl_calloc /usr/src/asterisk/asterisk/main/astmm.c:1537
#2 0x464b38 in __ast_calloc /usr/src/asterisk/asterisk/main/astmm.c:1607
#3 0x46643e in internal_ao2_alloc /usr/src/asterisk/asterisk/main/astobj2.c:697
#4 0x4667b6 in __ao2_alloc /usr/src/asterisk/asterisk/main/astobj2.c:771
#5 0x46a600 in __ao2_container_alloc_hash /usr/src/asterisk/asterisk/main/astobj2_hash.c:1079
#6 0x46a67e in __ao2_container_alloc_list /usr/src/asterisk/asterisk/main/astobj2_hash.c:1089
#7 0x658481 in build_mansession /usr/src/asterisk/asterisk/main/manager.c:2362
#8 0x66a440 in session_do /usr/src/asterisk/asterisk/main/manager.c:7655
#9 0x5df776 in handle_tcptls_connection /usr/src/asterisk/asterisk/main/tcptls.c:274
#10 0x5fcf6d in dummy_start /usr/src/asterisk/asterisk/main/utils.c:1607
#11 0x7fc4b16ac896 in start_thread (/lib64/libc.so.6+0x8e896) (BuildId: 788cdd41a15985bf8e0a48d213a46e07d58822df)
This adds a CLI command that can be used to manually kick specific AMI sessions. Resolves: asterisk#485 UserNote: The "manager kick session" CLI command now allows kicking a specified AMI session.
7fbb4cb to
3b1cf8c
Compare
jcolp
approved these changes
Dec 27, 2023
mbradeen
reviewed
Jan 23, 2024
mbradeen
approved these changes
Jan 23, 2024
Contributor
|
This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed. |
gtjoseph
approved these changes
Mar 21, 2024
|
Successfully merged to branch master and cherry-picked to ["18","20","21"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a CLI command that can be used to manually kick specific AMI sessions.
Resolves: #485
UserNote: The "manager kick session" CLI command now allows kicking a specified AMI session.