[Bug 850] watchdog with delay of 1 failing to time out
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Mon Feb 9 16:22:41 UTC 2009
http://www.rtems.org/bugzilla/show_bug.cgi?id=850
Joel Sherrill <joel.sherrill at oarcorp.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |CLOSED
Attachment #238|text/x-patch |text/plain
mime type| |
Attachment #238 is|0 |1
patch| |
A Watchdog (used to timeout an event) with a delay of 1 sometimes does not seem
to timeout. The problem occurs, because for whatever reason when the watchdog
tickle function executes, the watchdog->delta_interval is 0. it is then
decremented before being tested, becomes huge and so doesnt time out. It is
thought there is a race condition where the watchdog->delta_interval is
calculated by reference to a head (also with a delay of 1). But before it can
be added after the head, the head is removed, so the new head now has a delay
of 0.
Release:
RTEMS-4.6.5
Environment:
Linux Development Host (x86)
MPC862 (Freescale PowerPC) Target
Standard Rtems 4.6.5 Tool Distribution for PowerPC
How-To-Repeat:
I have no simple test code to repeat this. The occurance is sporadic at best.
Maybe 2 tasks waiting on events of a signle tick each, but in that case they
will probably become synchronised and so the race condition not occur.
--- Comment #1 from sjohnson at sakuraindustries.com 2005-12-12 00:50:55 ---
Fix:
Test watchdog->delta_interval for 0 before decrementing, to prevent decrementing 0 to 2^32-1.
--- Comment #2 from Joel Sherrill <joel.sherrill at oarcorp.com> 2006-03-07 16:11:00 ---
State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to 4.6 branch and head.
--
Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the bugs
mailing list