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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Incompatibility of pyepics and pvaPy 4.0.0 on Windows |
From: | Freddie Akeroyd - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Veseli, Sinisa" <sveseli at anl.gov>, "Johnson, Andrew N." <anj at anl.gov>, Matt Newville <newville at cars.uchicago.edu> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "De Carlo, Francesco" <decarlo at anl.gov>, "Nikitin, Viktor" <vnikitin at anl.gov> |
Date: | Sat, 11 Sep 2021 13:02:29 +0000 |
Hi,
Applying the change at
https://github.com/epics-base/epics-base/pull/200/files fixes the issue on my machine, does it also work for you? Regards, Freddie From: Veseli, Sinisa <sveseli at anl.gov>
Hi, I have also reproduced the problem with Matt's script. Unlike Matt, however, I see the problem when "import pvaccess" is commented out, and PYEPICS_LIBCA is set to point to ca.dll
from pvaccess. Sinisa -- Siniša Veseli Scientific Software Engineering & Data Management Advanced Photon Source Argonne National Laboratory (630)252-9182 From: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk> Hi, I can reproduce the error on my windows machine with your script. I rebuilt 7.0.6 with debug symbols and I get: Exception thrown: read access violation. __imp_TlsGetValue(...) returned nullptr. > [Inline Frame] Com.dll!osdThreadGetTimer(...) Line 814 C Com.dll!epicsThreadSleep(double seconds) Line 847 C ca.dll!ca_client_context::pendEvent(const double & timeout) Line 586 C++ ca.dll!ca_pend_event(double timeout) Line 474 C++ [External Code]
_ctypes.pyd!_call_function_pointer(int flags, int(*)() pProc, void * * avalues, _ffi_type * * atypes, _ffi_type * restype, void * resmem, int
argcount) Line 874 C _ctypes.pyd!_ctypes_callproc(int(*)() pProc, _object * argtuple, IUnknown * pIunk, _GUID * iid, int flags, _object * argtypes, _object * restype,
_object * checker) Line 1214 C In 7.0.6 the wait functions were changed to use waitable timers for higher accuracy, the timer is allocated at thread creation and stored in thread local storage.
It looks like there has been an error retrieving this timer from TLS. I can look at it in more detail. Regards, Freddie
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Johnson, Andrew N. via Tech-talk Hi Matt, Thanks for working on this; can script be made to fail on Linux too, out of interest? Unfortunately neither Sinisa nor I have local access to a Windows system, although there is one that we can remote into, so debugging this stuff isn’t
that easy for us. Having your script to test should help though if it fails for us too. I had a chat with Sinisa earlier. He’s currently working on a possible way to resolve the problem by building EPICS Base without creating any shared libraries, then linking the loadable library for pvaPy using the non-shared library versions,
so the result would be that the pvaPy library would be completely self-contained. It would have copies of the libca and libcom routines embedded inside it, but Python would have no way to get to those symbols as they wouldn’t be exported. It occurs to me now
that there might be some issues with name decorations when doing the final linke, we’ll have to see. One thing you maybe could try would be to force (recompile?) pyepics to use the same copies of libca and libcom that pvaPy was built against. You want to be sure that both sets of bindings are calling the exact same set of DLLs. Mark said
yesterday that wasn’t able to get pyepics to work with the DLLs that came with pvaccess, was he using the prepackaged versions? Can you reproduce that? - Andrew
-- Complexity comes for free, simplicity you have to work for. This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify
the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own
virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. |