Skip to content
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

test: hwtimer_wait fails on native #715

Closed
OlegHahm opened this issue Feb 15, 2014 · 21 comments
Closed

test: hwtimer_wait fails on native #715

OlegHahm opened this issue Feb 15, 2014 · 21 comments
Assignees
Labels
Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@OlegHahm
Copy link
Member

tests/test_hwtimer_spin tests/test_hwtimer_wait seems to fail on native:

RIOT native interrupts/signals initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

kernel_init(): This is RIOT! (Version: 2014.01-229-g0d0c)
Scheduler...[OK]
kernel_init(): jumping into first task...
when the race condition is hit, hwtimer will wait a very very long time...
wait 256

and nothing more happens. Works fine on MSB-A2.

@OlegHahm OlegHahm added this to the Release NEXT MAJOR milestone Feb 15, 2014
@LudwigKnuepfer
Copy link
Member

Can't reproduce.

@LudwigKnuepfer
Copy link
Member

Which branch is this happening on?

@LudwigKnuepfer
Copy link
Member

@OlegHahm ping

@OlegHahm
Copy link
Member Author

RIOT master (Commit is in the Version string. Also occurs in Version: 2014.01-313-g9c0f).
glibc 2.19-2
gcc (GCC) 4.8.2 20140206 (prerelease)

@LudwigKnuepfer
Copy link
Member

Does it happen all the time or just once in a while?

@OlegHahm
Copy link
Member Author

All the time. Most of the times. But it always stops sometime soon.

@LudwigKnuepfer
Copy link
Member

I have the exact same glibc/gcc and it works just fine.

@LudwigKnuepfer
Copy link
Member

make -B clean all?

@LudwigKnuepfer
Copy link
Member

/home/lo/native/RIOT/tests/test_hwtimer_spin/bin/native/test_hwtimer_spin.elf 
RIOT native interrupts/signals initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

kernel_init(): This is RIOT! (Version: 2013.08-1309-g9c0fc)
kernel_init(): jumping into first task...
when the race condition is hit, hwtimer will wait a very very long time...
wait 256
wait 128
wait 64
wait 32
wait 16
wait 8
wait 4
wait 2
wait 1
wait 256
wait 128
wait 64
wait 32
wait 16
wait 8
wait 4
wait 2
wait 1

and so on

@mehlis
Copy link
Contributor

mehlis commented Feb 25, 2014

can't reproduce problem either:

with -O0 or -O3
clang version 3.3 or cc (GCC) 4.8.2 20131212

@LudwigKnuepfer
Copy link
Member

The assumption is that Olegs computer is too fast. I'm investigating it.

@Kijewski
Copy link
Contributor

Can reproduce

$ ./bin/native/*.elf
RIOT native interrupts/signals initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

kernel_init(): This is RIOT! (Version: 2014.01-329-g95e7d)
kernel_init(): jumping into first task...
when the race condition is hit, hwtimer will wait a very very long time...
wait 256
wait 128
wait 64
wait 32
wait 16

Default CFLAGS.

LudwigKnuepfer added a commit to LudwigKnuepfer/RIOT that referenced this issue Apr 22, 2014
Actually test hwtimer_spin, not hwtimer_arch*

Closes: RIOT-OS#715
LudwigKnuepfer added a commit to LudwigKnuepfer/RIOT that referenced this issue Apr 22, 2014
Actually test hwtimer_spin, not hwtimer_arch*

Closes: RIOT-OS#715
LudwigKnuepfer added a commit to LudwigKnuepfer/RIOT that referenced this issue Apr 22, 2014
Actually test hwtimer_spin, not hwtimer_arch*

`hwtimer_wait` calls `hwtimer_spin` only for delays `<= 6`, that's why a
pure test_hwtimer_spin test should not pass values `>6`.

Closes: RIOT-OS#715
@LudwigKnuepfer
Copy link
Member

Cross quoting from @Kijewski in #1044 (comment) for reference:

In native the bug happens at 128 or 64 for me.
In qemu-i386 it quite reliable occurs at 8.
But that heavily depends on the CPU speed.

@LudwigKnuepfer LudwigKnuepfer modified the milestone: Release 2014.05 Apr 28, 2014
@OlegHahm OlegHahm changed the title test: hwtimer_spin fails on native test: hwtimer_wait fails on native Apr 30, 2014
@OlegHahm
Copy link
Member Author

Update description since the test has been renamed. (Bug report is still valid.)

@LudwigKnuepfer
Copy link
Member

Removed release tag, I don't see how to fix this now, so I won't fix it until tomorrow.

@LudwigKnuepfer LudwigKnuepfer removed this from the Release 2014.05 milestone May 13, 2014
@LudwigKnuepfer
Copy link
Member

The problem appears to be lost signals btw. It might be possible that using realtime signals instead (again) fixes this (something about signal queuing), but I could not find in the old issues why I changed to setitimer instead of timer_settime. I think it was something to do with the RIOT POSIX or C++ efforts.

@OlegHahm OlegHahm added this to the Release NEXT MAJOR milestone May 16, 2014
@OlegHahm
Copy link
Member Author

Tagged for the next release since it might be serious problem. Hence, I want to give it some priority. However, since we haven't really discussed the main goals for the next release, this might be subject to change.

@OlegHahm OlegHahm modified the milestones: FIX ME FIRST, Release NEXT MAJOR Jun 3, 2014
@OlegHahm
Copy link
Member Author

Any news about this one?

@LudwigKnuepfer
Copy link
Member

Did not investigate further.

@OlegHahm
Copy link
Member Author

Could this related to the problems in #1811?

@LudwigKnuepfer
Copy link
Member

Could be, but I think it's a separate issue.

kaspar030 added a commit that referenced this issue Jul 9, 2015
native: Resurect native/perif/timer and handle #715 (WIP)
thomaseichinger pushed a commit to thomaseichinger/RIOT that referenced this issue Jul 13, 2015
The hwtimer_wait test was tortured with the
following script which ran several hours.

----

make clean all-debug

while :
do

date
./bin/native/hwtimer_wait.elf > log &
pid=$!
sleep 20

success=$(cat log|grep success)

if [ "$success" != "success"  ]
then
date
echo "BUG"
exit
fi

kill $pid

done
----

Closes RIOT-OS#715.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

4 participants