EPICS Home

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  2016  2017  2018  2019  <20202021  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  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Consistently inconsistent behaviour when testing ADURL
From: Simon Rose via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 2 Apr 2020 09:31:23 +0000

Hello –

 

We have been seeing some strange behavior when testing ADURL. Note that we are building our EPICS modules in a docker environment that runs conda, so we can ensure consistent behavior across builds. We also use an environment similar to that at PSI with a require module that dynamically loads other EPICS modules.

 

We use a python script to test the startup of an IOC. Essentially it runs the IOC in a subprocess, waits a little while, sends the command “exit”, and then inspects the output to see if there were any problems.

 

Anyhow, what happens--consistently!--is that the first time you run this test after the ADUrl module is built is that it hangs when trying to read the stdout from the subprocess. You can then break out of it, and then running it a second (or third, or fourth, etc.) time exits as expected. Consistently.

 

The startup script that causes the issue is the following:

 

require adurl

require busy

 

epicsEnvSet("IOC",                          "iocURLTest")

epicsEnvSet("TOP",                         ".")

epicsEnvSet("PREFIX", "URL1:")

epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES","64000000")

epicsEnvSet("PORT",   "URL1")

 

URLDriverConfig("$(PORT)", 0, 0)

dbLoadRecords("$(adurl_DIR)/db/URLDriver.db","P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")

 

iocInit()

 

If we remove the dbLoadRecords call, however, it works as expected.

 

To summarize:

 

  1. If you use the python wrapper to run the IOC using the above script, it hangs the first time. If you run it again (and again, and again), it exits as expected.
  2. If you instead begin by running the IOC directly from the command line, it runs as expected. If you follow this by using the python wrapper, then it also runs and exits as expected.
  3. The first run (and all subsequent ones) succeeds if you comment out the dbLoadRecords() line.

 

The above suggests that something funny happens the first time you run dbLoadRecords(), but I do not have any idea what that is.

 

We have a workaround at the moment, but this is just so mysterious and we would like to understand what exactly is happening here.

 

Thanks in advance,

 

Cheers,

 

Simon Rose

Software Engineer

European Spallation Source

 

 


Replies:
RE: Consistently inconsistent behaviour when testing ADURL Mark Rivers via Tech-talk

Navigate by Date:
Prev: EDM in RHEL8 or Centos8 Ernesto Paiser via Tech-talk
Next: RE: Consistently inconsistent behaviour when testing ADURL Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  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: EDM in RHEL8 or Centos8 Williams Jr., Ernest L. via Tech-talk
Next: RE: Consistently inconsistent behaviour when testing ADURL Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024