Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Bug in asyn and patch [was: Tektronic Scope DPO7254 over VXI-11 crashes IOC]
From: Benjamin Franksen <benjamin.franksen@bessy.de>
To: tech-talk@aps.anl.gov
Date: Fri, 19 Mar 2010 13:12:47 +0100
On Friday 19 March 2010, Benjamin Franksen wrote:
> So, it seems, streamDevice is innocent, after all. There must be
>  something wrong (no idea what, exactly) with the vxi-11 SRQ
>  implementation in asyn.

With hindsight the bug in asyn is obvious: If SRQ server creation fails, 
because asyn finds out that the other side does not support this part of the 
protocol, asyn erronously destroys the whole vxi-port's clnt_handle which 
later leads to a crash as soon you do the first clnt_call. Remove the two 
bad calls to clnt_destroy in vxiCreateIrqChannel and all is fine. 

You can apply the following patch with 'patch -p1':

diff -rN -u old-4-12/asyn/vxi11/drvVxi11.c new-4-12/asyn/vxi11/drvVxi11.c
--- old-4-12/asyn/vxi11/drvVxi11.c      2010-03-19 13:07:53.000000000 +0100
+++ new-4-12/asyn/vxi11/drvVxi11.c      2010-03-19 13:07:53.000000000 +0100
@@ -698,13 +698,11 @@
             "%s vxiCreateIrqChannel (create_intr_chan)%s\n",
             pvxiPort->portName,clnt_sperror(pvxiPort->rpcClient,""));
         xdr_free((const xdrproc_t) xdr_Device_Error, (char *) &devErr);
-        clnt_destroy(pvxiPort->rpcClient);
     } else if(devErr.error != VXI_OK) {
         asynPrint(pasynUser,ASYN_TRACE_ERROR,
             "%s vxiCreateIrqChannel %s (create_intr_chan)\n",
             pvxiPort->portName, vxiError(devErr.error));
         xdr_free((const xdrproc_t) xdr_Device_Error, (char *) &devErr);
-        clnt_destroy(pvxiPort->rpcClient);
     } else {
         vxiSrqEnable(pvxiPort,1);
         xdr_free((const xdrproc_t) xdr_Device_Error, (char *) &devErr);

Cheers
Ben

Replies:
RE: Bug in asyn and patch [was: Tektronic Scope DPO7254 over VXI-11crashes IOC] Mark Rivers
References:
Tektronic Scope DPO7254 over VXI-11 crashes IOC Benjamin Franksen
Re: Tektronic Scope DPO7254 over VXI-11 crashes IOC Benjamin Franksen
Re: Tektronic Scope DPO7254 over VXI-11 crashes IOC Benjamin Franksen

Navigate by Date:
Prev: Re: Tektronic Scope DPO7254 over VXI-11 crashes IOC Benjamin Franksen
Next: Re: EPICS support for PI C-867 motor controller Kurt Goetze
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: Tektronic Scope DPO7254 over VXI-11 crashes IOC Benjamin Franksen
Next: RE: Bug in asyn and patch [was: Tektronic Scope DPO7254 over VXI-11crashes IOC] Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·