Commit Graph

31604 Commits

Author SHA1 Message Date
Richard Mudgett
c6c3a63696 func_periodic_hook.c: Cleanup module resources on failure.
* Make load_module() cleanup if it failed to setup the module.

* Make unload_module() always return 0.  It is silly to fail unloading if
the hook function we try to unregister was not even registered.

Change-Id: I280fc6e8ba2a7ee2588ca01d870eebaf74b4ffe6
2018-10-04 14:38:52 -05:00
George Joseph
30717bafbf CI: Fix missing () in gates.jenkinsfile
Change-Id: I2f252e0f8c7f1a6328438fbd2be5d6574b7dfa5b
2018-10-04 13:04:12 -05:00
Jenkins2
0db94c7519 Merge "CI: Add timestamps and timeouts to jenkinsfiles" 2018-10-04 12:50:18 -05:00
Jenkins2
e430442c4c Merge "jenkins: Fix cleanup command redirection." 2018-10-04 11:28:39 -05:00
George Joseph
58622a87f4 CI: Add timestamps and timeouts to jenkinsfiles
Change-Id: Ide83574dc957bc1df28e30a69079140050dfc35f
2018-10-04 10:14:28 -05:00
George Joseph
772d991a43 Merge "ast_coredumper: Remove .gdbinit file on exit" 2018-10-04 09:43:09 -05:00
George Joseph
5d3cc31bf8 Merge "CI: Use brace expansion instead of calling out to seq" 2018-10-04 09:41:48 -05:00
George Joseph
1630a87b59 Merge "CI: Look up configured kernel.core_pattern sysctl" 2018-10-04 08:54:24 -05:00
George Joseph
aec9708300 Merge "ast_coredumper: Don't use "declare -n"" 2018-10-04 07:27:18 -05:00
George Joseph
45eb9a28eb Merge "astobj2: Comment on OBJ_NOLOCK in ao2_container_clone." 2018-10-04 07:25:47 -05:00
George Joseph
f55e20ae83 Merge "http.c: Reload TLS even if http.conf hasn't changed" 2018-10-04 07:23:49 -05:00
Sean Bright
b2ed667712 ast_coredumper: Remove .gdbinit file on exit
Change-Id: I1297de78628773ca368e687c6f148bf74857cae9
2018-10-03 17:03:09 -05:00
Sean Bright
e19f27a667 CI: Look up configured kernel.core_pattern sysctl
Change-Id: I8246a0147df8d821fbbcabc1db1887104b8bedc4
2018-10-03 16:54:32 -05:00
Corey Farrell
42880fab50 jenkins: Fix cleanup command redirection.
Fix redirection to /dev/null of cleanup commands.  The '2' was being
interpreted as part of the command instead of part of the redirect.

Change-Id: I2e3a591b165e0288c4b82b9ef475fdfd5392a90a
2018-10-03 17:31:58 -04:00
George Joseph
a29cefe5b2 ast_coredumper: Don't use "declare -n"
Change-Id: I7ddfed4cd6549a0cd458e4d5cf9ac95d784de6cb
2018-10-03 15:30:22 -05:00
George Joseph
1a6e97bf23 Merge "CI: Use bindport instead of port in test http.conf" 2018-10-03 13:56:54 -05:00
George Joseph
967fffb569 Merge "core/frame: Fix ast_frdup() and ast_frisolate() for empty text frames" 2018-10-03 13:55:24 -05:00
Corey Farrell
932d0a40cf astobj2: Comment on OBJ_NOLOCK in ao2_container_clone.
The test for OBJ_NOLOCK looks wrong but it isn't.  Add comments to
prevent confusion.

Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
2018-10-03 11:03:48 -05:00
George Joseph
bc9a7c419c Merge "astobj2: Record lock usage to refs log when DEBUG_THREADS is enabled." 2018-10-03 10:17:27 -05:00
George Joseph
24dc6ee8ae Merge "loader: Fix result of module reload error." 2018-10-03 10:17:07 -05:00
George Joseph
910f5dbd44 Merge "core: Disable astobj2 locking for some common objects." 2018-10-03 10:16:20 -05:00
Sean Bright
f608b73a29 CI: Use brace expansion instead of calling out to seq
Also make the shebang in publishAsteriskDocs.sh the first line.

