EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Possible bug in ca_clear_channel
From: Benjamin Franksen <[email protected]>
To: EPICS Core Talk <[email protected]>
Date: Sun, 28 Dec 2014 23:00:32 +0100
Hi All

I recently added a few more tests to the sequencer, mostly concerned with the
pvAssign function. This led to mysterious hang-ups: one of the new tests
sometimes hangs right in the middle of a call to pvAssign. Further
investigation revealed that the bug is not in the sequencer, at least not in
any apparent way. When pvAssign is called with a connected channel, it first
disconnects it by calling ca_clear_channel. What I see when instrumenting the
relevant parts of the code with printf statements is that ca_clear_channel
gets called but never returns. This does not happen every time, of course,
it's highly timing dependent. I can reproduce it only about every dozen times
I run the test. It only happens if the channel is on another IOC (but in my
tests the other IOC runs on the same machine, in the background). When it
happens it is always the first call to ca_clear_channel in the program that
hangs. I looked at the code in src/ca/access.cpp and there has been a change
between 3.14.12.3 and 3.14.12.4 in ca_clear_channel and it looks as if this is
a regression because I cannot reproduce the problem with 3.14.12.3, but I can
with 3.14.12.4 (and 3.15, BTW).

The latest version 2.2 snapshot on the sequencer home page (seq-2-2-
snapshot-2014-12-28.tar.gz) contains the test in test/validate/reassign.st. To
reproduce, it is easiest to start the IOC with the database in the background
like this:

ben@sarun[1]: .../seq/branch-2-2 > cd test/validate/O.linux-x86_64
ben@sarun[1]: .../validate/O.linux-x86_64 > ./reassign -S -d ../reassign.db &
[1] 29640
ben@sarun[1]: .../validate/O.linux-x86_64 > Starting iocInit
############################################################################
## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$
## EPICS Base built Dec 28 2014
############################################################################
iocRun: All initialization complete

Then start the real test program as often as it takes. This is how far it gets
when it hangs:

ben@sarun[1]: .../validate/O.linux-x86_64 > ./reassign -S -t
Sequencer release 2.2.0.3, compiled Sun Dec 28 22:40:58 2014
Spawning sequencer program "reassignTest", thread 0x1a77490: "reassignTest"
reassignTest[0]: all channels connected & received 1st monitor
1..30
# start
ok  1 - seq_pvChannelCount(seqg_env) == 3
ok  2 - seq_pvAssignCount(seqg_env) == 2
ok  3 - seq_pvConnectCount(seqg_env) == 2

Cheers
Ben
--
"Make it so they have to reboot after every typo." -- Scott Adams


________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


Replies:
Re: Possible bug in ca_clear_channel Andrew Johnson

Navigate by Date:
Prev: Re: DoE and EPICS Andrew Johnson
Next: Re: Possible bug in ca_clear_channel Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: DoE and EPICS Andrew Johnson
Next: Re: Possible bug in ca_clear_channel Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 29 Dec 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·