#850 closed defect (fixed)

watchdog with delay of 1 failing to time out

Reported by: sjohnson2 Owned by: Joel Sherrill
Priority: highest Milestone: 2
Component: score Version: 4.6
Severity: critical Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

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.

Attachments (1)

rtems-4.6.5-eventtimeoutbug.patch (2.2 KB) - added by sjohnson2 on 12/03/06 at 13:31:13.
rtems-4.6.5-eventtimeoutbug.patch

Download all attachments as: .zip

Change History (3)

comment:1 Changed on 03/07/06 at 21:11:00 by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to 4.6 branch and head.

Changed on 12/03/06 at 13:31:13 by sjohnson2

rtems-4.6.5-eventtimeoutbug.patch

comment:2 Changed on 02/09/09 at 15:22:40 by Joel Sherrill

attachments.ispatch: 01
attachments.mimetype: text/x-patchtext/plain
Note: See TracTickets for help on using tickets.