[Home]

Summary:ASTERISK-21738: [patch] Segfault On Realtime Queue Members Processing
Reporter:JoshE (n8ideas)Labels:
Date Opened:2013-04-30 16:22:21Date Closed:2013-05-08 22:35:38
Priority:CriticalRegression?Yes
Status:Closed/CompleteComponents:Applications/app_queue
Versions:11.3.0 Frequency of
Occurrence
Related
Issues:
must be completed before resolvingASTERISK-21774 Asterisk 11.4.0 Open Blockers
is caused byASTERISK-19536 Queue option ringinuse is ignored
Environment:Attachments:( 0) asterisk-21738-rt-ringinuse-field-not-set.diff
( 1) backtrace.txt
Description:Segfault appears in certain configurations on retrieving config on bootup.

Backtrace is attached.
Comments:By: JoshE (n8ideas) 2013-04-30 16:22:59.564-0500

Backtrace from segfaut.

By: JoshE (n8ideas) 2013-04-30 18:15:23.076-0500

Quick additional update, though I haven't really traced this all the way through.  Issue is with the determination that is made for the realtime_ringinuse_field check.

Patching this:

      if ((config_val = ast_variable_retrieve(member_config, interface, realtime_ringinuse_field))) {

To this hardcoded value:

      if ((config_val = ast_variable_retrieve(member_config, interface, "ringinuse"))) {

In app_queue.c resolves the core dump, at least temporarily.

As some further information, I have about 150 entries in RT queue_members and 2000 peers that are being loaded from realtime in this configuration.

For whatever reason, on some threads, the realtime_ringinuse_field isn't set and that null value causes the crash.

By: Rusty Newton (rnewton) 2013-04-30 19:25:00.408-0500

Can you provide a dump of the queues.conf data used when reproducing this problem?

By: JoshE (n8ideas) 2013-04-30 19:28:33.673-0500

Yep. Queues.conf is three lines:

[general]
persistentmembers = yes
monitor-type = MixMonitor

Everything else is done in realtime. This appears to be introduced when the ringinuse database setting check was introduced.

By: Michael L. Young (elguero) 2013-04-30 22:55:19.336-0500

Based on the code, realtime_ringinuse_field is null when using "persistentmembers = yes" because we call reload_queue_members() before the realtime_ringinuse_field is set.  The realtime_ringinuse_field is being used as a way to support older realtime setups which used the deprecated setting "ignorebusy".

Please try the attached patch [^asterisk-21738-rt-ringinuse-field-not-set.diff] and report back.

Thanks for your report and help with testing.

By: JoshE (n8ideas) 2013-05-01 05:42:50.336-0500

Patch worked on my setup.  Seems to resolve issue.  No side effects, at least in my configuration.

Thanks a bunch for the quick turn.