All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Sporadic PC freeze after rt_task_start
@ 2007-07-10  8:00 M. Koehrer
  2007-07-10  8:40 ` Jan Kiszka
  0 siblings, 1 reply; 36+ messages in thread
From: M. Koehrer @ 2007-07-10  8:00 UTC (permalink / raw)
  To: xenomai

Hi everybody,

I noticed a sporadic freeze of my PC using Xenomai 2.3.1 and kernel 2.6.20.4 on a Pentium D.
adeos-ipipe-2.6.20-i386-1.8-01.patch.

The freeze happened sporadically on one of our systems, occasionally it took up to 6 hours  to get it.
Using a PCI Post Code board and writing POST codes to it, I was able to locate the code that was causing
the issue. And finally I was able to extract it to a very simple program that shows the same behaviour!!

Here is my simple test program:
**************************************** BEGIN *****************
#include <stdio.h>
#include <sys/mman.h>

#include <native/task.h>
#include <native/sem.h>


RT_TASK taska_desc;

void mytaska(void *cookie)
{
    int i;

    for (i=0; i < 5; i++)
    {
        rt_task_sleep(5000000);
    }
}

int main(void)
{
    int i;
    int j;
    mlockall(MCL_CURRENT|MCL_FUTURE);

    for (j=0; j < 100; j++)
        for (i=10; i < 15000; i++)
        {
            rt_task_create(&taska_desc, "mytaska", 0, 81, T_JOINABLE | T_FPU | T_CPU(1));
            rt_task_start(&taska_desc, &mytaska, NULL);
            usleep(1500);

            rt_task_join(&taska_desc);
            if ( i % 100 == 0)
                printf("Loop %i\n", i);
        }

    return 0;
}
*************************************** END ***********************************
It is important to know, that I started the kernel with isolcpus=1, i.e. all non-realtime tasks
are running on CPU 0.
Somehow it seems to have to do with the usleep() that is following the rt_task_start.
usleep() is executed on CPU 0 and rt_task_start starts a task on CPU 1...
Can this be as the begin of usleep() is executed before the task is started but the end of
usleep() is when the task has already started. Could this be a cause for a race condition?

I leave the program running for a while and somehow it freezes the PC (only reset works).

Any feedback on this is welcome!

Regards

Mathias






-- 
Mathias Koehrer
mathias_koehrer@domain.hid


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  39,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2


^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: [Xenomai-help] Sporadic PC freeze after rt_task_start
@ 2007-07-19 13:27 M. Koehrer
  2007-07-19 13:42 ` Philippe Gerum
  0 siblings, 1 reply; 36+ messages in thread
From: M. Koehrer @ 2007-07-19 13:27 UTC (permalink / raw)
  To: rpm, jan.kiszka; +Cc: xenomai, mathias_koehrer

> 
> Mathias, I guess this test has not been run with the nucleus debug
> option enabled. Any chance to get a disassembly of the rpi_pop routine
> as compiled into your kernel, so that we could check if we are really
> stuck on this lock, or rather on some infinite walk into a corrupted RPI
> list?
I tried last week with debug on and I did not get the freeze...
However, I will try again. I will enable all Xeno debug options (CONFIG_XENO_OPT_DEBUG,
CONFIG_XENO_OPT_DEBUG_NUCLEUS, CONFIG_XENO_OPT_DEBUG_QUEUE, 
CONFIG_XENO_OPT_WATCHDOG) and run the test again...

For this test I leave CONFIG_XENO_OPT_RPIDISABLE unset (default).

I hope to have more information on the results tomorrow morning...

Regards

Mathias

-- 
Mathias Koehrer
mathias_koehrer@domain.hid


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  39,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2007-07-22 16:44 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10  8:00 [Xenomai-help] Sporadic PC freeze after rt_task_start M. Koehrer
2007-07-10  8:40 ` Jan Kiszka
2007-07-10 12:29   ` M. Koehrer
2007-07-10 12:41     ` Jan Kiszka
2007-07-10 14:40       ` M. Koehrer
2007-07-10 15:34         ` Jan Kiszka
2007-07-11  6:43           ` M. Koehrer
2007-07-11  7:32             ` Jan Kiszka
2007-07-11 12:45               ` M. Koehrer
2007-07-11 14:47           ` Jan Kiszka
2007-07-13  7:27             ` M. Koehrer
2007-07-13  8:26               ` Jan Kiszka
2007-07-16  7:07                 ` M. Koehrer
2007-07-16 22:42                   ` Jan Kiszka
2007-07-19 10:58                     ` M. Koehrer
2007-07-19 11:27                       ` Jan Kiszka
2007-07-19 12:19                         ` Philippe Gerum
2007-07-19 12:40                           ` Jan Kiszka
2007-07-19 13:55                             ` [Xenomai-core] " Philippe Gerum
2007-07-19 15:14                             ` Philippe Gerum
2007-07-19 15:35                               ` Jan Kiszka
2007-07-19 16:03                                 ` Philippe Gerum
2007-07-19 17:18                                   ` Jan Kiszka
2007-07-19 18:24                                     ` Philippe Gerum
2007-07-19 20:15                                       ` Jan Kiszka
2007-07-19 21:35                                         ` Philippe Gerum
2007-07-20 14:20                                           ` Jan Kiszka
2007-07-20 18:33                                             ` Philippe Gerum
2007-07-21  8:49                                             ` Philippe Gerum
2007-07-22 16:44                                               ` Jan Kiszka
2007-07-19 17:57                                   ` Jan Kiszka
2007-07-21 20:15                                     ` Philippe Gerum
2007-07-20  7:03                               ` M. Koehrer
  -- strict thread matches above, loose matches on Subject: below --
2007-07-19 13:27 M. Koehrer
2007-07-19 13:42 ` Philippe Gerum
2007-07-19 13:52   ` M. Koehrer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.