The thread it is waiting on seems to be stuck in "common_end_thread" in
ucrtbase, calling ca_context_destroy() from main() with no DLL involved
works correctly.
There are various guidelines on what you should and should not do from inside a dllMain() function
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices
Unfortunately using a file level static class does not help as the same rules would appear to apply
"If your DLL is linked with the C run-time library (CRT), the entry
point provided by the CRT calls the constructors and destructors for
global and static C++ objects. Therefore, these restrictions for DllMain
also apply to constructors and destructors and any code that is called
from them."
(from https://docs.microsoft.com/en-us/windows/win32/dlls/dllmain )
--
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1879532
Title:
Can't completely shutdown libCa and libCom
Status in EPICS Base:
Confirmed
Bug description:
Most recently, Carsten Winkler reported in https://epics.anl.gov/tech-
talk/2020/msg00946.php
For a project I need to load and unload the Channel Access context in a
shared library. Loading is no problem but unloading. It always fails
during ca_context_destroy() function.
This problem has been reported and discussed previously, see
https://epics.anl.gov/tech-talk/2017/msg00371.php and
https://epics.anl.gov/tech-talk/2004/msg00743.php thus it is a known
issue which would probably require significant work to fix.
This bug report is a place-holder for any work towards making it
possible to completely shut down all libCom background threads and
releasing the resources allocated by those subsystems.
To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1879532/+subscriptions
- References:
- [Bug 1879532] [NEW] Can't completely shutdown libCa and libCom Andrew Johnson via Core-talk
- Navigate by Date:
- Prev:
Build failed in Jenkins: EPICS-3.14 #673 Jenkins EPICS PSI via Core-talk
- Next:
Jenkins build became unstable: epics-7.0 » linux32 #221 APS Jenkins via Core-talk
- Index:
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:
[Bug 1879532] Re: Can't completely shutdown libCa and libCom Peter Heesterman via Core-talk
- Next:
[Bug 1879532] Re: Can't completely shutdown libCa and libCom Peter Heesterman via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|