Hi Philippe

I have attached a standalone test program which crashes my system. It
uses poxis skin to create a simple task which sleeps for 10 micro sec
and wakes up and continues to do so until the user kills the process.

Interesting things note -- 

        1. If I uncomment the printf statement at the beginning of the
while loop the program does not crash any more.
        2. OR if I use rt_task_sleep instead of clock_nanosleep it does
not crash.

I am using xenomai 2.5.2 and the arm platform has kernel 2.6.28. I've
cc-ed this email to a tech expert (Travis) of the vendor (EMAC) of the
arm system. 

At the time of crashing I see the following error message on the screen
----

WARNING: at
/home/travis/projects/customers/pivotal_systems/workspace/linux-2.6.
28-xenomai-pivotal/kernel/sched.c:4382 add_preempt_count+0x84/0x98()
Modules linked in: at91_udc
[<c002e374>] (dump_stack+0x0/0x14) from [<c004510c>]
(warn_on_slowpath+0x4c/0x68
)
[<c00450c0>] (warn_on_slowpath+0x0/0x68) from [<c003dd44>]
(add_preempt_count+0x
84/0x98)
 r6:c38dc02c r5:00000000 r4:00000001
[<c003dcc0>] (add_preempt_count+0x0/0x98) from [<c0045d24>]
(vprintk+0x2c/0x3d4)
[<c0045cf8>] (vprintk+0x0/0x3d4) from [<c00466c8>] (printk+0xe0/0x194)
[<c00465e8>] (printk+0x0/0x194) from [<c00768f0>]
(__xnpod_schedule+0x38c/0x550)
 r3:00000003 r2:c039e3a0 r1:c3854000 r0:c032f630
 r8:c480d408 r7:c3b98ca0 r6:c3b98ca0 r5:00000000 r4:c03a0d10
[<c0076564>] (__xnpod_schedule+0x0/0x550) from [<c007698c>]
(__xnpod_schedule+0x
428/0x550)
[<c0076564>] (__xnpod_schedule+0x0/0x550) from [<c007698c>]
(__xnpod_schedule+0x
428/0x550)
[<c0076564>] (__xnpod_schedule+0x0/0x550) from [<c007698c>]
(__xnpod_schedule+0x
428/0x550)
[<c0076564>] (__xnpod_schedule+0x0/0x550) <1>Unable to handle kernel
paging requ
est at virtual address 00001008



Thanks for your help

Abhijit






-----Original Message-----
From: Philippe Gerum [mailto:[email protected]] 
Sent: Friday, May 28, 2010 1:05 AM
To: Abhijit Majumdar
Cc: Steve Deiters; [email protected]
Subject: RE: [Xenomai-help] rt_task_sleep causing crashes on PowerPC

On Wed, 2010-05-26 at 14:03 -0700, Abhijit Majumdar wrote:
> Hi
> 
> I get similar problem the xenomai posix skin. I have the latest
version
> of Xenomai (2.5.3) and kernel 2.6.28. 
> 
> I am using clock_nanosleep(CLOCK_REALTIME, ......) to wait for 1
> millisecond. It freezes the system. However if I sleep for a second it
> is fine.
> 
> Philippe, should your fix work in my case too? 

I have no idea which platform you are running your code on, so my answer
won't be specific, but in short: it is unlikely. This could rather be an
application error. You may want to try the failing code in a small
standalone unit test, and post that code to the list if it still fails
in that context, so we could have a look.

> If so, can you please
> send the fix.
> 
> thanks
> Abhijit
> 
> -----Original Message-----
> From: [email protected]
[mailto:[email protected]]
> On Behalf Of Philippe Gerum
> Sent: Sunday, May 16, 2010 2:58 PM
> To: Steve Deiters
> Cc: [email protected]
> Subject: Re: [Xenomai-help] rt_task_sleep causing crashes on PowerPC
> 
> On Fri, 2010-05-14 at 19:18 -0500, Steve Deiters wrote:
> > I am running Xenomai 2.5.3, I-pipe version 2.9-00, with Linux
2.6.33.4
> > on a PowerPC MPC5121.  With small values of sleep ticks passed to
> > rt_task_sleep, I get various sorts of crashes.  Here is a simple
> program
> > using a delay loop that exhibits the behavior.
> 
> <snip>
> 
> > 
> > I'm not sure if I have something misconfigured or what.  I am
> upgrading
> > from Xenomai 2.4.10 on an older kernel and I did not have this same
> > problem.
> > 
> 
> Bug confirmed here. Your setup is not involved, I'll send a fix asap.
> 
> > Thanks.
> > 
> > 
> > _______________________________________________
> > Xenomai-help mailing list
> > [email protected]
> > https://mail.gna.org/listinfo/xenomai-help
> 
> 


-- 
Philippe.


Attachment: sleeptest.c
Description: sleeptest.c

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to