[Home]

Summary:ASTERISK-30345: loader.c: Modules that decline to load cannot be reloaded
Reporter:N A (InterLinked)Labels:
Date Opened:2022-12-08 15:40:17.000-0600Date Closed:2023-01-05 06:13:20.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/General
Versions:20.0.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Currently, if a module declines to load, dlclose() isn't called, as the module stays "registered" but not loaded. When trying to unload the module, loader.c currently whines that the module isn't loaded and then bails. This can be problematic because it makes it impossible to unload a module that never loaded in the first place, meaning that if a module is uploaded, the shared object module can't be reloaded without completely restarting Asterisk, since there are unclosed dlopen references.

This fixes this by actually unloaded the module if an explicit request to do so is received, so that it can be loaded from scratch the next time.
Comments:By: Asterisk Team (asteriskteam) 2022-12-08 15:40:20.962-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Friendly Automation (friendly-automation) 2023-01-05 06:13:21.475-0600

Change 19808 merged by George Joseph:
loader: Allow declined modules to be unloaded.

[https://gerrit.asterisk.org/c/asterisk/+/19808|https://gerrit.asterisk.org/c/asterisk/+/19808]

By: Friendly Automation (friendly-automation) 2023-01-05 06:13:25.111-0600

Change 19657 merged by George Joseph:
loader: Allow declined modules to be unloaded.

[https://gerrit.asterisk.org/c/asterisk/+/19657|https://gerrit.asterisk.org/c/asterisk/+/19657]

By: Friendly Automation (friendly-automation) 2023-01-05 06:13:28.138-0600

Change 19809 merged by George Joseph:
loader: Allow declined modules to be unloaded.

[https://gerrit.asterisk.org/c/asterisk/+/19809|https://gerrit.asterisk.org/c/asterisk/+/19809]