EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  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  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: asynRecord SEGFAULT?
From: Heinrich du Toit <[email protected]>
To: Mark Rivers <[email protected]>, TechTalk EPICS <[email protected]>
Date: Tue, 19 Jun 2007 15:20:20 +0200
a piece of my code:

  result = pasynManager->registerPort("port0",ASYN_MULTIDEVICE|
ASYN_CANBLOCK,1,0,10);
  if (result != 0)
    printf("result = %d\n",result);
  result = pasynManager->registerInterface("port0", &myadevInterface0);
  if (result != 0)
    printf("result = %d\n",result);
  result = pasynManager->registerInterface("port0", &myadevInterface1);
  if (result != 0)
    printf("result = %d\n",result);


the first interface is asynCommon
the second one is asynInt32
all functions in both interfaces are defined, although they don't really
do much. Accept the connect/disconnect calls the connect/disconnect
exceptions.

should I load some other interface to get asynRecord to work?

But since it seems to be some locking mechanism failing, I don't
understand how this can be my code in the first place? :) but it
probably is.


On Tue, 2007-06-19 at 07:34 -0500, Mark Rivers wrote:
> The PORT field is set to Port0.  Is that the name of your asyn port?  It should not matter if it is an invalid port name, but you could try setting PORT to the name of your port, and see if it makes a difference.
>  
> Mark
>  
> 
> ________________________________
> 
> From: Heinrich du Toit [mailto:[email protected]]
> Sent: Tue 6/19/2007 7:06 AM
> To: Mark Rivers
> Subject: RE: asynRecord SEGFAULT?
> 
> 
> 
> 
> ok?
> 
> epics>
>  dbl
> heinrich:inputa
> heinrich:inputf
> asynA
> epics> dbpr "asynA",5
> ACKS: NO_ALARM      ACKT: YES           ACMD: None          ADDR:
> 6            
> AINP:               AOUT:               AQR: 0
> ASG:               
> ASP: 0x00000000     AUCT: noAutoConnect BAUD: Unknown       BINP:
> 0            
> BKPT: 0x00          BOUT: 0             CNCT: Disconnect    DBIT:
> Unknown      
> DESC:               DISA: 0             DISP: 0             DISS:
> NO_ALARM     
> DISV: 1             DPVT: 0x00000000    DRVINFO:            DSET:
> 0x00000000   
> DTYP: asynRecordDevice                  ENBL: Disable       EOMR:
> None         
> ERRS: 0x00000000    EVNT: 0             F64INP: 0           F64IV:
> 0           
> F64OUT: 0           FCTL: Unknown       FLNK:CONSTANT 0     GPIBIV:
> 0          
> I32INP: 0           I32IV: 0            I32OUT: 0
> IEOS:              
> IFACE: asynOctet    IFMT: ASCII         IMAX: 0             IPTR:
> 0x00000000   
> LCNT: 0             LSET: 0x00000000    MCTL: Unknown      
> MLIS: 0x000000000000000000000000        MLOK: 0x00000000    NAME:
> asynA        
> NAWT: 0             NORD: 0             NOWT: 80            NRRD:
> 0            
> NSEV: NO_ALARM      NSTA: NO_ALARM      OCTETIV: 0
> OEOS:              
> OFMT: ASCII         OMAX: 0             OPTIONIV: 0         OPTR:
> 0x00000000   
> PACT: 0             PCNCT: Disconnect   PHAS: 0             PINI:
> NO           
> PORT: Port0         PPN: 0x00000000     PPNR: 0x00000000    PRIO:
> LOW          
> PROC: 0             PRTY: Unknown       PUTF: 0             RDES:
> 0x00000000   
> REASON: 0           RPRO: 0             RSET: 0x00000000    SBIT:
> Unknown      
> SCAN: Passive       SDIS:CONSTANT       SEVR: INVALID
> SOCK:              
> SPR: 0              SPVT: 0x00000000    STAT: UDF           TB0:
> Off           
> TB1: Off            TB2: Off            TB3: Off            TB4:
> Off           
> TFIL:               TIB0: Off           TIB1: Off           TIB2:
> Off          
> TIME: <undefined>   TINP:               TIOM: 0             TMOD:
> Write/Read   
> TMOT: 1             TMSK: 0             TPRO: 0             TSE:
> 0             
> TSEL:CONSTANT       TSIZ: 0             UCMD: None          UDF:
> 1             
> UI32INP: 0          UI32IV: 0           UI32MASK:
> 4294967295                   
> UI32OUT: 0          VAL:               
> 
> 
> 
> 
> 
> 
> 
> On Tue, 2007-06-19 at 06:43 -0500, Mark Rivers wrote:
> > Before running medm on the asyn record, at the ioc prompt you could do:
> > 
> > dbpr "myAsynRecord",5
> > 
> > That might help find the problem.
> > 
> > Mark
> > 
> >
> > ________________________________
> >
> > From: [email protected] on behalf of Heinrich du Toit
> > Sent: Tue 6/19/2007 5:44 AM
> > To: TechTalk EPICS
> > Subject: asynRecord SEGFAULT?
> >
> >
> >
> > Hi
> >
> > I've started experimenting with asyn.
> >
> > Now I've created the routines for a driver with Common and devInt32
> > interfaces.
> >
> > When I connected my own record (ai) 2 this to read it works fine.
> >
> > Then I tried connecting a asynRecord to this.
> > It starts up fine.
> >
> > But when I run medm to see this record the IOC segfaults.
> >
> > location: base/src/db/dbLock.c line 242 : plockSet =
> > plockRecord->plockSet
> > because plockSet = null
> > and this is because precord->lst = null
> > And that must be the lockRecord or something.
> >
> > I don't understand, the stack trace doesn't even run through asyn or my
> > own code.
> >
> > I have no idea where to look for the fault :(
> >
> > -Heinrich
> >
> >
> >
> 
> 
> 


Replies:
RE: asynRecord SEGFAULT? Mark Rivers
References:
asynRecord SEGFAULT? Heinrich du Toit
RE: asynRecord SEGFAULT? Mark Rivers

Navigate by Date:
Prev: RE: asynRecord SEGFAULT? Mark Rivers
Next: RE: asynRecord SEGFAULT? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: asynRecord SEGFAULT? Mark Rivers
Next: RE: asynRecord SEGFAULT? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·