Change-Id: I3fdd6f22e652e4fb5b5fe85df46fa34eb6d0cf08
2018-10-03 09:11:46 -05:00
Sean Bright
9c9f060b3a CI: Use bindport instead of port in test http.conf
Change-Id: Ife9a6879da63a56e5b8348a2024eeed4e7b1615b
2018-10-03 09:00:54 -05:00
Sean Bright
286339aa34 http.c: Reload TLS even if http.conf hasn't changed
There is currently no way to indicate to Asterisk that TLS certificates
and/or keys have been updated other than by modifying http.conf or
restarting Asterisk.

There is already code in main/tcptls.c that determines if a reload is
actually necessary based on the hashes of the certicate and dependent
files, so this change merely gives us a way to request a reload without
explicitly modifying http.conf.

Change-Id: Ie795420dcc7eb3d91336820688a29adbcc321276
2018-10-03 08:35:12 -05:00
Joshua Colp
da8ff5017d Merge "Resolve warning about duplicate 'dialplan' CLI." 2018-10-03 08:31:20 -05:00
Corey Farrell
cacbe32534 core: Disable astobj2 locking for some common objects.
* ACO options
* Indications
* Module loader ref_debug object
* Media index info and variants
* xmldoc items

These allocation locations were identified using reflocks.py on the
master branch.

Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
2018-10-02 16:47:23 -04:00
George Joseph
83558fa580 Merge "loader: Improve error handling." 2018-10-02 14:24:09 -05:00
Corey Farrell
639718211a Resolve warning about duplicate 'dialplan' CLI.
Change-Id: I029db1b4a32ccfb38374d6fe944dc430866f4b30
2018-10-02 14:27:52 -04:00
Corey Farrell
b25a261aa5 loader: Fix result of module reload error.
When a module reload fails we never set AST_MODULE_RELOAD_ERROR.  This
caused reload failures to incorrectly report 'No module found'.

Change-Id: I5f3953e0f7d135e53ec797f24c97ee3f73f232e7
2018-10-02 14:12:58 -04:00
Corey Farrell
e4cf513f81 loader: Improve error handling.
* Display list of unavailable dependencies when they cause another
  module to fail loading.
* When a module declines to load find all modules which depend on it so
  they can be declined and listed together.
* Prevent retry of declined modules during startup.
* When a module fails to dlopen try loading it with RTLD_LAZY so we can
  attempt to display the list of missing dependencies.

These changes are meant to reduce logger spam that is caused when a
module has many dependencies and declines to load.  This also fixes some
error paths which failed to recognize required modules.

Module load/start errors are delayed until the end of loader startup.

Change-Id: I046052c71331c556c09d39f47a3b92975f3e1758
2018-10-02 13:18:12 -04:00
neutrino88
24cece660b core/frame: Fix ast_frdup() and ast_frisolate() for empty text frames
If a channel creates an AST_TEXT_FRAME with datalen == 0, the ast_frdup()
and ast_frisolate() functions could create a clone frame with an invalid
data.ptr which would cause a crash.  The proposed fix is to make sure that
for such empty text frames, ast_frdup() and ast_frisolate() return cloned
text frames with a valid data.ptr.

ASTERISK-28076
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU

Change-Id: Ib882dd028598f13c4c233edbfdd7e54ad44a68e9
2018-10-02 11:25:25 -05:00
Joshua Colp
686ba0f869 Merge "Append CHANGES/UPGRADE.txt for module loader changes." 2018-10-02 08:47:48 -05:00
Joshua Colp
0944059d35 Merge "app_queue.c: Fix json ref leak" 2018-10-02 07:58:26 -05:00
Corey Farrell
13df745278 astobj2: Record lock usage to refs log when DEBUG_THREADS is enabled.
When DEBUG_THREADS is enabled we can know if the astobj2 mutex / rwlock
was ever used, so it can be recorded in the REF_DEBUG destructor entry.

