Experimental Physics and Industrial Control System
Aloha
A bug has been found in the bc635 driver (Bancomm). The bug is probably
not affecting all users.
If you have a task named 'tSyncANSIClk' on your IOC then you should be
concerned. If you do 'ti "tSyncANSIClk"' and you do not see the
VX_FP_TASK status in the display then you should be worried.
Said task performs floating-point calculations but does not save and
restore the floating-point registers on task switch. Said task runs at a
very high priority but only once every 10 seconds. The consequence is
that any task performing floating-point calculations could be seriously
affected (in experiments I have seen a system run safely for 800,000,000
iterations before the problem occurs).
At the Keck observatory we have experienced various unexplained
behaviors for a decade (including NaN values appearing seemingly 'out of
the blue') and I contend that most, if not all, of those problems can be
explained by this bug.
The problem and solution follow.
In ErDriverInit() within the file bc635TS.c there is the following code:
/* if the real time clock is periodically to be synched, spawn a
task to do so every 10 seconds (TBD: check parameters) */
if ( syncRTC ) {
( void ) taskSpawn( "tSyncRTCClk", 10, 0, 5000, periodRun, 10,
bc635SyncRTC, drv );
}
/* if the VxWorks ANSI clock is periodically to be synched, spawn
a
task to do so every 10 seconds (TBD: check parameters) */
if ( syncSys ) {
( void ) taskSpawn( "tSyncANSIClk", 10, 0, 5000, periodRun,
10,
bc635SyncSys, drv );
}
The second task bc635SyncSys() calls bc635GetTimespec() and that
function performs several floating point operations.
The solution is to change the '0' options parameter, in the taskSpawn,
to
VX_FP_TASK as follows:
/* if the real time clock is periodically to be synched, spawn a
task to do so every 10 seconds (TBD: check parameters) */
if ( syncRTC ) {
( void ) taskSpawn( "tSyncRTCClk", 10, VX_FP_TASK, 5000,
periodRun, 10, bc635SyncRTC, drv );
}
/* if the VxWorks ANSI clock is periodically to be synched, spawn
a
task to do so every 10 seconds (TBD: check parameters) */
if ( syncSys ) {
( void ) taskSpawn( "tSyncANSIClk", 10, VX_FP_TASK, 5000,
periodRun, 10, bc635SyncSys, drv );
}
I suspect it is possible to set the appropriate status in the task
control block (TCB) from the vxworks shell or at least with a tiny piece
of C code. I am playing with that now.
Hope this helps some of you!
Allan Honey
- Navigate by Date:
- Prev:
Re: archiveViewer JSP build Jiro Fujita
- Next:
Re: archiveViewer JSP build, archiver under R3.14.8 Kay-Uwe Kasemir
- 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: archiveViewer JSP build Jiro Fujita
- Next:
JAC and GEMINI! Al Honey
- 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