[Home]

Summary:ASTERISK-28477: Crash when not specifying "dbfile" in res_config_sqlite3.conf
Reporter:Dennis (dbuteyn)Labels:patch pjsip
Date Opened:2019-07-14 02:40:34Date Closed:2019-07-24 18:59:23
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_config_sqlite3
Versions:13.25.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-28478 Crash performing "core reload" with modified res_config_sqlite3.conf
Environment:CentOS7Attachments:( 0) 0001-res_config_sqlite3-Only-join-threads-that-we-started.patch
Description:{code:title=res_config_sqlite3.conf}
[asterisk]
nodbfile => /var/lib/asterisk/nofile.sqlite3
{code}

{code:title=journalctl -u asterisk}
Jul 14 07:28:42 erol systemd[1]: Starting Asterisk PBX...
Jul 14 07:28:42 erol asterisk[25813]: Setting max files open to 20000
Jul 14 07:28:43 erol asterisk[25813]: XSLT support not found. XML documentation may be incomplete.
Jul 14 07:28:43 erol asterisk[25813]: Unable to load config file 'stasis.conf'
Jul 14 07:28:43 erol asterisk[25813]: Could not load Stasis configuration; using defaults
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] NOTICE[25813]: loader.c:1502 load_modules: 3 modules will be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] NOTICE[25813]: cdr.c:4459 cdr_toggle_runtime_options: CDR simple logging enabled.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] NOTICE[25813]: loader.c:1502 load_modules: 232 modules will be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] NOTICE[25813]: res_smdi.c:1409 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] ERROR[25813]: config_options.c:712 aco_process_config: Unable to load config file 'ari.conf'
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] ERROR[25813]: ari/config.c:231 ast_ari_config_get: Error obtaining config from ari.conf
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: res_digium_phone.c:731 load_module: No Valid DPMA License found.  Module is loaded but disabled. Plea
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: loader.c:1184 load_resource: Module 'res_pjsip_endpoint_identifier_dpma.so' could not be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: loader.c:1184 load_resource: Module 'res_pjsip_endpoint_identifier_dpma.so' could not be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: loader.c:1184 load_resource: Module 'res_pjsip_endpoint_identifier_dpma.so' could not be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: loader.c:1184 load_resource: Module 'res_pjsip_endpoint_identifier_dpma.so' could not be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: loader.c:581 load_dlopen: Error loading module 'res_pjsip_endpoint_identifier_dpma.so': /var/lib/aste
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: loader.c:1184 load_resource: Module 'res_pjsip_endpoint_identifier_dpma.so' could not be loaded.
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] ERROR[25813]: config.c:1937 process_text_line: The file 'ombutel/res_parking__*.conf' was listed as a #include but it
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] ERROR[25813]: config_options.c:720 aco_process_config: Contents of res_parking.conf are invalid and cannot be parsed
Jul 14 07:28:43 erol asterisk[25813]: [2019-07-14 07:28:43] WARNING[25813]: res_config_sqlite3.c:419 new_realtime_sqlite3_db: Must specify dbfile in res_config_sqlite3.conf
Jul 14 07:28:43 erol systemd[1]: asterisk.service: main process exited, code=dumped, status=11/SEGV
{code}

{code:title=backtrace}
(gdb) bt
#0  0x00007f8af9b03eb1 in pthread_join () from /lib64/libpthread.so.0
#1  0x00007f8a800c8b19 in db_destructor (obj=0x1d3a528) at res_config_sqlite3.c:237
#2  0x000000000045c922 in internal_ao2_ref (func=0x61e1d3 <__FUNCTION__.9420> "__ao2_ref", line=523, file=0x61df78 "astobj2.c", delta=-1, user_data=0x1d3a528) at astobj2.c:456
#3  __ao2_ref (user_data=user_data@entry=0x1d3a528, delta=delta@entry=-1) at astobj2.c:523
#4  0x00007f8a800c2ac9 in unref_db (db=<synthetic pointer>) at res_config_sqlite3.c:252
#5  new_realtime_sqlite3_db (config=<optimized out>, cat=<optimized out>) at res_config_sqlite3.c:420
#6  0x00007f8a800c8f6d in parse_config (reload=reload@entry=0) at res_config_sqlite3.c:1281
#7  0x00007f8a800c9155 in load_module () at res_config_sqlite3.c:1371
#8  0x000000000053820d in start_resource (mod=0x1d0b3d0) at loader.c:1124
#9  0x0000000000538a31 in load_resource_list (load_order=load_order@entry=0x7ffda7bc5ca0, global_symbols=global_symbols@entry=0, mod_count=mod_count@entry=0x7ffda7bc5c90)
   at loader.c:1372
#10 0x000000000053ac85 in load_modules (preload_only=preload_only@entry=0) at loader.c:1510
#11 0x0000000000436e1d in asterisk_daemon (isroot=<optimized out>, rungroup=<optimized out>, runuser=<optimized out>) at asterisk.c:4286
#12 main (argc=<optimized out>, argv=<optimized out>) at asterisk.c:4039
{code}
Comments:By: Asterisk Team (asteriskteam) 2019-07-14 02:40:36.868-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: Sean Bright (seanbright) 2019-07-15 07:26:40.671-0500

I'm not able to reproduce with Asterisk 13.27.1 (or 13 from git). Can you try upgrading to 13.27.1 and see if that resolves the problem?

By: Dennis (dbuteyn) 2019-07-16 06:31:12.716-0500

Issue persists, same reason as ASTERISK-28478 (pthread_join argument is NULL).

By: Sean Bright (seanbright) 2019-07-23 13:16:07.917-0500

[~dbuteyn], can you test [the patch in the linked review|https://gerrit.asterisk.org/c/asterisk/+/11618]?

By: Sean Bright (seanbright) 2019-07-23 13:18:16.394-0500

You can also use [^0001-res_config_sqlite3-Only-join-threads-that-we-started.patch] if that is more convenient than pulling the change from Gerrit.

By: Dennis (dbuteyn) 2019-07-24 03:43:07.893-0500

Asterisk no longer crashes with linked patch.

By: Sean Bright (seanbright) 2019-07-24 09:57:33.088-0500

Thanks for testing, [~dbuteyn]

By: Friendly Automation (friendly-automation) 2019-07-24 18:59:24.313-0500

Change 11619 merged by Friendly Automation:
res_config_sqlite3: Only join threads that we started

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

By: Friendly Automation (friendly-automation) 2019-07-25 07:01:52.861-0500

Change 11618 merged by George Joseph:
res_config_sqlite3: Only join threads that we started

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

By: Friendly Automation (friendly-automation) 2019-07-25 07:02:22.957-0500

Change 11620 merged by George Joseph:
res_config_sqlite3: Only join threads that we started

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