This is the mail archive of the
mailing list for the eCos project.
Corrupted alarm list
- From: Stanislav Meduna <stano at meduna dot org>
- To: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 03 Feb 2011 09:50:52 +0100
- Subject: [ECOS] Corrupted alarm list
I have a strange situation in the eCos alarm list.
The Cyg_Counter::tick is looping endlessly, because
they are two active alarms in the (single, non-sorted)
list pointing to each other, but neither one is
pointed to by alarm_list_ptr. So this is something
alarm_list_ptr -> A -> B -> C -> D -> X -> Y |
All alarms seem to be perfectly valid with reasonable
data inside, A to D being Cyg_ThreadTimers, X cyg_ktime
and Y my own alarm callback.
I can't see anything wrong with the code and surely
this code is one of the most used in the kernel.
I can't reproduce this with a simple example (yet).
This is on ARM9 (Samsung S3C2440), self-compiled gcc 4.5.2
with eCosCentric's patches from 4.4.2 applied. I suspect
either a synchronisation issue manifesting itself in the
scheduler lock area, or an optimizer bug in compiler,
or a missing volatile somewhere.
Anyone did see something like this before? I'm going
to experiment with compiler and optimization flags
to further contain this problem...
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss