EPICS Controls 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  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Stream Device: infinite loop when remote closes connection
From: Mark Rivers <[email protected]>
To: Mazanec Tomáš <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 30 Nov 2015 12:15:28 +0000
I also thought this might be the same problem that Tomas is referring to, but it is not, it is a different problem.

Mark

________________________________________
From: [email protected] [[email protected]] on behalf of Mazanec Tomáš [[email protected]]
Sent: Monday, November 30, 2015 4:01 AM
To: [email protected]; [email protected]; [email protected]
Subject: RE: Stream Device: infinite loop when remote closes connection

Hi Ambroz

I see a resemblance to my disconnect/reconnect problems (http://www.aps.anl.gov/epics/tech-talk/2014/msg00605.php) regarding AsynDriverInterface.cc writeHandler().
If I recall correctly, the patches were applied to synApps SVN/GIT.

Cheers,
Tomas

________________________________________
Od: [email protected] [[email protected]] za uživatele [email protected] [[email protected]]
Odesláno: 25. listopadu 2015 20:07
Komu: [email protected]; [email protected]
Předmět: Stream Device: infinite loop when remote closes connection

Hello all, Dirk,

I've found a bug in StreamDevice asynDriver code. In my case, whenever the remote TCP host closes connection, a thread in EPICS will enter an infinite loop, the connection failure will never be reported, and reconnection will never be attempted. I've tracked it down to this code in AsynDriverInterface.cc:

// now, we can write (called by asynManager)
void AsynDriverInterface::
writeHandler()
{
...
    } while (status != asynTimeout);
...

I observed that the read returns asynError and this loop continues forever. I was able to fix it by changing this line to:

    } while (status != asynTimeout && status != asynError);

Now it appears to be working correctly, the connection error is reported and reconnection works.

Best regards,
Ambroz Bizjak



References:
Stream Device: infinite loop when remote closes connection ambroz . bizjak
RE: Stream Device: infinite loop when remote closes connection Mazanec Tomáš

Navigate by Date:
Prev: Re: MVME-5500 Universe II Andy Cousins
Next: RE: Device Support for I2C and GPIO Dudley, David
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Stream Device: infinite loop when remote closes connection Mazanec Tomáš
Next: How to study the epics system in no device? mujin park
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·