EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: RTEMS/osdMessageQueue.c
From: Gedare Bloom via Core-talk <core-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: EPICS core-talk <core-talk at aps.anl.gov>
Date: Tue, 26 May 2020 01:17:58 -0600
On Tue, May 26, 2020 at 1:13 AM Gedare Bloom <gedare at rtems.org> wrote:
>
> On Mon, May 25, 2020 at 2:27 PM Michael Davidsaver via Core-talk
> <core-talk at aps.anl.gov> wrote:
> >
> > On 5/25/20 11:37 AM, Michael Davidsaver wrote:
> > > A couple of things.
> >
> > And a couple of more.
> >
> > I notice that the only internal usage of _CORE_message_queue_Send() in RTEMS
> > is in rtems_message_queue_send(), where it never blocks (wait=0).  So this
> > might be a bug in the wait=1 case.
> >
> > https://github.com/epicsdeb/rtems/blob/023ea6196c9f3975663328d00d5603ce040deb6c/cpukit/score/src/coremsgsubmit.c#L135-L167
> >
>
> I'll try to have a look from RTEMS perspective to see if this is a
> latent bug. 4.10 is getting old to maintain but I've been trying to
> keep it going (although, apparently, breaking some things too). This
> code has been re-written in 4.11 and again for 5.0 for SMP, but I
> don't see paths with wait = true in newer versions either, so it may
> be untested code.
>

By manual code inspection, I think POSIX mq_timedsend goes through the
wait path. I'm not saying there isn't a bug, but it might be better to
switch to using the posix mqs (I think Heinz suggested that too) as a
public API to RTEMS.

> >
> > As I look at epicsMessageQueueTest.cpp I don't see any test which
> > deliberately times out.
> >
> >
> > ...
> > >> So far every time I have run this test the numSent counter has always come back as 420 instead of 500. The fastSender() code looks like this:
> >
> >
> > I see something similar (RTEMS 4.9.6 w/ mvme3100 + QEMU), but not always 420
> >
> >
> > > # sleepySender: sending every 0.009 seconds
> > > ok 57 - Sent 500 (should be 500)
> > > ok 58 - Received 500 (should be 500)
> > > # sleepySender: sending every 0.010 seconds
> > > ok 59 - Sent 500 (should be 500)
> > > ok 60 - Received 500 (should be 500)
> > > # sleepySender: sending every 0.011 seconds
> > > ok 61 - Sent 500 (should be 500)
> > > ok 62 - Received 500 (should be 500)
> > > # sleepyReceiver: acquiring every 0.009 seconds
> > > not ok 63 - Sent 421 (should be 500)
> > > ok 64 - Received 500 (should be 500)
> > > # sleepyReceiver: acquiring every 0.010 seconds
> > > not ok 65 - Sent 418 (should be 500)
> > > ok 66 - Received 500 (should be 500)
> > > # sleepyReceiver: acquiring every 0.011 seconds
> > > not ok 67 - Sent 418 (should be 500)
> > > ok 68 - Received 500 (should be 500)

References:
RTEMS/osdMessageQueue.c Johnson, Andrew N. via Core-talk
Re: RTEMS/osdMessageQueue.c Michael Davidsaver via Core-talk
Re: RTEMS/osdMessageQueue.c Michael Davidsaver via Core-talk
Re: RTEMS/osdMessageQueue.c Gedare Bloom via Core-talk

Navigate by Date:
Prev: Re: RTEMS/osdMessageQueue.c Gedare Bloom via Core-talk
Next: Jenkins build is back to stable : epics-7.0 » linux32 #226 APS Jenkins via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: RTEMS/osdMessageQueue.c Gedare Bloom via Core-talk
Next: Re: RTEMS/osdMessageQueue.c Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 26 May 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·