EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Entry 136 in Mantis
From: "Jeff Hill" <[email protected]>
To: "'Liyu, Andrei'" <[email protected]>, <[email protected]>
Date: Tue, 28 Sep 2004 11:02:43 -0600
Hello Liyu,

> I started this program 3 times. After that IOC crashed. 
> Did anybody similar tests?

The attached test code does not reproduce your IOC crash with the latest
version of R3.14. What version of EPICS were you running in the IOC that
crashed? I see that entry 100 in Mantis (discovered by Pam Gurd) and fixed
in R3.14.7 is possibly related to what you are observing.

> of course, IOC lost some memory. (VxStat shows that the biggest 
> memory pool became less)

What was the size of the maximum free block in the IOC (use memShow on a
vxWorks IOC)? Of course, an IOC should not crash if it runs low on memory.
Nevertheless, it's helpful to identify differences between your situation
and mine so that I can reproduce, and thereby arrive at a fix for, your
problem.

> I wrote simple cliet that open 10000 channels to the same PV. 
> I remark that I just opened and didn't do any get/read/subscribe. 
> Then program closes channels and destroys CA
> IOC CPU loading became 33% (It was ~13-15%).

Programs that report CPU consumption typically use some form of averaging to
smooth out jitter in their CPU consumption estimate. I suspect that you see
some latent impact in the CPU load estimate resulting from the additional
CPU load introduced by your setup for 10,000 channels. This impact should
damp out of the CPU consumption estimate over time. That's what I see here.
If your results are different, then we will need to work together so that I
can reproduce your situation here.

Jeff

/*caExample.c*/
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "epicsThread.h"
#include "cadef.h"

static void putCallBack ( struct event_handler_args args )
{
}

#define nChan 10000u

int main(int argc,char **argv)
{
    double  data;
    chid    mychid[nChan];
    unsigned i;

    if(argc != 2) {
        fprintf(stderr,"usage: caExample pvname\n");
        exit(1);
    }

 
SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create"
);

    for ( i = 0; i < nChan; i++ ) {
 
SEVCHK(ca_create_channel(argv[1],NULL,NULL,10,&mychid[i]),"ca_create_cha
nnel failure");
    }

    SEVCHK(ca_pend_io(5.0),"ca_pend_io failure");

    for ( i = 0; i < nChan; i++ ) {
        SEVCHK(ca_clear_channel(mychid[i]),"ca_clear_channel failure");
    }

    ca_context_destroy();

    return(0);
}

Jeff
__________________________________________________________
Jeffrey O. Hill               Mail         [email protected]
LANL MS H820                  Voice        505 665 1831
Los Alamos NM 87545 USA       Fax          505 665 5107





Navigate by Date:
Prev: RE: explicit dynamic linking and ca.dll . CA bug? Jeff Hill
Next: Forcing a record to be processed J. Frederick Bartlett
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How to add gpib device support Eric Norum
Next: Forcing a record to be processed J. Frederick Bartlett
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·