[Home]

Summary:ASTERISK-28789: test_utils: incorrectly printing error 'declined to load'
Reporter:Alexander Traud (traud)Labels:
Date Opened:2020-03-24 06:47:32Date Closed:2020-03-31 12:33:34
Priority:MinorRegression?
Status:Closed/CompleteComponents:Tests/testsuite
Versions:16.9.0 17.3.0 Frequency of
Occurrence
Related
Issues:
Environment:no OpenSSL (development) headers either disabled or not found, in script ./configureAttachments:
Description:Because ASTERISK-28788 was caused by a general misunderstanding, it is the job of the Asterisk Team (or the author who introduced that change) to scan the whole code whether this misunderstanding happened in other modules as well. However, because I was curious, I created a script myself, which checked whether AST_MODULE_INFO (runtime) requires a library which was optional in MODULEINFO (compile time). Because of this script, I found one other module affected.

Again, at compile time, OpenSSL -lcrypto is optional. At runtime, OpenSSL libcrypto.so is mandatory. This time, the mismatch happened because yet another change: [679fa5f|https://gerrit.asterisk.org/8007].

[~coreyfarrell], you were the original author of that change. Although I fixed the issue Asterisk wide, I am mentioning you in this issue report. Perhaps there are other optional / mandatory constellations of AST_MODULE_INFO / MODULEINFO  which are problematic but I do not envision.
Comments:By: Asterisk Team (asteriskteam) 2020-03-24 06:47:33.872-0500

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.

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.

By: Alexander Traud (traud) 2020-03-24 09:56:31.005-0500

In my script, I looked just at use/require. However, there are 12 modules which do not mention at all the internal library in MODULEINFO although it is declared as required in AST_MODULE_INFO:
{code}
 res_pjsip_pubsub res/res_pjsip_refer.c
res_pjsip_session res/res_pjsip_one_touch_record_info.c
res_pjsip_session res/res_pjsip_messaging.c
res_pjsip_session res/res_pjsip_dtmf_info.c
res_pjsip_session res/res_pjsip_rfc3326.c
res_pjsip_session res/res_pjsip_empty_info.c
res_pjsip_session res/res_pjsip_path.c
res_pjsip_session res/res_pjsip_diversion.c
res_pjsip_session res/res_pjsip_nat.c
                * cdr/cdr_odbc.c
         res_adsi apps/app_getcpeid.c
         res_curl funcs/func_curl.c
func_curl,res_curl res/res_config_curl.c
{code}Anyone who takes over this? In the first step, you have to double-check whether the modules are really required at runtime. If something is optional (or not used at all), its AST_MODULE_INFO must be updated. Then, the second step is to update MODULEINFO.

By: Alexander Traud (traud) 2020-03-25 08:19:16.519-0500

Corey, you did a valuable job fixing the dependencies in general back in Nov. 2017 and Jan. 2018. However, I wonder why this mismatch happened, why it passed code review two times, and why it was not reported earlier – Asterisk 16 was released some time ago. Anyway, to sum-up a bit:
{code}/*** MODULEINFO
<depend>...</depend>
***/{code}
means the internal module or external library is *required* at compile-time.
{code}AST_MODULE_INFO(
.requires = "...",
);{code}
means the internal module is *required* at runtime.
{code}/*** MODULEINFO
<use type="external">...</use>
***/{code}
means the _external_ library is *optional* at compile-time.
{code}/*** MODULEINFO
<use type="module">...</use>
***/{code}
means the _internal_ module is *optional* at compile-time.
{code}AST_MODULE_INFO(
.optional_modules = "...",
);{code}
means the _internal_ module is *optional* at runtime.

By: Friendly Automation (friendly-automation) 2020-03-31 12:33:35.146-0500

Change 14062 merged by Friendly Automation:
test_utils: Avoid incorrect error message on load.

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

By: Friendly Automation (friendly-automation) 2020-03-31 12:49:34.725-0500

Change 14021 merged by Friendly Automation:
test_utils: Avoid incorrect error message on load.

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

By: Friendly Automation (friendly-automation) 2020-03-31 12:49:51.097-0500

Change 14013 merged by Friendly Automation:
test_utils: Avoid incorrect error message on load.

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

By: Friendly Automation (friendly-automation) 2020-03-31 12:51:21.504-0500

Change 14012 merged by Friendly Automation:
test_utils: Avoid incorrect error message on load.

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