EPICS Controls 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  2020  2021  2022  2023  2024  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  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Tektronic Scope DPO7254 over VXI-11 crashes IOC
From: Eric Norum <[email protected]>
To: Benjamin Franksen <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Fri, 19 Mar 2010 07:01:33 -0700
Thanks.
I'm surprised that this problem survived so long.   I wonder what has changed with the SRQ setup in the scope.  

Marty and I asked Tektronix several times for information about theSRQ setup protocol.  We always received the same answer, "Tektronix provides Labview VISA drivers".    It would be greatly appreciated if someone with one of these scopes, and EPICS, and the Labview driver, and a network traffic sniffer could compare the first few packets between the host and the scope.  Then perhaps we could fix the SRQ handling properly.


On Mar 19, 2010, at 4:34 AM, Benjamin Franksen wrote:

> On Wednesday 17 March 2010, Benjamin Franksen wrote:
>> On Wednesday 17 March 2010, Benjamin Franksen wrote:
>>> I'm trying to talk to the mentioned scope via asyn/stream and get
>>> mysterious crashes the first time the IOC tries to communicate over
>>> the link. Below is a trace of the IOC shell up to the crash. I am using
>>> the latest and greatest versions of everything except EPICS base:
>>> base-3.14.8.2, asyn-4.11a (supposedly the last version that works with
>>> base-3.14.8), StreamDevice-2- snapshot20081007. The crash happens on
>>> the latest ubuntu version as well as on a debian stable system. I
>>> should point out that with the exact same setup I can talk fine with
>>> e.g. a GPIB controller.
>> 
>> Ok I did dome more research. Götz suggested valgrind and indeed I got
>> interesting results:
>> 
>> (1) When I run the IOC under valgrind it doesn't crash, it even talks to
>> the device. Nice.
>> 
>> (2) Valgrind complains about StreamDevice doing "Mismatched free() /
>> delete / delete []". See below for a transcript.
>> 
>> My current theory is that these mismatched calls cause the memory free
>> list to become corrupted. Note that VXI-11 is based on RPC which heavily
>> uses malloc/free internally during runtime, so there is some probability
>> that a corrupted free list will lead to a crash inside the RPC library.
> 
> I had to abandon this theory. I managed to fix the mismatched delete calls 
> (so that valgrind no longer complained) but it did not fix anything. No 
> wonder, the calls where valgrind wants a 'delete[]' instead of just 'delete' 
> are for an array of chars. No destructor for type char, so this should not 
> matter at all and indeed it doesn't.
> 
> Still, IOC works under valgrind, but crashes without.
> 
> I tried electric-fence but this tool just makes any soft IOC crash almost 
> immediately.
> 
> Then I removed the call to vxiCreateIrqChannel from vxiConnectPort (in file 
> drvVxi11.c). This finally let the IOC run without crashing.
> 
> 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.
> 
> Cheers
> Ben
> 

-- 
Eric Norum
[email protected]






Replies:
RE: Tektronic Scope DPO7254 over VXI-11 crashes IOC Dalesio, Leo
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: asyn R4.12 and streamdevice R2.4 Mark Rivers
Next: RE: Tektronic Scope DPO7254 over VXI-11 crashes IOC Dalesio, Leo
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  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Bug in asyn and patch [was: Tektronic Scope DPO7254 over VXI-11crashes IOC] Mark Rivers
Next: RE: Tektronic Scope DPO7254 over VXI-11 crashes IOC Dalesio, Leo
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  2020  2021  2022  2023  2024 
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 ·