nanosleep blocks inifinity (internal rtems deathlock?) even CPU is in idle Task

Matthias Goldhoorn matthias.goldhoorn at uni-bremen.de
Thu Nov 15 16:45:00 UTC 2012


On 15.11.2012 14:52, Sebastian Huber wrote:
> On 11/15/2012 01:26 PM, Matthias Goldhoorn wrote:
>> On 15.11.2012 11:52, Sebastian Huber wrote:
>>> On 11/15/2012 10:44 AM, Matthias Goldhoorn wrote:
>>>> Hello Again,
>>>> new Problem i got the debugger working (will port it later to the 
>>>> wiki, needed
>>>> adaptations for the compiler and mentioned scripts).
>>>>
>>>> It seems there is an bugg inside of rtems. My Code calls nanosleep 
>>>> and never
>>>> returnes from there.
>>>> My main-cread is idling, so there is no higher priority process 
>>>> running. I
>>>> wonder why my thread which has called nanosleep never returns...
>>>> Any suggestions?
>>>
>>> Do you have a clock driver configured, e.g.
>>>
>>> #define CONFIGURE_INIT
>>>
>>> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>>>
>>> [...]
>>>
>>> #include <rtems/confdefs.h>
>>>
>> Yeah it's both defined.
>> The nanosleep sometimes (mostly) works.
>> Only if some interrupts during the sleep i got this non-awaking 
>> behavior it
>> seems strange.
>> Maybe broke my memory or stack anywhere. Could you tell me where the 
>> scheduler
>> of rtems is located to that i can define a breakpoint into him and 
>> check why my
>> thread is not waked up.
>> I searching the timer interrupt function that really does the thread 
>> management.
>
> Which BSP do you use and which RTEMS version?
>
> You can set a break point to rtems_clock_tick() to see if the system 
> timer works. It should update the timer of the nanosleep() task and 
> wake it up eventually.
>
I use an i386 currently and use quemu

The rtems_clock_tick interrupt works unfortunately i don’t have any 
source code there to debug into it...

Breakpoint 1, 0x0073272b in rtems_clock_tick ()
(gdb) bt
#0 0x0073272b in rtems_clock_tick ()
#1 0x00701912 in Clock_isr ()
#2 0x0070350b in bsp_interrupt_handler_dispatch ()
#3 0x00703868 in C_dispatch_isr ()
#4 0x0070bfd3 in nested ()
#5 0x00000000 in ?? ()

Greetings,
Matthias




-- 
  Dipl.-Inf. Matthias Goldhoorn
  Space and Underwater Robotic

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 5
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4193
  Zentrale: +49 421 178 45-6550
  Fax:      +49 421 178 45-4150
  E-Mail:   matthias.goldhoorn at uni-bremen.de

  Weitere Informationen: http://www.informatik.uni-bremen.de/robotik




More information about the users mailing list