asynDriver: Asynchronous Driver Support - Known Problems

May 12, 2006


Release 4-5

drvAsynSerialPort/drvAsynIPPort

NULL pointer dereference. How this one slipped through testing is quite surprising.
Index: asyn/drvAsynSerial/drvAsynIPPort.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/modules/soft/asyn/asyn/drvAsynSerial/drvAsynIPPort.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- asyn/drvAsynSerial/drvAsynIPPort.c	25 Apr 2006 17:50:02 -0000	1.30
+++ asyn/drvAsynSerial/drvAsynIPPort.c	11 May 2006 21:12:45 -0000	1.31
@@ -11,7 +11,7 @@
 ***********************************************************************/
 
 /*
- * $Id: KnownProblems.html,v 1.29 2006/05/12 15:35:41 norume Exp $
+ * $Id: KnownProblems.html,v 1.29 2006/05/12 15:35:41 norume Exp $
  */
 
 /* Previous versions of drvAsynIPPort.c (1.29 and earlier, asyn R4-5 and earlier)
@@ -386,7 +386,7 @@
         status = asynError;
     }
 #endif
-    *gotEom = 0;
+    if (gotEom) *gotEom = 0;
 #ifdef USE_POLL
     {
         struct pollfd pollfd;
Index: asyn/drvAsynSerial/drvAsynSerialPort.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/modules/soft/asyn/asyn/drvAsynSerial/drvAsynSerialPort.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- asyn/drvAsynSerial/drvAsynSerialPort.c	3 Apr 2006 23:38:19 -0000	1.34
+++ asyn/drvAsynSerial/drvAsynSerialPort.c	11 May 2006 21:12:45 -0000	1.35
@@ -11,7 +11,7 @@
 ***********************************************************************/
 
 /*
- * $Id: KnownProblems.html,v 1.29 2006/05/12 15:35:41 norume Exp $
+ * $Id: KnownProblems.html,v 1.29 2006/05/12 15:35:41 norume Exp $
  */
 
 #include <string.h>
@@ -778,7 +778,7 @@
 #endif
     }
     tty->timeoutFlag = 0;
-    *gotEom = 0;
+    if (gotEom) *gotEom = 0;
     for (;;) {
 #ifdef vxWorks
         /*

drvAsynIPPort

If a client calls asynCommon->connect when the asyn port is already connected to the IP port, then the asyn port will be disconnected from the IP port for all clients. The correct behavior in this case is to simply return an asynError status.

The following change fix can be made to drvAsynIPPort.c to fix the problem:

corvette> cvs diff -rR4-5 drvAsynIPPort.c
Index: drvAsynIPPort.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/modules/soft/asyn/asyn/drvAsynSerial/drvAsynIPPort.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- drvAsynIPPort.c     3 Apr 2006 23:38:19 -0000       1.27
+++ drvAsynIPPort.c     17 Apr 2006 15:36:40 -0000      1.28
@@ -11,7 +11,7 @@
 ***********************************************************************/
 
 /*
- * $Id: KnownProblems.html,v 1.29 2006/05/12 15:35:41 norume Exp $
+ * $Id: KnownProblems.html,v 1.29 2006/05/12 15:35:41 norume Exp $
  */
 
 #include <string.h>
@@ -206,6 +206,11 @@
      * Sanity check
      */
     assert(tty);
+    if (tty->fd >= 0) {
+        epicsSnprintf(pasynUser->errorMessage,pasynUser->errorMessageSize,
+                              "%s: Link already open!", tty->serialDeviceName);
+        return asynError;
+    }
 
     asynPrint(pasynUser, ASYN_TRACE_FLOW,
               "Open connection to %s\n", tty->serialDeviceName);

Release 4-3

gsIP488

This fails for fast processors like the 2700 and 5100

devAsynOctet

UDF is not set false when the VAL field is modified.


Release 4-2

devAsynFloat64

Device support is not returning 2 (do not convert) for ai records when it should. This means that the VAL field is being set back to 0 by the record after device support writes to it.

asynRecord

The record sometimes does not read the current input and output EOS values from the driver when it connects.

Release 4-1

asynInterposeEos

If read reads maxchars, it forces the last character to be 0 and returns asynOverflow if it wasn't.

drvAsynSerialPort,drvAsynIPPort - Error reporting

These do not properly set an error message in asynUser.errorMessage when they return asynError.

asynRecordFCTL

This calls setOption for clocal. This only works on vxWorks because vxWorks uses the name CLOCAL for what POSIX calls CRTSCTS.

devEpics

If a call to a low level driver, which registered itself as canBlock, completes without blocking then the asynchronous completion may never occur. This will be fixed in the next release.

drvAsynIPPort and drvAsynSerialPort

The problem reported for version 4 about segmentation faults on cygwin-x86 has been fixed.

Release 4-0

asynRecord

asynRecord (and other code) use epicsStrSnPrintEscaped. In EPICS 3.14.6 the files epicsVsnprintf on vxWorks (which gets called by several other epicsXXXprintf routines) and epicsStrSnPrintEscaped each have a bug could cause buffer overflow. These bugs are guaranteed to lead to corruption in asynRecord if the received string is longer than 40 characters.

drvAsynSerial

asynManager

vxi11

Release 3-3

vxi11Configure

If vxiName is specified as "inst" then the driver incorrectly says that it does not block.

asynRecord

If asynRecord is attached to a port that does not implement asynOctet, then asynRecord crashes of it attempt to send/receive a message.

asynManager

The next release gaurantees that when queueRequest is called:

  1. Exactly one of the following occurs:
  2. If either the queue or timeout callback is active when cancelRequest is called, it will not return until the callback completes.

Release 3-2

Mac OS X (Darwin)

The RPC library on Mac OS X 10.3.3 does not handle device timeouts properly and may cause core dumps. A bug report has been filed with Apple. A workaround is to use the GNU glibc RPC/XDR routines.

vxWorks

Attempting to change the trace file to "stdout" does not work becuase vxWorks has per-task standard output streams.

Release 3-1

EPICS Base R3.14.6

When building with EPICS Base R3.14.6 or greater, comment out the epicsInterruptibleSyscall.h and epicsInterruptibleSyscall.c lines in asyn/Makefile:

@@ -19,10 +19,10 @@
 SRC_DIRS += $(ASYN)/asynDriver
 INC += asynDriver.h
 INC += epicsInterruptibleSyscall.h
-INC += epicsString1.h
+#INC += epicsString1.h
 asyn_SRCS += asynManager.c
 asyn_SRCS += epicsInterruptibleSyscall.c
-asyn_SRCS += epicsString1.c
+#asyn_SRCS += epicsString1.c
 
 SRC_DIRS += $(ASYN)/asynGpib
 INC += asynGpibDriver.h

Mac OS X (Darwin)

The RPC library on Mac OSD 10.3.3 does not handle device timeouts properly and may cause core dumps. A bug report has been filed with Apple. A workaround is to use the GNU glibc RPC/XDR routines.

Interrupt Callback

If a user callback calls a low level driver with an infinite or very long timeout, there is no way to make the call terminate. Is there a generic way to abort the call?

Greensprings IP488

Does not support GPIB specific functions.

NI1014 VME Gpib driver

This needs to be implemented for asynDriver.

Generic EPICS device support

Think about creating generic support for connecting to EPICS records.

Network Protocols

Consider generic support for various network protocals: Modbus, etherIP, etc.