rtems_message_queue_receive / rtems_event_receive issues

Catalin Demergian demergian at gmail.com
Thu Oct 11 07:52:28 UTC 2018


Hi,
I don't use malloc myself in the code I added, but I see it is used a lot
in the networking code.

I printed state and Wait.flags for SCrx task
* when all is ok *
in _Event_Seize, after _Thread_Dispatch_enable
state = 0x100 = STATES_WAITING_FOR_EVENT
Wait.flags = 0x102 = THREAD_WAIT_CLASS_EVENT | THREAD_WAIT_STATE_BLOCKED
in _Event_Surrender at the beginning
state = 0x100
Wait.flags = 0x102

* when SCrx is not scheduled any more *
in _Event_Seize, after _Thread_Dispatch_enable
state = 0x0 = STATES_READY
Wait.flags = 0x02 = THREAD_WAIT_STATE_BLOCKED
in _Event_Surrender at the beginning
state = 0x0
Wait.flags = 0x02

do these look like valid values ? I mean in _Event_Seize the state should
have been blocked, right ?
can these values be caused by a corruption ?

-> Did you check the task stacks with the stack checker?
I'm afraid I don't know how to use it in RTEMS. any link to information on
how to detect/analyze a data coruption in RTEMS can be useful.

regards,
Catalin

On Thu, Oct 11, 2018 at 8:50 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 10/10/2018 16:18, Catalin Demergian wrote:
> >
> >     Hi,
> >
> > I got into another issue when I tried ping -f
> > [/] # assertion "the_watchdog->state == WATCHDOG_ACTIVE" failed: file
> > "../../../../../../c/src/../../cpukit/score/src/watchdogremove.c",
> > line 34, function: _Watchdog_Remove_it
> >
> > *** PROFILING REPORT BEGIN PMC_APP ***
> >   <ProfilingReport name="PMC_APP">
> >     <PerCPUProfilingReport processorIndex="0">
> >       <MaxThreadDispatchDisabledTime
> > unit="ns">2</MaxThreadDispatchDisabledTime>
> >       <MeanThreadDispatchDisabledTime
> > unit="ns">1</MeanThreadDispatchDisabledTime>
> >       <TotalThreadDispatchDisabledTime
> > unit="ns">408424</TotalThreadDispatchDisabledTime>
> > <ThreadDispatchDisabledCount>404697</ThreadDispatchDisabledCount>
> >       <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
> >       <MaxInterruptTime unit="ns">0</MaxInterruptTime>
> >       <MeanInterruptTime unit="ns">0</MeanInterruptTime>
> >       <TotalInterruptTime unit="ns">0</TotalInterruptTime>
> >       <InterruptCount>0</InterruptCount>
> >     </PerCPUProfilingReport>
> >   </ProfilingReport>
> > *** PROFILING REPORT END PMC_APP ***
> >
> > do you think this one has a connection with the other assert ? (try to
> > get a process from am empty queue) ?
>
> The only connection I see is that you observe a corrupt data structure.
> Did you check the task stacks with the stack checker? Do you use heap
> buffers?
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20181011/d2268bb2/attachment-0002.html>


More information about the users mailing list