Create contrib/scripts/reflocks.py to process locking used by
allocator.  This can be used to identify places where
AO2_ALLOC_OPT_LOCK_NOLOCK should be used to reduce memory usage.

Change-Id: I2e3cd23336a97df2692b545f548fd79b14b53bf4
2018-10-01 22:27:30 -04:00
George Joseph
5ca5483fcb Merge "app_page: Add dependency against app_confbridge." 2018-10-01 14:19:48 -05:00
Corey Farrell
52b530503f app_page: Add dependency against app_confbridge.
Change-Id: I1946509f518961d23fb21229d91676ee3e441921
2018-10-01 13:11:41 -04:00
Richard Mudgett
b68b3012ea app_queue.c: Fix json ref leak
Declining the queue_member_status_type stasis message in stasis.conf
causes these messages to leak json objects.

* Add missing ast_json_unref() if the type is NULL in
queue_publish_member_blob().

ASTERISK-28084

Change-Id: I691ecf49bd1f7d9c29182e1eee8c4bb7103be9fc
2018-10-01 11:46:40 -05:00
Jenkins2
252e4a8fd4 Merge "astobj2: Reduce memory overhead." 2018-10-01 09:02:37 -05:00
Joshua Colp
69f4740fa1 Merge "lock: Improve performance of DEBUG_THREADS." 2018-10-01 08:32:49 -05:00
Joshua Colp
02bb329bb5 Merge "configure.ac: Check for unbound version >= 1.5" 2018-10-01 07:08:52 -05:00
Joshua Colp
2ac2b5dfb6 Merge "res_pjsip: improve realtime performance on CLI 'pjsip show contacts'" 2018-10-01 06:51:37 -05:00
Joshua Colp
4604dafc67 Merge "jansson-bundled: Add patches to improve json_pack error reporting." 2018-10-01 06:24:46 -05:00
Joshua Colp
71ef8eaa6d Merge "app_confbridge: Use bridge join hook to send join and leave events" 2018-10-01 06:24:21 -05:00
Joshua Colp
59ad2cc669 Merge "res_stasis: Fix stale data in ARI bridges" 2018-10-01 04:34:30 -05:00
Corey Farrell
497973c8a2 Append CHANGES/UPGRADE.txt for module loader changes.
Change-Id: Ib8db4e14187f5c11ecbff532df17d30c5d36fa3e
2018-10-01 04:24:00 -04:00
Alexei Gradinari
8bb031abc7 res_pjsip: improve realtime performance on CLI 'pjsip show contacts'
CLI command 'pjsip show contacts' inefficiently make a lot of DB requests.

For example if there are 10k aors then asterisk requests these 10k records
of aor and then does 10k requests of contact - one request per aor.

Even if use 'like <pattern>' the asterisk requests all aor's and contact's
records and then filters them by itself.

This patch gathers contact's container by
- retrieving all dynamic contacts by regex (filtered by reg_server)
- retrieving all aors with permanent contacts
- finally filters container by regex

ASTERISK-28077 #close

Change-Id: Id0ad65d14952a02fb213273a90f3f680a8149618
2018-09-28 17:09:33 -05:00
Corey Farrell
24b92291d5 jansson-bundled: Add patches to improve json_pack error reporting.
Change-Id: I045e420d5e73e60639079246e810da6ae21ae22b
2018-09-28 15:51:20 -04:00
Corey Farrell
205c6be895 lock: Improve performance of DEBUG_THREADS.
Add a volatile flag to lock tracking structures so we only need to use
the global lock when first initializing tracking.

Additionally add support for DEBUG_THREADS_LOOSE_ABI.  This is used by
astobj2.c to eliminate storage for tracking fields when DEBUG_THREADS is
not defined.

Change-Id: Iabd650908901843e9fff47ef1c539f0e1b8cb13b
2018-09-28 14:42:04 -04:00
George Joseph
930cbec67d Merge "config.c: Cleanup AST_INCLUDE_GLOB" 2018-09-28 13:16:17 -05:00
Kevin Harwell
70e4f6f203 Merge "res_odbc: fix missing SQL error diagnostic" 2018-09-28 10:39:21 -05:00