Experimental Physics and Industrial Control System
|
Andrew Johnson wrote:
Unfortunately there are major problems with doing this in a running IOC: we
don't have locks in all the database structures that need to be modified when
a new record instance is created, which makes this a precarious activity.
The current dbStaticLib design assumes that all record creation happens while
the IOC is running single-threaded before initialization of any scan or
server threads. For example, the pdbbase->ppvd structure which is a hash
table of all the record instances has no locks, so one or more server threads
could be searching for PV names in the hash bucket linked list that your new
record instance gets added to.
Looking at the code in base/src/dbStatic/dbPvdLib.c I can see several ways
that simultaneous calls to dbPvdFind() and dbPvdAdd() in different threads
could cause a segfault, because this code has not been written with that
possibility in mind.
It might be possible to make this thread-safe by disabling interrupts before
calling dbPvdAdd().
Dirk
--
Dr. Dirk Zimoch
Paul Scherrer Institut, WBGB/006
5232 Villigen PSI, Switzerland
Phone +41 56 310 5182
- Replies:
- Re: recordGenerator record Andrew Johnson
- References:
- recordGenerator record Kalantari Babak
- Re: recordGenerator record Andrew Johnson
- Navigate by Date:
- Prev:
CAJ 1.1.5 and JCA 2.3.2 released Matej Sekoranja
- Next:
Re: recordGenerator record Andrew Johnson
- 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
2025
- Navigate by Thread:
- Prev:
Re: recordGenerator record Andrew Johnson
- Next:
Re: recordGenerator record Andrew Johnson
- 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
2025
|
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|