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

Unload module causes crash #6

Open
tolitski opened this issue Feb 17, 2017 · 5 comments
Open

Unload module causes crash #6

tolitski opened this issue Feb 17, 2017 · 5 comments
Labels
bug pinned Pinned - Keeps stale issues from being auto closed

Comments

@tolitski
Copy link
Contributor

When the command module unload is executed on chan_echolink, the entire asterisk system crashes.

@N4IRS N4IRS added the bug label Feb 17, 2017
@N4IRS
Copy link
Contributor

N4IRS commented Mar 10, 2017

While chasing this I found that chan_echolink is not the only module that segfaults on unload.
chan_voter and chan_tlb also segfault on unload. All three have the same code in unload_module
unload_crash.txt

In the text file I posted there is a log_warning that I added while debugging.

@KG7QIN
Copy link
Collaborator

KG7QIN commented Mar 22, 2017

It has been a while since I looked at the code for these, but the modules typically have the "old" and "new" hooks for registering themselves with Asterisk and provide routines for loading (setup) and unloading (cleanup).

it is very likely that the modules above are using an incorrect hook for unloading (likely due to a conditional compile directive) so the code that would cleanup before the module is unloaded is not included in the compiled binary, causing the segfault.

@tolitski
Copy link
Contributor Author

tolitski commented Mar 22, 2017 via email

@KG7QIN
Copy link
Collaborator

KG7QIN commented Mar 22, 2017

Possibly, but what also needs to be done is to check to make sure that the cleanup routines are indeed freeing any memory/pointers that were allocated prior to telling Asterisk it can unload the module -- and causing the segfault.

@stale
Copy link

stale bot commented Apr 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 30, 2020
@KG7QIN KG7QIN added pinned Pinned - Keeps stale issues from being auto closed and removed wontfix labels Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pinned Pinned - Keeps stale issues from being auto closed
Projects
None yet
Development

No branches or pull requests

3 participants