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  <20112012  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  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution?
From: Jay Steele <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 16 Feb 2011 15:07:25 -0800

Hi Mark and Jeff

    Are you guys running Windows XP? My results on my Windows XP computer are different than yours for some reason. I measure about 5 seconds to run caget and caput. Here’s more information.

 

1.       No significant delay using MEDM GUI CA client on the same Windows XP computer to get or modify PV values on VxWorks IOC.

2.       For caget and caput, 5 second delay occurs inside function epicsThreadPrivateGet called from ca_context_destroy to access PV records on VxWorks IOC.

 

     I could speculate that there is something wrong with my EPICS makefiles and I’m not using the correct option somewhere for the cygwin build, but I get the similar results (delay ~5 seconds) with the pre-compiled Win32 Extension caget function. Could there be some Windows XP environmental variable or setting for handling threads that I need to set?

 

   When I add some print statements to track where the cygwin caget code is stalling, the code stalls for the 5 seconds at the last pthread_getspecific call inside epicsThreadPrivateGet. For some reason, the initial call to pthread_getspecific within epicsThreadPrivateGet function launches  a succession of calls to epicsThreadPrivateGet. I cannot find where this recursive logic is. Here’s the output. I get the same output when I run caget to access a PV record field from the softIOC running on the same Windows computer, but without the ~5 second delay.

 

Epics/base/src/ca/access.cpp - ca_context_destroy(), calling epicsThreadPrivateGet with id = 5382720

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5382720, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5380552, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5380552, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5380552, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5380552, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

 

wait ~5 seconds . . .

 

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5380552, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

Epics/base/src/ca/access.cpp - ca_context_destroy(), calling epicsThreadPrivateSet

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), id=5380552, calling assert

Epics/base/src/libCom/osi/os/posix/osdThread.c - epicsThreadPrivateGet(), calling pthread_getspecific

 

Cheers,

Jay Steele

 

 

From: Jeff Hill [mailto:[email protected]]
Sent: Wednesday, February 16, 2011 2:15 PM
To: Jay Steele; [email protected]
Subject: RE: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution?

 

Hi Jay,

 

I don’t see this either, but I am using only win32-x86 and win32-x86-mingw on my windows machines. The cygwin posix emulation adds some additional layers around windows sockets to obtain posix compatibility.

 

Ø  the majority of the execution time (4-5 seconds) seems to be spent running the ca_context_destroy function

 

The ca_context_destroy will wait for the tcp circuit shutdown handshake to finish before returning. You can watch this with netstat or in GUIs like, for example on windows, tcpview. The GUI might update the tcp state machine changes more rapidly as they are occurring.

 

Jeff

______________________________________________________
Jeffrey O. Hill           Email       
[email protected]
LANL MS H820              Voice        505 665 1831
Los Alamos NM 87545 USA   FAX          505 665 5107

 

Message content: TSPA

 

With sufficient thrust, pigs fly just fine. However, this is

not necessarily a good idea. It is hard to be sure where they

are going to land, and it could be dangerous sitting under them

as they fly overhead. -- RFC 1925

 

From: [email protected] [mailto:[email protected]] On Behalf Of Jay Steele
Sent: Wednesday, February 16, 2011 1:00 PM
To: [email protected]
Subject: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution?

 

Hi EPICS folks,

      I’m running caget and caput utility functions from cygwin and DOS on a Windows XP system to get and put data to a VxWorks IOC on the same subnet. I would like to know if there is some option to help speed up the execution of these utility functions. For both sets of utility functions, the majority of the execution time (4-5 seconds) seems to be spent running the ca_context_destroy function at the end. I don’t see this delay when running caget and caput functions to get and put data to a Soft IOC running on the same Windows XP computer. I don’t understand why there is such a delay just to clean up at the end.

 

     I’m using epics base v3-14-11 for cygwin and EPICS WIN32 Extensions Version 1.40 (Build 40) for DOS.

 

Thanks,

Jay Steele

Xradia Corporation

 


The information in this email, including any attachments, is confidential and intended only for the recipient(s) listed. Any use of this email for any other purpose is prohibited. If you have received this email in error, please notify me immediately by reply email, delete this email, and do not disclose its contents to anyone.



The information in this email, including any attachments, is confidential and intended only for the recipient(s) listed. Any use of this email for any other purpose is prohibited. If you have received this email in error, please notify me immediately by reply email, delete this email, and do not disclose its contents to anyone.

Replies:
RE: cygwin and DOS caget, caput running slow at end due toca_context_destroy(), option to speed up execution? Mark Rivers
RE: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution? Jeff Hill
References:
cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution? Jay Steele
RE: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution? Jeff Hill

Navigate by Date:
Prev: RE: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution? Jeff Hill
Next: RE: cygwin and DOS caget, caput running slow at end due toca_context_destroy(), option to speed up execution? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: cygwin and DOS caget, caput running slow at end due to ca_context_destroy(), option to speed up execution? Jeff Hill
Next: RE: cygwin and DOS caget, caput running slow at end due toca_context_destroy(), option to speed up execution? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·