Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: RE: asyn+streamDevice hangs with synchronousLock:Yes
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'J. Lewis Muir'" <jlmuir@imca-cat.org>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 15 Jul 2013 14:53:38 +0000
Hi Lewis,

This problem did get resolved.

There were 2 problems.  Both have to do with the way that StreamDevice handles I/O Intr scanned records, which is by polling.

1) Brian had set the noProcessEos flag to 1 on his drvAsynIPPort driver, so it was not using the EOS interpose interface.  Since his device does not send an EOS character this seemed a reasonable thing to do.  But I found that the problem of hanging went away if noProcessEos was set to 0.  I don't completely understand this yet, but the EOS interpose layer does add another level of buffering.

2) Even with noProcessEos=0 my tests showed that not all messages from the device were resulting in record processing, some messages were missed.  This was basically an interplay of two things:
  - The device does not send a terminator and does not have a fixed message size, so the only way to detect the end of a message is by a timeout.
  - The default polling rate of StreamDevice for an I/O Intr scanned record is the timeout, which defaults to 1.0 second.  However, the PollPeriod parameter can be used to set it to another value.

I found that if I set PollPeriod = 100 ms, and I set noProcessEos=0 then my simulation driver worked fine (i.e. the I/O Intr scanned record processed for each message) with message periods of 0.1, 0.2, 0.5, 1.0, and 2.0 seconds.

So there appears to be a solution to the problem.

Mark


-----Original Message-----
From: J. Lewis Muir [mailto:jlmuir@imca-cat.org] 
Sent: Monday, July 15, 2013 9:27 AM
To: Mark Rivers
Subject: Re: asyn+streamDevice hangs with synchronousLock:Yes

On 7/8/13 6:51 PM, Mark Rivers wrote:
> This should be relatively easy to track down now that we can reproduce it with a simple dummy server.
> 
> I'll look at it tomorrow.
> 
> Mark

Hi, Mark.

I'm curious; did this ever get solved?  No worries if not, but since I
was following the thread, I'm interested to know what the problem was.

Thanks,

Lewis


References:
RE: asyn+streamDevice hangs with synchronousLock:Yes Mark Rivers
Re: asyn+streamDevice hangs with synchronousLock:Yes Brian McAllister
RE: asyn+streamDevice hangs with synchronousLock:Yes Mark Rivers

Navigate by Date:
Prev: Re: Looking for STRUCK SIS3302 device driver Michael Davidsaver
Next: single IOC on Linux with two ports Hovanes Egiyan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: asyn+streamDevice hangs with synchronousLock:Yes Mark Rivers
Next: naming services Silver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·