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  2015  <20162017  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  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Simultaneous Channel access
From: <[email protected]>
To: <[email protected]>
Date: Tue, 6 Dec 2016 09:24:03 +0000

Hi Marty,

 

Thanks for your reply. In the real application, I don’t have any control over the threads (the calls to Get, RPC are done through a GUI that makes calls to a server which does the request). Though I’ve created simpler test applications that both include threading, and don’t, and the same issue occurs.

 

I’ve created a test application that demonstrates the issue (see attached)

 

There are two files – PVATest.java and EpicsTestServer.java.

 

The EpicsTestServer.java is just a simple server that listens for connections, and has one pv – “state”. When it receives an RPC call, it changes the state and just pauses for 5 seconds. This can be started as a standard Java application using the main() method, and should be started before running the tests.

 

The PVATest.java is a JUnit test file with two tests in. The main test that demonstrates the issue is called TestSimulatenous(). It makes an asynchronous RPC call, and then immediately after does a GET. The test fails because the “Status status2 = pvaChannel2.waitConnect(3);” call in the GET section can’t connect with error ‘channel not connected’

 

The test can be made to pass by uncommenting the “//Thread.sleep(5000);” which gives the server time to finish processing the RPC call and return.

 

The other test in this class is called TestSimulatenousOnlyGet() and is a copy of the GET section of the first test. If it is run at the same time as the first (i.e. whilst the server is still pausing during processing of the RPC request) then it can connect and get the state value, showing that the issue isn’t in the server. To get the timings right on this test, I normally debug the tests and the Test Server, with debug points on the line after “// Do Get” in the first test, and on the “Thread.sleep(5000);” line in the Test Server. This ensures the server is still processing the request when the second test makes its GET request.

 

Thanks again for your help,

 

Matt

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 

Attachment: EpicsTestServer.java
Description: EpicsTestServer.java

Attachment: PVATest.java
Description: PVATest.java


Replies:
Re: Simultaneous Channel access Marty Kraimer

Navigate by Date:
Prev: streamdevice 2.7.7 and PINI Hinxx
Next: RE: deadlock in pcas 3.14.12.6-rc1 Wang Xiaoqiang (PSI)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Simultaneous Channel access Marty Kraimer
Next: Re: Simultaneous Channel access Marty Kraimer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 06 Dec 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·