Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer assert problem caused by recent commit
27-01-2015, 07:44 AM (This post was last modified: 27-01-2015 07:45 AM by simoncn.)
Post: #1
Timer assert problem caused by recent commit
This commit seems to be causing a problem. A MinimServer user has reported a crash with the following message:

ohNet fatal error: Unhandled exception AssertionFailed at OpenHome/Timer.cpp:253 in thread TimerManager

The user wasn't capturing ohNet logging output, so there isn't any more information.
Find all posts by this user
27-01-2015, 11:18 AM
Post: #2
RE: Timer assert problem caused by recent commit
That assert isn't directly related to the fix to the timer race you recently reported. We recently added some code to flag suspicious use of timers - something that can leave a device unresponsive for unbounded time if not checked.

The particular assert you saw is caused by over 1000 timer callbacks running in less that the time required for a single tick from system time. Previous instances of this were caused by a bug in mDNS code. We fixed that but have seen very occasional failures from other areas of the same mDNS library.

Thanks for reporting this. It'd be good to hear about any further instances of timer-related crashes.
Find all posts by this user
27-01-2015, 12:14 PM
Post: #3
RE: Timer assert problem caused by recent commit
(27-01-2015 11:18 AM)simonc Wrote:  That assert isn't directly related to the fix to the timer race you recently reported. We recently added some code to flag suspicious use of timers - something that can leave a device unresponsive for unbounded time if not checked.

I was aware of this and this is why I linked to this other commit in my original post.

Quote:The particular assert you saw is caused by over 1000 timer callbacks running in less that the time required for a single tick from system time. Previous instances of this were caused by a bug in mDNS code. We fixed that but have seen very occasional failures from other areas of the same mDNS library.

Thanks for reporting this. It'd be good to hear about any further instances of timer-related crashes.

This is a serious problem for MinimServer users because it causes the server to crash. From your response, I'm not what (if any) change to ohNet you think is needed to stop this happening. Have there been any mDNS fixes related to this issue since version 1.1.1452?

If the problem is caused by mDNS, is it possible for MinimServer to disable mDNS? Is mDNS always used or is it used on some platforms and not others?
Find all posts by this user
27-01-2015, 01:33 PM
Post: #4
RE: Timer assert problem caused by recent commit
(27-01-2015 12:14 PM)simoncn Wrote:  I was aware of this and this is why I linked to this other commit in my original post.

So you did - apologies. Not sure how I managed to completely misunderstand your post - it was perfectly clear...

(27-01-2015 12:14 PM)simoncn Wrote:  This is a serious problem for MinimServer users because it causes the server to crash. From your response, I'm not what (if any) change to ohNet you think is needed to stop this happening. Have there been any mDNS fixes related to this issue since version 1.1.1452?

If the problem is caused by mDNS, is it possible for MinimServer to disable mDNS? Is mDNS always used or is it used on some platforms and not others?

There is no fix available at present. mDNS code will always be linked into a binary but should default to being disabled (so never run). You should have to explicitly enable it. You'd do this in Java by calling InitParams.setDvEnableBonjour(). Can you check whether this is called from MinimServer startup please?
Find all posts by this user
27-01-2015, 03:35 PM
Post: #5
RE: Timer assert problem caused by recent commit
(27-01-2015 01:33 PM)simonc Wrote:  There is no fix available at present. mDNS code will always be linked into a binary but should default to being disabled (so never run). You should have to explicitly enable it. You'd do this in Java by calling InitParams.setDvEnableBonjour(). Can you check whether this is called from MinimServer startup please?

This API is definitely not called from MinimServer. Unfortunately, this implies that this Timer assert problem with MinimServer is caused by something other than mDNS. I have asked the user to enable logging from now on, which might provide some clues if the problem happens again.
Find all posts by this user


Forum Jump: