[Home]

Summary:ASTERISK-26724: Hints appear to not expire properly resulting in duplicates
Reporter:Zach R (zrothy)Labels:
Date Opened:2017-01-17 11:43:15.000-0600Date Closed:2017-01-17 12:05:23.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_pubsub
Versions:13.0.0 Frequency of
Occurrence
Occasional
Related
Issues:
duplicatesASTERISK-26696 pjsip_pubsub: PJSIP Subscription Persistence in AstDB Does not update on subscription refresh
Environment: CentOS 6.6 Final Attachments:( 0) set1-duplicates.txt
( 1) set1-hints.txt
( 2) set1-subscription_persistence.txt
( 3) set2-duplicates.txt
( 4) set2-hints.txt
( 5) set2-subscription_persistence.txt
Description:We have one serve that is running asterisk 13 in production. Once in the past we had noticed one day due to a reported trouble, that a couple hints were in the thousands for the number of watchers they had. This had been causing trouble due to maxing of bandwidth for this instance.

Temporarily this was resolved by removing the hint and re-adding the hint with dialplan reloads, letting the endpoints resubscribe to bring it to the proper amount of watchers. Once this occurred we had set a shell script that dumps the subscriptions from the asterisk database as well as the hints via core show hints so we could see if it continued to increase again.

Some of the subscriptions that were present in the database had been old, and duplicates of a present subscription based on the subscription persistence tokens. Basically for the duplicates there was one that would be expiring earlier than the second (though the timestamps did not appear to be updates as in issue ASTERISK-26696.

Recently this started to happen again on the same server showing it slowly increased for two different sets of hints. The first set increased by 1 for each phone that the endpoint was watching and the subscription persistence showed duplicates for 1 endpoint having the 2nd subscription. The duplicates showed the first subscription was around 4 AM when we have our phones resync their configurations for Cisco SPA series phones. The second sub of the duplicate set was around 10 AM that morning and both appeared to be active.

The second set had increased by two watchers for each. With the first 2 being ones that should have expired.

I've attached the relevant files below. Each set has 3 files, with the first set being the hints that increased by one, and the second being the one that increased by two.

* hints - Contains the output of core show hints for with the set in question isolated. This is a diff of the files with the removed lines being the day before and the added lines being the day after it.
* subscription_persistence - Contains the subscription_persistence tokens from the AST DB for the set which match up the hints
* duplicates_subscriptions - Contains just the subscription_persistence tokens that appeared to be duplicate and active.

If any additional logging is needed such as a sip debug to one of the duplicate subscriptions it can be gotten as well.
Comments:By: Asterisk Team (asteriskteam) 2017-01-17 11:43:16.084-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.

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].

By: Joshua C. Colp (jcolp) 2017-01-17 11:46:43.137-0600

Please attach things in the future. As well - can you confirm the version?

By: Zach R (zrothy) 2017-01-17 11:59:30.761-0600

Currently we are running GIT version GIT-13-139d86c from the branch 13. I've also edited the files to be attached as well.

By: Joshua C. Colp (jcolp) 2017-01-17 12:05:23.579-0600

This is the same underlying issue as ASTERISK-26696. Closing out as duplicate.

By: Zach R (zrothy) 2017-01-17 12:05:27.283-0600

These are the files containing the data I got so far showing the duplicate hint watchers.

SetX-duplicates are the values from the AST DB in the family subscription_persistence for duplicates of that set. They are grouped by whom each was subscribed to.

SetX-subscription_persistence is all relevant subscription_persistence values for that set in no particular order.

SetX-hints.txt contains the output of a diff for the hints that incremented for that set.

Each occurred within a 24 hour period, set 1 happening from 1-11-17 to 1-12-17, and set 2 being from the January 13th to January 14th.

By: Zach R (zrothy) 2017-01-17 12:09:21.388-0600

Should I in the case that you believe it is the same underlying issue as the other issue I linked, upload the files from this ticket to that ticket? Or since it is linked as a duplicate it should be fine.

By: Asterisk Team (asteriskteam) 2017-01-17 12:09:21.650-0600

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Zach R (zrothy) 2017-01-17 12:09:49.629-0600

Marked as duplicate by Joshua, was just wondering if I should upload the data attached to teh duplicate ticket as well

By: Joshua C. Colp (jcolp) 2017-01-17 12:15:40.390-0600

If you believe it will help further, yes.