-----Original Message-----
From: Victor F E Pucknell [mailto:[email protected]]
Sent: 16 January 2008 15:01
To: Duggan, AJ (Andrew)
Cc: Owens, PH (Peter); Letts, SC (Simon)
Subject: EPICS problem
Here is a simple test using the EPICS caget
Normally it is in a loop using caget every 2 seconds.
If you "quit" the EPICS server then I get a serious failure and the
test program is lost somewhere in the ca library
Here is the output from the test program
#############
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
CA.Client.Exception...............................................
Warning: "Virtual circuit disconnect"
Context: "nndhcp069.dl.ac.uk:5064"
Source File: ../cac.cpp line 1126
Current Time: Wed Jan 16 2008 14:46:01.574167550
..................................................................
CA.Client.Exception...............................................
Warning: "Virtual circuit disconnect"
Context: "op=0, channel=MEIS-B-A-201:STA, type=DBR_SHORT, count=1,
ctx="nndhcp069.dl.ac.uk:5064""
Source File: ../getCopy.cpp line 86
Current Time: Wed Jan 16 2008 14:46:01.574311751
..................................................................
ca_pend_io failed User specified timeout on IO operation expired
ca_get failed Virtual circuit disconnect
EPICS server failure - resetting
A call to "assert (_pTargetMutex == & mutexToVerify)" failed in
../../../include/epicsGuard.h line 84.
EPICS Release EPICS R3.14.9-3.14.9 $R3-14-9$ $2007/02/05 16:31:45$.
Current time Wed Jan 16 2008 14:46:08.582331945.
Please E-mail this message to Jeff Hill [email protected] or to
[email protected]
Calling epicsThreadSuspendSelf()
#####################
However if kill the EPICS server using Control+C then the application
does seem to recover and resume once I restart the EPICS server.
##################
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
CA.Client.Exception...............................................
Warning: "Virtual circuit disconnect"
Context: "nndhcp069.dl.ac.uk:5064"
Source File: ../cac.cpp line 1126
Current Time: Wed Jan 16 2008 14:50:41.049109570
..................................................................
CA.Client.Exception...............................................
Warning: "Virtual circuit disconnect"
Context: "op=0, channel=MEIS-B-A-201:STA, type=DBR_SHORT, count=1,
ctx="nndhcp069.dl.ac.uk:5064""
Source File: ../getCopy.cpp line 86
Current Time: Wed Jan 16 2008 14:50:41.049255811
..................................................................
ca_pend_io failed User specified timeout on IO operation expired
ca_get failed Virtual circuit disconnect
EPICS server failure - resetting
Attempting start....
calling ca_context_create
calling ca_create_channel
calling ca_pend_io
ca_pend_io failed User specified timeout on IO operation expired
Attempting start....
calling ca_context_create
calling ca_create_channel
calling ca_pend_io
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
ca_get returned with rc=0x1
ca_pend_io returned with rc=0x1: value=0x0
######################
This was not an exhaustive trial. I tried each only a couple of times.
However the asset failure and the suspend is typical of what we see.
Vic
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include "cadef.h"
#define EPICS_TIMEOUT 5.0
int main(int argc, char *argv[])
{
char PVN[17] = "MEIS-B-A-201:STA\0";
int rc;
chid CID;
double timeout = EPICS_TIMEOUT;
unsigned short value;
START:
printf("Attempting start....\n");
sleep(5);
printf("calling ca_context_create\n");
rc = ca_context_create(ca_disable_preemptive_callback);
if (rc != ECA_NORMAL) {
printf("ca_context_create failed %s\n", ca_message(rc));
goto START;
}
printf("calling ca_create_channel\n");
rc = ca_create_channel(&PVN[0], NULL, NULL, 10, &CID);
if (rc != ECA_NORMAL) {
printf("ca_create_channel failed %s\n", ca_message(rc));
(void) ca_context_destroy();
goto START;
}
printf("calling ca_pend_io\n");
rc = ca_pend_io(timeout);
if (rc != ECA_NORMAL) {
printf("ca_pend_io failed %s\n", ca_message(rc));
goto START;
}
for(;;) {
rc = ca_get(DBR_SHORT, CID, &value);
if (rc != ECA_NORMAL) {
printf("ca_get failed %s\n", ca_message(rc));
// if (CA_EXTRACT_SEVERITY(rc) >= CA_K_SEVERE) {
printf("EPICS server failure - resetting\n");
(void) ca_context_destroy();
// }
goto START;
}
printf("ca_get returned with rc=0x%x\n", rc);
rc = ca_pend_io(timeout);
if (rc != ECA_NORMAL) {
printf("ca_pend_io failed %s\n", ca_message(rc));
} else {
printf("ca_pend_io returned with rc=0x%x: value=0x%x\n", rc, value);
}
sleep(2);
}
exit(0);
}
- Replies:
- Re: CA connection management problem Andrew Johnson
- RE: CA connection management problem Jeff Hill
- Navigate by Date:
- Prev:
Re: asyn file interface Maren Purves
- Next:
Re: CA connection management problem Andrew Johnson
- 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: asyn file interface Maren Purves
- Next:
Re: CA connection management problem Andrew Johnson
- 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
|