Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assertion failure in DviProtocolUpnp::SubnetUpdated
18-08-2012, 01:33 PM
Post: #1
Assertion failure in DviProtocolUpnp::SubnetUpdated
I've had a report of a MinimServer crash in ohNet code. This happened overnight with no user activity. The Mac OS X crash report shows an assertion failure in DviProtocolUpnp::SubnetUpdated, and I've attached this crash report. This failure happens randomly and very occasionally.


Attached File(s)
.zip  CrashReport.zip (Size: 15.99 KB / Downloads: 2)
Find all posts by this user
20-08-2012, 02:39 PM
Post: #2
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
I can only see one way this could happen - if a subnet change was signalled in the ~100ms it takes to send SSDP update messages following a previous update. This seems unlikely but maybe that fits with this being a very rare occurrence? I've fixed it anyway. I guess we just need to wait to see if it fixes your user's issue...
Find all posts by this user
20-08-2012, 03:52 PM
Post: #3
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
(20-08-2012 02:39 PM)simonc Wrote:  I can only see one way this could happen - if a subnet change was signalled in the ~100ms it takes to send SSDP update messages following a previous update. This seems unlikely but maybe that fits with this being a very rare occurrence? I've fixed it anyway. I guess we just need to wait to see if it fixes your user's issue...

Thanks very much for the quick response.

Is there any chance you could post the code for the fix here today? I'm going away tomorrow, so today is my last opportunity to build a test version for the user to try.
Find all posts by this user
20-08-2012, 04:01 PM
Post: #4
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
(20-08-2012 03:52 PM)simoncn Wrote:  Is there any chance you could post the code for the fix here today? I'm going away tomorrow, so today is my last opportunity to build a test version for the user to try.

I've manually pushed the code; it should be available to you now.
Find all posts by this user
20-08-2012, 04:19 PM
Post: #5
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
(20-08-2012 04:01 PM)simonc Wrote:  I've manually pushed the code; it should be available to you now.

Thanks very much! I'll make a test build this evening.
Find all posts by this user
30-08-2012, 09:13 PM
Post: #6
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
This change seems to have solved the assertion failure, but has created a deadlock instead. I'm attaching a thread dump (provided by the user). From a quick look at this, the problem seems to be related to the DMUP mutex:

Thread 0x42a is in DviProtocolUpnp::SendUpdateNotifications. It has executed AutoMutex a(iLock) and is waiting in iAliveTimer->Cancel().

Thread 0x5de is in DviProtocolUpnp::NotifyMsgSchedulerComplete and is waiting on iLock.Wait().

Thread 0x27d766 is in DviProtocolUpnp::Disable and is waiting on AutoMutex a(iLock).


Attached File(s)
.zip  deadlock.zip (Size: 5 KB / Downloads: 1)
Find all posts by this user
31-08-2012, 04:05 PM
Post: #7
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
(30-08-2012 09:13 PM)simoncn Wrote:  This change seems to have solved the assertion failure, but has created a deadlock instead.

I don't think the previous change is at fault. There has always been the potential for this deadlock; it could only happen in an extremely small window so its just taken us a while to find an instance.

I've committed what I hope is a fix locally. All being well, it'll be available on github in about 3 hours.
Find all posts by this user
31-08-2012, 05:11 PM
Post: #8
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
(31-08-2012 04:05 PM)simonc Wrote:  I don't think the previous change is at fault. There has always been the potential for this deadlock; it could only happen in an extremely small window so its just taken us a while to find an instance.

I've committed what I hope is a fix locally. All being well, it'll be available on github in about 3 hours.

Thanks very much for the fix!

I didn't mean to imply that the previous change was the cause of the new problem. I meant that from the user's perspective, he's not getting the previous assertion failure but is now seeing this new deadlock that he didn't see previously. Perhaps the previous change is allowing the right conditions to occur for the new problem to show up in his environment, or perhaps there's no connection between the two problems.
Find all posts by this user
13-09-2012, 09:03 PM
Post: #9
RE: Assertion failure in DviProtocolUpnp::SubnetUpdated
(31-08-2012 04:05 PM)simonc Wrote:  I've committed what I hope is a fix locally. All being well, it'll be available on github in about 3 hours.

The user has reported that the updated version is working without any problems in his setup. Many thanks!
Find all posts by this user


Forum Jump: