> I am not sure why this problem had not shown up earlier,
> and why it would matter what version of asyn you were using.
I now see why asyn R4-30 exposed the problem. asynPortDriver::doCallbacksGenericPointer() did not try to access the parameter list prior to asyn R4-30. In R4-30 it now calls getParamStatus(), getParamAlarmStatus(), and getParamAlarmSeverity(), in order to set the appropriate pasynUser fields for callbacks to device support. Accessing the parameter library exposed the fact that an invalid address was being passed to doCallbacksGenericPointer(), due to the bug in NDPluginTimeSeries.
Mark
________________________________
From: Mark Rivers
Sent: Wednesday, September 07, 2016 8:33 AM
To: Hinxx; EPICS Tech-Talk
Subject: RE: asyn4-30 problem
Hi Hinko,
Thanks for finding that problem. The problem is not in asyn, it is in NDPluginTimeSeries.cpp. It needs to set the maxAddr parameter to the NDPluginDriver constructor to maxSignals+1, not maxSignals. This is because it does callbacks with 2-D NDArrays on address maxSignals. In the example IOC maxSignals=8, so it was trying to access parameter table 8, which did not exist and thus the crash. I am not sure why this problem had not shown up earlier, and why it would matter what version of asyn you were using.
I have fixed the problem and pushed the fix to the master branch at https://github.com/areaDetector/ADCore<redir.aspx?REF=S54TVmNGG_HRPvVEyJno3qj-K8kaXvQ6LzotK-CcWsCPPxiGKdfTCAFodHRwczovL2dpdGh1Yi5jb20vYXJlYURldGVjdG9yL0FEQ29yZQ..>.
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Hinxx [[email protected]]
Sent: Wednesday, September 07, 2016 4:01 AM
To: EPICS Tech-Talk
Subject: asyn4-30 problem
Hi Mark,
I'm trying out the asyn4-30 with latest areaDetector code in GIT.
When clicking on the 'Erase/Start' on the Timeseries panel of ADCSimulation Detector I'm getting a segfault from asyn code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff6e1ed700 (LWP 26572)]
0x00007ffff64738a7 in paramList::getStatus (this=0x0, index=38, status=0x7fff6e1ec96c) at ../../asyn/asynPortDriver/asynPortDriver.cpp:335
335 if (index < 0 || index >= this->nVals) return asynParamBadIndex;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-78.el7.x86_64 hdf5-1.8.12-7.el7.x86_64 jbigkit-libs-2.0-11.el7.x86_64 libgcc-4.8.3-9.el7.x86_64 libjpeg-turbo-1.2.90-5.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.3-9.el7.x86_64 libtiff-4.0.3-14.el7.x86_64 libusb-0.1.4-3.el7.x86_64 libusbx-1.0.20-5.el7.centos.x86_64 libxml2-2.9.1-5.el7_1.2.x86_64 ncurses-libs-5.9-13.20130511.el7.x86_64 pcre-8.32-14.el7.x86_64 readline-6.2-9.el7.x86_64 systemd-libs-208-20.el7_1.6.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
(gdb) bt
#0 0x00007ffff64738a7 in paramList::getStatus (this=0x0, index=38, status=0x7fff6e1ec96c) at ../../asyn/asynPortDriver/asynPortDriver.cpp:335
#1 0x00007ffff6475064 in asynPortDriver::getParamStatus (this=0x74c320, list=8, index=38, paramStatus=0x7fff6e1ec96c) at ../../asyn/asynPortDriver/asynPortDriver.cpp:954
#2 0x00007ffff64789ee in asynPortDriver::doCallbacksGenericPointer (this=0x74c320, genericPointer=0x7fffb0000990, reason=38, address=8) at ../../asyn/asynPortDriver/asynPortDriver.cpp:2605
#3 0x00007ffff7755232 in NDPluginTimeSeries::doTimeSeriesCallbacks (this=0x74c320) at ../NDPluginTimeSeries.cpp:366
#4 0x00007ffff77556f8 in NDPluginTimeSeries::writeInt32 (this=0x74c320, pasynUser=0x1385178, value=1) at ../NDPluginTimeSeries.cpp:472
#5 0x00007ffff64762b6 in writeInt32 (drvPvt=0x74c320, pasynUser=0x1385178, value=1) at ../../asyn/asynPortDriver/asynPortDriver.cpp:1579
#6 0x00007ffff6480812 in processCallbackOutput (pasynUser=0x1385178) at ../../asyn/devEpics/devAsynInt32.c:489
#7 0x00007ffff6450334 in queueRequest (pasynUser=0x1385178, priority=asynQueuePriorityLow, timeout=0) at ../../asyn/asynDriver/asynManager.c:1487
#8 0x00007ffff64827ef in processBo (pr=0x78fdc0) at ../../asyn/devEpics/devAsynInt32.c:1065
#9 0x00007ffff620f7ec in writeValue (prec=0x78fdc0) at ../boRecord.c:395
#10 0x00007ffff620f06c in process (prec=0x78fdc0) at ../boRecord.c:226
#11 0x00007ffff558b751 in dbProcess (precord=0x78fdc0) at ../dbAccess.c:641
#12 0x00007ffff559d60c in scanList (psl=0x18faab0) at ../dbScan.c:711
#13 0x00007ffff559cf4a in periodicTask (arg=0x18faab0) at ../dbScan.c:568
#14 0x00007ffff4c9c2a6 in start_routine (arg=0x1b30380) at ../../../src/libCom/osi/os/posix/osdThread.c:389
#15 0x00007ffff2a1bdf5 in start_thread () from /usr/lib64/libpthread.so.0
#16 0x00007ffff31301ad in clone () from /usr/lib64/libc.so.6
Does not happen with asyn4-27.
Cheers,
Hinko
- Replies:
- Re: asyn4-30 problem Hinxx
- References:
- asyn4-30 problem Hinxx
- RE: asyn4-30 problem Mark Rivers
- Navigate by Date:
- Prev:
RE: asyn4-30 problem Mark Rivers
- Next:
Re: asyn4-30 problem Hinxx
- 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: asyn4-30 problem Mark Rivers
- Next:
Re: asyn4-30 problem Hinxx
- 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
|