Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DvSubscriptionError: infrequent but severe
03-12-2012, 09:22 AM
Post: #1
DvSubscriptionError: infrequent but severe
Hi,

I am seeing the following exception thrown after running the Device wilh Control Point connected for a few hours.

Quote:Unhandled exception DvSubscriptionError at OpenHome/Net/Device/DviSubscription.cpp:134 in thread DS 3

The offending line suggests that it is related to renewing a subscription. Does that mean renewal by the Control Point or some kind of internal renewal by the Device itself?

Any suggestions of what might be causing this or further avenues for investigation are appreciated.

Doug
Find all posts by this user
03-12-2012, 11:29 AM
Post: #2
RE: DvSubscriptionError: infrequent but severe
This is caused by some missing exception handling in the case where a control point tries to renew a subscription that has expired. I've fixed this locally; all being well, it'll be on github this evening.

The new code should allow your control point to work. Renewal attempts will generate an error if the subscription has expired but well behaved control points (such as ohNet) will spot this error and resubscribe.

Assuming you're still using ohNet on the control point, I'd be interested to understand why some subscriptions aren't being renewed in time. Are you running on a device such as a phone or tablet that'll hibernate after short periods of user inactivity? Or using wifi on a device you know to be poor at this (iPhone/iPad in particular seem to have pretty unreliable wireless)? Subscriptions sometimes expiring would be expected in these cases; we should investigate further if you're using a wired connection from a desktop.
Find all posts by this user
04-12-2012, 07:32 AM
Post: #3
RE: DvSubscriptionError: infrequent but severe
Just to be clear, the exception is on the Device side, and causes the Device UPnP Service to Abort/Terminate.

How frequently should the Control Point renew subscriptions to the Services. I have noticed (using Wireshark) that it does renew subscription, but I'm not sure if this a periodic? Is the frequency of subscription renewal also related to the Device's NOTIFY period?

The reason I am asking, is because I have seen times when the Control Point (on iPhone) correctly receives notifications/messages/events from one service, but nothing from another.

I should also mention, that I have been using a 10Mbit (yes, 10Megabit) ethernet hub for Wiresharking between the Device (a Set Top Box) and the gateway.
Find all posts by this user
04-12-2012, 11:24 AM
Post: #4
RE: DvSubscriptionError: infrequent but severe
(04-12-2012 07:32 AM)dough Wrote:  Just to be clear, the exception is on the Device side, and causes the Device UPnP Service to Abort/Terminate.

Understood. The bug I fixed was on the Device side. It was prompted by a control point attempting to renew a subscription that had expired or been otherwise deactivated.


(04-12-2012 07:32 AM)dough Wrote:  How frequently should the Control Point renew subscriptions to the Services. I have noticed (using Wireshark) that it does renew subscription, but I'm not sure if this a periodic? Is the frequency of subscription renewal also related to the Device's NOTIFY period?

The control point will attempt to renew subscriptions at a random point between a third and half of the subscription's duration. By default this is 30 minutes. The cp can request a different duration for subscriptions by calling OhNetInitParamsSubscriptionDurationSecs during startup. This is unrelated to a device's NOTIFY period.


(04-12-2012 07:32 AM)dough Wrote:  The reason I am asking, is because I have seen times when the Control Point (on iPhone) correctly receives notifications/messages/events from one service, but nothing from another.

Wifi quality in iPhone is pretty poor. I'd guess that the device has failed to connect to the control point to deliver an update for a particular subscription. This will cause the device to assume that the control point has gone away permanently and remove its subscription. Another subscription which is evented at different times may find it can connect to the control point and continue working as normal.

There is no great way to detect this. The best thing to do might be to choose a smaller duration for subscriptions on an iPhone (say 5 minutes). You'll still risk missing events but the window for this will be smaller as the cp will renew then resubscribe less than 2 minutes after events starting getting dropped.


(04-12-2012 07:32 AM)dough Wrote:  I should also mention, that I have been using a 10Mbit (yes, 10Megabit) ethernet hub for Wiresharking between the Device (a Set Top Box) and the gateway.

Thanks for mentioning this but it shouldn't influence any of the issues here.
Find all posts by this user


Forum Jump: