-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vtimer: vtimer_msg test crashes after ~49'20" #1753
Comments
I think the timer is running at 1 MHz on those platforms, correct? |
So I gave debugging this issue a try on the iot-lab_M3 board, but my results are kind of odd. In order to not have to wait for 50 minutes, I tried setting the hardware timer to a value near to the time that's supposed to cause the issue. For lack of a better way, I added a function
(I have no idea what problems not setting the TIMER_1 to the same value might cause, but I got the same results setting only TIMER_0 and setting both timers.) So this appears to work, e.g. if I call it in
Will make it start from 49 minutes, or
starts from 71 minutes 30 seconds, i.e. very close to the point of 32-bit unsigned int overflow. The overflow does not seem to be the problem though, since the timer continues counting properly after the hardware timer has overflowed. The only odd thing in that regard is that at the pointer of overflow there are a lot of timer events fired in quick succession. I also could not reproduce the issue at the 49 minute + something mark. What is confusing to me is that, if I set the timer to certain values (I have not figured out a pattern yet), it will just never start counting properly. Some examples:
I honestly have no idea why this happens, but I am assuming that I'm just setting the timer to bogus values and thus brake some well-documented mechanism of the CPU that I don't understand. Hopefully this will be at least somewhat helpful in finding the cause of this issue :) |
I just remembered this, someone should test if this has to do anything with it: |
@OlegHahm: I won't be able to properly investigate this before next week. |
I prefer to leave the milestone until the release notes are written (for the "known issues" section). |
Doesn't make much sense because you still need to sift through all open issues for other milestones... |
... unless this is "featured" issue of course ;) |
I need to sift...? |
Well, whoever creates the list of open issues. But that is besides the point, isn't it? |
Partly. The point is: so far I was the one mostly writing the release notes and having issues tagged to go into the known issues sections was helpful for me. |
vtimer does not handle well the different timers (vtimer <-> hwtimer) with regard to their overflows: * in update_shortterm HWTIMER_TICKS cannot be just applied to next, this will be wrong when next overflows. * in vtimer_now wrong parentheses mix up vtimer and hwtimer ticks. Maybe related issues: * RIOT-OS#2435 * RIOT-OS#1753
vtimer does not handle well the different timers (vtimer <-> hwtimer) with regard to their overflows: * in update_shortterm HWTIMER_TICKS cannot be just applied to next, this will be wrong when next overflows. * in vtimer_now wrong parentheses mix up vtimer and hwtimer ticks. Maybe related issues: * RIOT-OS#2435 * RIOT-OS#1753
vtimer is history |
This behavior can be observed on several ARM based platforms (IoT-Lab_M3 and MSB-A2) - maybe 32 bit overflow?
The text was updated successfully, but these errors were encountered: