Subject: |
IOC crashes with segmentation fault |
From: |
"Szalata, Zenon M." <[email protected]> |
To: |
"EPICS tech-talk" <[email protected]> |
Date: |
Wed, 17 Oct 2007 11:09:19 -0700 |
I have a soft IOC which I evolved from myExample template. It uses a suport module which is built from asyn devGpib template. Initially, the only device IO done in the application was via asynRecords, all other records were of "Soft Channel" or <nil> type. The application worked fine.
Today I added the following record:
record( stringin, "$(P)IDN"){
field( DESC, "To keep the connection alive")
# field( DTYP, "ks3988")
# field( SCAN, "5 second")
# field( INP, "#L$(L) A0, @0")
}
To the devxxxx.db file and
device( stringin, GPIB_IO, devSiKS3988, "ks3988")
To the devxxxx.dbd file and
#define DSET_SI devSiKS3988
....
static char sform[]="%39[^\r\n]";
static struct gpibCmd gpibCmds[]={
{&DSET_SI,GPIBREAD,IB_Q_LOW,"*IDN?",sform,0,128,NULL,0,0,NULL,NULL,NULL},
};
To the devxxxx.c file. The module compiles ok and the application compiles and links ok too. With the line field( DTYP, "ks3988") commented out the application does not crash. As soon as I uncomment the line and remake everything, the application crashes with Segmentation fault. Here is what I see with gdb:
------------------------------
#!../../bin/linux-x86/ksTest
< envPaths
epicsEnvSet(ARCH,"linux-x86")
epicsEnvSet(IOC,"iocksTest")
epicsEnvSet(TOP,"/afs/slac.stanford.edu/g/esa/ilc/epics/iocTop/ksTest")
epicsEnvSet(ASYN,"/afs/slac/g/esa/ilc/epics/modules/asyn/4-8")
epicsEnvSet(GENSUB,"/afs/slac/g/esa/ilc/epics/modules/genSub/1-6")
epicsEnvSet(KS3988,"/afs/slac/g/esa/ilc/epics/modules/ks3988")
epicsEnvSet(EPICS_BASE,"/afs/slac/g/esa/ilc/epics/base/R3-14-9-ilc1")
cd /afs/slac.stanford.edu/g/esa/ilc/epics/iocTop/ksTest
## Register all support components
dbLoadDatabase("dbd/ksTest.dbd")
ksTest_registerRecordDeviceDriver(pdbbase)
vxi11Configure( "L0","134.79.64.25",0,0.0,"gpib0",0,0)
## Load record instances
dbLoadRecords( "db/dbExample1.db","P=KS:")
dbLoadRecords( "db/devKS3988.db","P=KS:,Q=AIO,W=AWRT,L=0,A=12")
dbLoadRecords( "db/asynIO.db","P=KS:,R=AIO,PORT=L0,ADDR=12,IMAX=100,OMAX=100")
dbLoadRecords( "db/asynWrt.db","P=KS:,R=AWRT,PORT=L0,ADDR=12,IMAX=100,OMAX=100")
cd /afs/slac.stanford.edu/g/esa/ilc/epics/iocTop/ksTest/iocBoot/iocksTest
iocInit()
Starting iocInit
############################################################################
## EPICS R3.14.9-lcls1 $R3-14-9$ $2007/02/05 16:31:45$
## EPICS Base built Oct 2 2007
############################################################################
Segmentation fault (core dumped)
zms@esaux1 $ gdb ../../bin/linux-x86/ksTest core.14360
GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db lib
rary "/lib/tls/libthread_db.so.1".
Core was generated by `../../bin/linux-x86/ksTest st.cmd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /afs/slac.stanford.edu/g/esa/ilc/epics/modules/ks3988/lib/l
inux-x86/libdevKS3988.so...done.
.... Omitted many lines here
#0 0x003cb393 in initRecord (precord=0x9759168, plink=0x97592e4)
at ../../asyn/devGpib/devSupportGpib.c:230
230 if (pgpibCmd->dset != (gDset *) precord->dset) {
(gdb) bt
#0 0x003cb393 in initRecord (precord=0x9759168, plink=0x97592e4)
at ../../asyn/devGpib/devSupportGpib.c:230
#1 0x003c98f6 in devGpib_initSi (psi=0x9759168)
at ../../asyn/devGpib/devCommonGpib.c:941
#2 0x0073f488 in init_record (pstringin=0x9759168, pass=1)
at ../stringinRecord.c:122
#3 0x0051c717 in iocInit () at ../iocInit.c:352
#4 0x009875be in iocInitCallFunc (args=0x96fa158) at ../dbAccessRegister.c:69
#5 0x009895d1 in iocshBody (pathname=0xbff715b9 "st.cmd", commandLine=0x0)
at ../iocsh.cpp:743
#6 0x0804af62 in main (argc=2, argv=0x698ad30) at ../ksTestMain.cpp:17
Current language: auto; currently c
(gdb)
-------------------------------
I am working with EPICS R3.14.9 and asyn 4-8.
Any idea what I am doing wrong?
Thanks in advance,
Zen
- Navigate by Date:
- Prev:
Re: fedora core 7 medm (was >> Re: MEDM compile - update :) Noboru Yamamoto
- Next:
Re: Display array of number in edm John Sinclair
- 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: Display array of number in edm John Sinclair
- Next:
Visibility settings in EDM Dave Reid
- 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
|