This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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:
and search the list archive:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]