Cortex-M3 kernel failing certain kernel tests.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cortex-M3 kernel failing certain kernel tests.

Grant Edwards-6
I'm testing an eCos port to an NXP Cortex-M3 part (very similar to the
existing LPC17xx port), and I'm stuck with some failing kernel tests:

   mutex3
   kmutex3
   stress_threads
   dhrystone  

The rest of the kernel tests all pass.
   
The interrupt controller and system tick timer are all built-in to the
Cortex-M3. That means the only difference between my port my port and
existing ports are some of the setup code, the memory layout, and the
UART used for diag output.

Can I assume that the LPC17xx port passes all the kernel tests?

These tests are run using a very minimal build with the mlqueue
scheduler (no io device drivers, no network, no file support, no
timeslicing).

All four of the failing tests end up hanging.  After the hang, the 1ms
system timer tick dsr continues to run.  The system tick interrupt is
the only one that's unmasked.  I've tried running the tests using
nothing but internal SRAM.  I've tried using external SDRAM.

I've tried disabling all the virtual vector stuff and using a trivial
hard-wired putc() function.  I've tried using different memories for
the application stacks, interrupt stack, and interrupt vector table.

Nothing seems to change: the same four tests keep failing in the same
manner.

I'm beginning to wonder if the common Cortex-M3 code works. Can
somebody say that they've seen the Cortex-M3 code in CVS pass all the
kernel tests?

------------------------------------------------------------------------
FWIW, here's exactly how things fail...


* dhrystone hangs without printing any output.

* stress_threads hangs after printing the version and compile date:

   INFO:<Stress threads test compiled on Sep 18 2013>
   <hangs>
   
* mutex3 and kmutex3 both fail test number 24 and then hang:

   ----- [24] New Cycle: 0x60, Threads 1a inactive, 2a run late, 3a run late -----
   INFO:<Thread 1 running>
   INFO:<Thread 2 running>
   INFO:<Extra thread 2a running>
   INFO:<Thread 3 running>
   INFO:<Extra thread 3a running>
   INFO:<Thread 1 exit>
   INFO:<Checking priority scheme: dynamic-default-inherit>
   INFO:<Extra thread 2a resumed>
   INFO:<Extra thread 2a locked>
   INFO:<Extra thread 2a unlocked>
   INFO:<Extra thread 2a exiting>
   INFO:<Thread 3 exit>
   INFO:<Extra thread 3a resumed>
   INFO:<Extra thread 3a locked>
   INFO:<EFAIL:<Extra thread did not run> Line: 346, File: [...]kernel/current/tests/mutex3.cxx
   <hang>

   ----- [24] New Cycle: 0x60, Threads 1a inactive, 2a run late, 3a run late -----
   INFO:<Thread 1 running>
   INFO:<Thread 2 running>
   INFO:<Extra thread 2a running>
   INFO:<Thread 3 running>
   INFO:<Extra thread 3a running>
   INFO:<Thread 1 exit>
   INFO:<Checking priority scheme: dynamic-default-inherit>
   INFO:<Extra thread 2a resumed>
   INFO:<Extra thread 2a locked>
   INFO:<Extra thread 2a unlocked>
   INFO:<Extra thread 2a exiting>
   INFO:<Thread 3 exit>
   INFO:<Extra thread 3a resumed>
   INFO:<Extra thread 3a locked>
   INFO:<EFAIL:<Extra thread did not run> Line: 353, File: [...]kernel/current/tests/kmutex3.c
   <hang>

--
Grant Edwards               grant.b.edwards        Yow! NANCY!!  Why is
                                  at               everything RED?!
                              gmail.com            


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Cortex-M3 kernel failing certain kernel tests.

Grant Edwards-6
On 2013-09-18, Grant Edwards <[hidden email]> wrote:
> I'm testing an eCos port to an NXP Cortex-M3 part (very similar to the
> existing LPC17xx port), and I'm stuck with some failing kernel tests:
>
>    mutex3
>    kmutex3
>    stress_threads
>    dhrystone  
[...]

> These tests are run using a very minimal build with the mlqueue
> scheduler (no io device drivers, no network, no file support, no
> timeslicing).

It turns out that stress_threads and dhrystone both require "printf"
stdio support to work.

Unfortunately, the CDL for the kernel tests doesn't seem to catch this
missing dependancy.  They both compile and link fine, but end up
calling cyg_io_write() with a NULL io handle. After adding a couple
#define's to make them use diag_printf and diag_sprintf,
stress_threads and dhrystone both pass.

Even though it passes, I think there's still a problem with the
stress_threads test. It prints out a series of state dumps with
messages claiming they're one minute intervals, but they're only a few
seconds.  I'm guessing that stress_threads contains a hidden
assumption that the clock tick is 10ms and mine is actually 1ms.

The mutex3 and kmutex3 tests still both fail the same as they did
before...

> * mutex3 and kmutex3 both fail test number 24 and then hang:
>
>    ----- [24] New Cycle: 0x60, Threads 1a inactive, 2a run late, 3a run late -----
>    INFO:<Thread 1 running>
>    INFO:<Thread 2 running>
>    INFO:<Extra thread 2a running>
>    INFO:<Thread 3 running>
>    INFO:<Extra thread 3a running>
>    INFO:<Thread 1 exit>
>    INFO:<Checking priority scheme: dynamic-default-inherit>
>    INFO:<Extra thread 2a resumed>
>    INFO:<Extra thread 2a locked>
>    INFO:<Extra thread 2a unlocked>
>    INFO:<Extra thread 2a exiting>
>    INFO:<Thread 3 exit>
>    INFO:<Extra thread 3a resumed>
>    INFO:<Extra thread 3a locked>
>    INFO:<EFAIL:<Extra thread did not run> Line: 346, File: [...]kernel/current/tests/mutex3.cxx
>    <hang>
>
>    ----- [24] New Cycle: 0x60, Threads 1a inactive, 2a run late, 3a run late -----
>    INFO:<Thread 1 running>
>    INFO:<Thread 2 running>
>    INFO:<Extra thread 2a running>
>    INFO:<Thread 3 running>
>    INFO:<Extra thread 3a running>
>    INFO:<Thread 1 exit>
>    INFO:<Checking priority scheme: dynamic-default-inherit>
>    INFO:<Extra thread 2a resumed>
>    INFO:<Extra thread 2a locked>
>    INFO:<Extra thread 2a unlocked>
>    INFO:<Extra thread 2a exiting>
>    INFO:<Thread 3 exit>
>    INFO:<Extra thread 3a resumed>
>    INFO:<Extra thread 3a locked>
>    INFO:<EFAIL:<Extra thread did not run> Line: 353, File: [...]kernel/current/tests/kmutex3.c
>    <hang>

--
Grant Edwards               grant.b.edwards        Yow! I'm GLAD I
                                  at               remembered to XEROX all
                              gmail.com            my UNDERSHIRTS!!


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Cortex-M3 kernel failing certain kernel tests.

Grant Edwards-6
On 2013-09-19, Grant Edwards <[hidden email]> wrote:

> The mutex3 and kmutex3 tests still both fail the same as they did
> before...

Those two tests apparently have some sort of dependancy on the system
tick period. After switching the system tick from 1000Hz to 100Hz, the
mutex3 tests now pass.

Is that to be expected?

--
Grant Edwards               grant.b.edwards        Yow! I'm having fun
                                  at               HITCHHIKING to CINCINNATI
                              gmail.com            or FAR ROCKAWAY!!


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss