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  2010  2011  2012  <20132014  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  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: motorSimSupport segfaults
From: Martin Konrad <[email protected]>
To: [email protected]
Date: Wed, 26 Jun 2013 10:42:11 -0400
Hi Matthew,
I'm not too sure, but you might be trying to use non-asyn motor device support with an asyn based driver.

drvAsynMotorConfigure configures the Asyn motorSim driver. So the motor record needs to specify DTYP as asynMotor.
Hmm, you might be right about that. To clean things up I started with a fresh IOC and tried to followed the example from motorApp/MotorSimSrc. See the attached file for my configuration. Unfortunately the problem still occurs. There are no error messages on the IOC console before the IOC crashes. I also managed to get some more debugging symbols:

#!../../bin/linux-x86_64-debug/motorSim
## You may have to change motorSim to something else
## everywhere it appears in this file
#< envPaths
## Register all support components
dbLoadDatabase("../../dbd/motorSim.dbd",0,0)
motorSim_registerRecordDeviceDriver(pdbbase)
## Load record instances
dbLoadRecords("../../db/motorSimTest.db","DEVICE=test")
motorSimCreate( 0, 0, -22000, 42000, 10000, 1, 3, 5000 )
Creating motor simulator: card: 0, axis: 0, hi: 42000, low -22000, home: 10000, ncards: 1, naxis: 3
[New Thread 0x7ffff7fc8700 (LWP 15089)]
Created motor for card 0, signal 0 OK
Created motor for card 0, signal 1 OK
Created motor for card 0, signal 2 OK
iocInit()
[New Thread 0x7ffff7ec7700 (LWP 15090)]
Starting iocInit
############################################################################
## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$
## EPICS Base built Mar 13 2013
############################################################################
[New Thread 0x7ffff414e700 (LWP 15091)]
[New Thread 0x7fffeffff700 (LWP 15092)]
[New Thread 0x7fffefefe700 (LWP 15093)]
[New Thread 0x7fffefcfd700 (LWP 15094)]
[New Thread 0x7fffefafc700 (LWP 15095)]
[New Thread 0x7fffef8fb700 (LWP 15096)]
Set card 0, axis 0 high limit to 30000.000000

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6b0f930 in epicsRingPointerPush () from /usr/lib/libCom.so.3.14.12.3
(gdb) bt
#0 0x00007ffff6b0f930 in epicsRingPointerPush () from /usr/lib/libCom.so.3.14.12.3
#1  0x00007ffff629f5e7 in scanOnce () from /usr/lib/libdbIoc.so.3.14.12.3
#2 0x00007ffff7bd3224 in motor_callback (param=0x612220, nReasons=<optimized out>, reasons=<optimized out>) at ../devMotorSim.c:125 #3 0x00007ffff79c21d8 in paramCallCallback (params=0x60def0) at ../paramLib.c:268 #4 0x00007ffff7bd4c38 in motorAxisSetDouble (pAxis=0x613330, function=<optimized out>, value=30000) at ../drvMotorSim.c:370 #5 0x00007ffff79b528a in set_dial_highlimit (pmr=pmr@entry=0x612220, pdset=pdset@entry=0x7ffff7dd9200 <devMotorSim>) at ../motorRecord.cc:3882 #6 0x00007ffff79b9614 in init_record (arg=0x612220, pass=<optimized out>) at ../motorRecord.cc:634
#7  0x00007ffff737ac45 in iocBuild () from /usr/lib/libmiscIoc.so.3.14.12.3
#8  0x00007ffff737af99 in iocInit () from /usr/lib/libmiscIoc.so.3.14.12.3
#9  0x00007ffff6b1a824 in ?? () from /usr/lib/libCom.so.3.14.12.3
#10 0x00000000004035f2 in main ()

Any help is greatly appreciated,

Martin

diff --git a/configure/RELEASE b/configure/RELEASE
index 6934c90..96ffdb0 100644
--- a/configure/RELEASE
+++ b/configure/RELEASE
@@ -24,6 +24,9 @@ TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
 # If using the sequencer, point SNCSEQ at its top directory:
 #SNCSEQ=$(EPICS_BASE)/../modules/soft/seq
 
+ASYN=/home/marko/work/stripperFoilPlatter/motorTest/asyn4-18
+MOTOR=/home/marko/work/stripperFoilPlatter/motorTest/motorR6-8
+
 # EPICS_BASE usually appears last so other apps can override stuff:
 EPICS_BASE=/usr/lib/epics
 
diff --git a/iocBoot/iocmotorSim/st.cmd b/iocBoot/iocmotorSim/st.cmd
old mode 100644
new mode 100755
index 8d3c8a2..a8deec5
--- a/iocBoot/iocmotorSim/st.cmd
+++ b/iocBoot/iocmotorSim/st.cmd
@@ -10,7 +10,9 @@ dbLoadDatabase("../../dbd/motorSim.dbd",0,0)
 motorSim_registerRecordDeviceDriver(pdbbase) 
 
 ## Load record instances
-dbLoadRecords("../../db/motorSim.db","user=marko")
+dbLoadRecords("../../db/motorSimTest.db","DEVICE=test")
+
+motorSimCreate( 0, 0, -22000, 42000, 10000, 1, 3, 5000 )
 
 iocInit()
 
diff --git a/motorSimApp/Db/Makefile b/motorSimApp/Db/Makefile
index 983981d..d85667d 100644
--- a/motorSimApp/Db/Makefile
+++ b/motorSimApp/Db/Makefile
@@ -11,6 +11,7 @@ include $(TOP)/configure/CONFIG
 # Create and install (or just install) into <top>/db
 # databases, templates, substitutions like this
 #DB += xxx.db
+DB += motorSimTest.db
 
 #----------------------------------------------------
 # If <anyname>.db template is not named <anyname>*.template add
diff --git a/motorSimApp/Db/motorSimTest.db b/motorSimApp/Db/motorSimTest.db
new file mode 100644
index 0000000..ca8a698
--- /dev/null
+++ b/motorSimApp/Db/motorSimTest.db
@@ -0,0 +1,60 @@
+record(motor,"$(DEVICE):test0")
+{
+	field(DESC,"Motor Simulation test")
+	field(DTYP,"Motor Simulation")
+	field(VELO,"1")
+	field(VBAS,"0")
+	field(VMAX,"1")
+	field(HVEL,"1")
+	field(ACCL,"1")
+	field(BDST,"0.01")
+	field(BVEL,"0.1")
+	field(BACC,"0.1")
+	field(OUT,"#C0 S0 @motorSim")
+	field(MRES,"0.001")
+	field(PREC,"5")
+	field(EGU,"mm")
+	field(DHLM,"30")
+	field(DLLM,"-30")
+}
+
+record(motor,"$(DEVICE):test1")
+{
+	field(DESC,"Motor Simulation test")
+	field(DTYP,"Motor Simulation")
+	field(VELO,"1")
+	field(VBAS,"0")
+	field(VMAX,"1")
+	field(HVEL,"1")
+	field(ACCL,"1")
+	field(BDST,"0.01")
+	field(BVEL,"0.1")
+	field(BACC,"0.1")
+	field(OUT,"#C0 S1 @motorSim")
+	field(MRES,"0.001")
+	field(PREC,"5")
+	field(EGU,"mm")
+	field(DHLM,"30")
+	field(DLLM,"-30")
+}
+
+record(motor,"$(DEVICE):test2")
+{
+	field(DESC,"Motor Simulation test")
+	field(DTYP,"Motor Simulation")
+	field(VELO,"1")
+	field(VBAS,"0")
+	field(VMAX,"1")
+	field(HVEL,"1")
+	field(ACCL,"1")
+	field(BDST,"0.01")
+	field(BVEL,"0.1")
+	field(BACC,"0.1")
+	field(OUT,"#C0 S2 @motorSim")
+	field(MRES,"0.001")
+	field(PREC,"5")
+	field(EGU,"mm")
+	field(DHLM,"30")
+	field(DLLM,"-30")
+}
+
diff --git a/motorSimApp/src/Makefile b/motorSimApp/src/Makefile
index aac7167..c025f5c 100644
--- a/motorSimApp/src/Makefile
+++ b/motorSimApp/src/Makefile
@@ -17,9 +17,17 @@ motorSim_DBD += base.dbd
 
 # Include dbd files from all support applications:
 #motorSim_DBD += xxx.dbd
+motorSim_DBD += motorSupport.dbd
+motorSim_DBD += motorRecord.dbd
+motorSim_DBD += motorSimSupport.dbd
+
 
 # Add all the support libraries needed by this IOC
 #motorSim_LIBS += xxx
+motorSim_LIBS += softMotor
+motorSim_LIBS += motorSimSupport
+motorSim_LIBS += motor
+
 
 # motorSim_registerRecordDeviceDriver.cpp derives from motorSim.dbd
 motorSim_SRCS += motorSim_registerRecordDeviceDriver.cpp

Replies:
Re: motorSimSupport segfaults Ron Sluiter
Re: motorSimSupport segfaults Pearson, Matthew R.
References:
motorSimSupport segfaults Konrad, Martin
Re: motorSimSupport segfaults Pearson, Matthew R.

Navigate by Date:
Prev: caQtDM V3.1.1 Mezger Anton Christian
Next: Re: motorSimSupport segfaults Ron Sluiter
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: motorSimSupport segfaults Pearson, Matthew R.
Next: Re: motorSimSupport segfaults Ron Sluiter
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·