Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  <19961997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  Index 1994  1995  <19961997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: incompatible problem of EPICS with vxworks 5.3
From: CAI MINGFU <cai@heracc.desy.de>
To: tech-talk@aps.anl.gov
Cc: cai@heracc.desy.de
Date: Tue, 10 Sep 1996 17:36:40 EDT
Dear Sirs,

I am working under vxWorks 5.3 with EPICS 3.13 (PC VERSION, which is from "Kay
kasemir@atdiv.lan.gov") and have got some errors, such as "page fault" 
with some tasks.

Seems these errors only happen when you use the version 5.3 vxWorks.

I have found the reason and here reports my modifications:

1. crash with rsrv_init(), which is invoked by iocInit()
file: ./src/rsrv/rsrv_init.c
crash with vxworks function: errnoOfTaskGet(taskId) if taskId = -1
the errnoOfTaskGet() calls _taskTcb() and if taskId is wrong 
it will cause Page Fault.
wrong:
#define DELETE_TASK(TID)\
  if(errnoOfTaskGet(TID)!=ERROR)taskDelete(TID);

corrected:
#define DELETE_TASK(TID)\
if(TID >= 0 && errnoOfTaskGet(TID)!=ERROR)taskDelete(TID);


Remark: DELETE_TASK should check TID, if not -1 then go on.

2. page fault with db scan task if no record uses its scan period
File: ./src/db/dbScan.c
function: scanList()
error: page fault with scan task if no records using this period
reason: get 'next' when pse==NULL
corrected: (line 598)
  if( pse != NULL) next = (scan_element *)ellNext((void *)pse);

3. Page Fault with spawn task req_server() in caservertask.c
file: ./src/rsrv/caservertask.c

wrong:
	accept( IOCK_sock, NULL, 0 )

corrected:
	struct sockaddr sockAddr;
	int    addLen = sizeof( sockAddr );

	accept( IOCK_sock, &sockAddr, &addLen)
Remark: accept() can not use NULL address pointer.


Now the ca is working correctly.

Best wishes,
-Cai, Mingfu (DESY-MKS2)


Replies:
Re: incompatible problem of EPICS with vxworks 5.3 Jeff Hill

Navigate by Date:
Prev: Re: incompatible problem of EPICS with vxworks 5.3 Marty Kraimer
Next: agenda for the EPICS workshop Matthias Clausen DESY -MKV2/KRYK-
Index: 1994  1995  <19961997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: logistic matter for EPICS meeting @ CERN / attendees Matthias Clausen DESY -MKV2/KRYK-
Next: Re: incompatible problem of EPICS with vxworks 5.3 Jeff Hill
Index: 1994  1995  <19961997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·