Hi Xiaoqiang,
I hesitate to say for sure as I'm not completely familiar w/ this code,
but as far as I can tell the casChannelI instance would have to be constructed
before creating a casMonitor instance and installing it for the eventSys to process.
It also appears the casMonitor would have to be uninstalled and deleted before
the casChannelI instance could be deleted.
As postEvent is processing events for casMonitors, that should prevent this deadlock
from occurring again.
Regards,
- Bruce
On 12/07/2016 03:08 AM, Wang Xiaoqiang wrote:
Hi Bruce,
Thanks. The crash cannot be reproduced with this fix.
Since the casPVI lock is now acquire during channel creation,
just a purely theoretical thinking, is there a chance that the deadlock would happen if a new CA client wants to
connect while PCAS application is calling postEvent?
I am running the same test again, and in addition four loops to make continuous caget requests.
$ while [ 1 ]; do caget MTEST:MinValue; done;
Best
Xiaoqiang
On 12/07/2016 10:45 AM, Bruce Hill wrote:
Hi Xiaoqiang,
Thanks, I was able to reproduce the bug using your suggestions.
I've submitted a proposed fix on launchpad. Please let me know if you
have a chance to try it. My version ran all day today w/o crashing.
https://code.launchpad.net/~bhill/epics-base/pcas-deadlock-fix-3.14/+merge/312638
<https://code.launchpad.net/%7Ebhill/epics-base/pcas-deadlock-fix-3.14/+merge/312638>
Cheers,
- Bruce
On 12/6/2016 1:38 AM, Wang Xiaoqiang (PSI) wrote:
Hi Bruce,
I replied you here
https://github.com/paulscherrerinstitute/pcaspy/issues/29#issuecomment-265103000
I carried out the described test procedure on a SL6 64bit Linux PC.
The problem appears definitely in a few seconds.
Best
Xiaoqiang
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Bruce Hill
Sent: Dienstag, 6. Dezember 2016 04:15
To: [email protected]
Subject: Re: deadlock in pcas 3.14.12.6-rc1
Hi Xiaoqiang,
Do you have a pcaspy example that I can run to reproduce this?
I'm running pcaspy 0.6.2 currently, but could also build from a github
branch if available.
Thanks,
- Bruce
On 11/10/2016 08:59 AM, Wang Xiaoqiang (PSI) wrote:
Hi,
I am testing the support of dynamic array in the recent base
3.14.12.6-rc1.
Using a normal pcaspy application, which updates ~15 Hz. It
repeatedly gets into a deadlock state.
The analysis has been put up here
https://github.com/paulscherrerinstitute/pcaspy/issues/29
The solution could be reversing the lock order during
casEventSys::process. But it does not seem to be easy, because the
chain of calls involved.
Best
Xiaoqiang
--
Bruce Hill
Member Technical Staff
SLAC National Accelerator Lab
2575 Sand Hill Road M/S 10
Menlo Park, CA 94025
--
Bruce Hill
Member Technical Staff
SLAC National Accelerator Lab
2575 Sand Hill Road M/S 10
Menlo Park, CA 94025
- References:
- deadlock in pcas 3.14.12.6-rc1 Wang Xiaoqiang (PSI)
- Re: deadlock in pcas 3.14.12.6-rc1 Bruce Hill
- RE: deadlock in pcas 3.14.12.6-rc1 Wang Xiaoqiang (PSI)
- Re: deadlock in pcas 3.14.12.6-rc1 Bruce Hill
- Re: deadlock in pcas 3.14.12.6-rc1 Wang Xiaoqiang
- Navigate by Date:
- Prev:
SureStep microstepping drive Omitto, Diego
- Next:
base-3.14.12.5 CONFIG_SITE.linux-x86_64.UnixCommon Hinxx
- 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
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: deadlock in pcas 3.14.12.6-rc1 Wang Xiaoqiang
- Next:
StreamDevice/AsynIPPort question Michael Westfall
- 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
2020
2021
2022
2023
2024
|