Thread: [Log4cplus-devel] [log4cplus:bugs] #343 Crash on app exit
Logging Framework for C++
Brought to you by:
wilx
From: Ralf S. <ral...@us...> - 2017-06-23 15:02:56
|
--- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Fri Jun 23, 2017 03:02 PM UTC **Owner:** nobody **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: - 1.2.0 - Visual Studio 2012 - config: release and debug - windows 10, i7 4770 client: - 32 bit Java 7 application - log4cplus as dll - log4cplus.lib and log4cplusD.lib - multibyte chars - see attached logfiles - client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling log4cplus::Logger::shutdown(); The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. >From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-10 05:03:41
|
- **labels**: --> java - **assigned_to**: Václav Haisman --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Fri Jun 23, 2017 03:02 PM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: - 1.2.0 - Visual Studio 2012 - config: release and debug - windows 10, i7 4770 client: - 32 bit Java 7 application - log4cplus as dll - log4cplus.lib and log4cplusD.lib - multibyte chars - see attached logfiles - client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling log4cplus::Logger::shutdown(); The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-10 05:04:15
|
- **labels**: java --> java, v1.2.0 --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Mon Jul 10, 2017 05:03 AM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: - 1.2.0 - Visual Studio 2012 - config: release and debug - windows 10, i7 4770 client: - 32 bit Java 7 application - log4cplus as dll - log4cplus.lib and log4cplusD.lib - multibyte chars - see attached logfiles - client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling log4cplus::Logger::shutdown(); The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-10 05:19:10
|
I am not sure what to think about this. Could you please try HEAD of 1.2.x branch or 2.0.x branch? There have been some initialization and shutdown related changes since the 1.2.0 release. If just using newer log4cplus does not help, could you please try and run your app/java under a debugger with Microsoft symbols path set up so that we can see more of the contex, if at all possible? --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Mon Jul 10, 2017 05:04 AM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: - 1.2.0 - Visual Studio 2012 - config: release and debug - windows 10, i7 4770 client: - 32 bit Java 7 application - log4cplus as dll - log4cplus.lib and log4cplusD.lib - multibyte chars - see attached logfiles - client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling log4cplus::Logger::shutdown(); The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Ralf S. <ral...@us...> - 2017-07-11 12:33:31
|
Tried it with log4cplus-1.2.1-rc1 Same result. But small difference in the call stack. I've also attached the MSVC Debugger with log4cplus symbols and got: > First-chance exception at 0x7560A9F2 in javaw.exe: Microsoft C++ exception: Concurrency::scheduler_resource_allocation_error at memory location 0x46BFEF34. > Ausnahme (erste Chance) bei 0x58E2591B (jvm.dll) in javaw.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00000010 > Attachments: - [hs_err_pid6884.log](https://sourceforge.net/p/log4cplus/bugs/_discuss/thread/4d9f53d7/c87b/attachment/hs_err_pid6884.log) (27.8 kB; application/octet-stream) --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Mon Jul 10, 2017 05:19 AM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: - 1.2.0 - Visual Studio 2012 - config: release and debug - windows 10, i7 4770 client: - 32 bit Java 7 application - log4cplus as dll - log4cplus.lib and log4cplusD.lib - multibyte chars - see attached logfiles - client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling log4cplus::Logger::shutdown(); The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-11 14:29:45
|
Thank you for the additional information, I think I now understand the situation. We have seen this before. The issue is with how are C++11 synchornization primitives implemented in Visual Studio. As a stop gap measure, you can modify the log4cplus source like the following diff, for 1.2.x branch: ```diff diff --git a/include/log4cplus/config/win32.h b/include/log4cplus/config/win32.h index 8e5175cd..aa4b0202 100644 --- a/include/log4cplus/config/win32.h +++ b/include/log4cplus/config/win32.h @@ -162,7 +162,7 @@ # endif # if _MSC_VER >= 1700 # define LOG4CPLUS_HAVE_CXX11_ATOMICS -# define LOG4CPLUS_WITH_CXX11_THREADS +//# define LOG4CPLUS_WITH_CXX11_THREADS # endif #endif ``` This will however not apply on 2.0.x branch because I have removed the non-C++11 implementations of synchornization primitives. I will either have to re-introduce them or...I do not know what else yet. I am keeping this open to remind me about this issue. --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Tue Jul 11, 2017 12:33 PM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: - 1.2.0 - Visual Studio 2012 - config: release and debug - windows 10, i7 4770 client: - 32 bit Java 7 application - log4cplus as dll - log4cplus.lib and log4cplusD.lib - multibyte chars - see attached logfiles - client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling log4cplus::Logger::shutdown(); The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-11 14:31:50
|
- **labels**: java, v1.2.0 --> java, v1.2.0, c++11, threads, mutex - Description has changed: Diff: ~~~~ --- old +++ new @@ -1,24 +1,27 @@ log4cplus: -- 1.2.0 -- Visual Studio 2012 -- config: release and debug -- windows 10, i7 4770 + +* 1.2.0 +* Visual Studio 2012 +* config: release and debug +* windows 10, i7 4770 client: -- 32 bit Java 7 application -- log4cplus as dll -- log4cplus.lib and log4cplusD.lib -- multibyte chars -- see attached logfiles -- client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD + +* 32 bit Java 7 application +* log4cplus as dll +* log4cplus.lib and log4cplusD.lib +* multibyte chars +* see attached logfiles +* client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). -This happens with and without calling log4cplus::Logger::shutdown(); -The problem also occurs if nothing but log4cplus::initialize(); and log4cplus::Logger::shutdown(); are called. +This happens with and without calling `log4cplus::Logger::shutdown();` +The problem also occurs if nothing but `log4cplus::initialize();` and `log4cplus::Logger::shutdown();` are called. From the hotspot error it looks like an cleanup issue: + ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) ~~~~ --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 c++11 threads mutex **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Tue Jul 11, 2017 02:29 PM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: * 1.2.0 * Visual Studio 2012 * config: release and debug * windows 10, i7 4770 client: * 32 bit Java 7 application * log4cplus as dll * log4cplus.lib and log4cplusD.lib * multibyte chars * see attached logfiles * client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling `log4cplus::Logger::shutdown();` The problem also occurs if nothing but `log4cplus::initialize();` and `log4cplus::Logger::shutdown();` are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-11 15:00:46
|
This is basically the issue: https://stackoverflow.com/questions/22402791/visual-studio-2013-stdmutex-and-the-dreaded-windows-loader-lock I wonder, could you try it with Visual Studio 2015 or 2017? --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 c++11 threads mutex **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Tue Jul 11, 2017 02:31 PM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: * 1.2.0 * Visual Studio 2012 * config: release and debug * windows 10, i7 4770 client: * 32 bit Java 7 application * log4cplus as dll * log4cplus.lib and log4cplusD.lib * multibyte chars * see attached logfiles * client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling `log4cplus::Logger::shutdown();` The problem also occurs if nothing but `log4cplus::initialize();` and `log4cplus::Logger::shutdown();` are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-11 16:57:25
|
I have pushed [bd27044f35](https://github.com/wilx/log4cplus/commit/bd27044f353f977dfc35da1a5157a2b42f94112c) to 1.2.x branch to work around this for 1.2.x. It should actually be OK on 2.0.x branch as only Visual Studio 2015 and later is supported there. --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 c++11 threads mutex **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Tue Jul 11, 2017 03:00 PM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: * 1.2.0 * Visual Studio 2012 * config: release and debug * windows 10, i7 4770 client: * 32 bit Java 7 application * log4cplus as dll * log4cplus.lib and log4cplusD.lib * multibyte chars * see attached logfiles * client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling `log4cplus::Logger::shutdown();` The problem also occurs if nothing but `log4cplus::initialize();` and `log4cplus::Logger::shutdown();` are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Ralf S. <ral...@us...> - 2017-07-12 10:54:42
|
Hi Václav, I've tried your patch with log4cplus-1.2.1-rc2 and it seems this did the trick! Thank you very much for the quick fix! --- ** [bugs:#343] Crash on app exit** **Status:** open **Group:** v1.2.0 **Labels:** java v1.2.0 c++11 threads mutex **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Tue Jul 11, 2017 04:57 PM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: * 1.2.0 * Visual Studio 2012 * config: release and debug * windows 10, i7 4770 client: * 32 bit Java 7 application * log4cplus as dll * log4cplus.lib and log4cplusD.lib * multibyte chars * see attached logfiles * client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling `log4cplus::Logger::shutdown();` The problem also occurs if nothing but `log4cplus::initialize();` and `log4cplus::Logger::shutdown();` are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Václav H. <wi...@us...> - 2017-07-12 11:07:46
|
- **labels**: java, v1.2.0, c++11, threads, mutex --> java, v1.2.0, c++11, threads, mutex, fixed - **status**: open --> closed --- ** [bugs:#343] Crash on app exit** **Status:** closed **Group:** v1.2.0 **Labels:** java v1.2.0 c++11 threads mutex fixed **Created:** Fri Jun 23, 2017 03:02 PM UTC by Ralf Sieger **Last Updated:** Wed Jul 12, 2017 10:54 AM UTC **Owner:** Václav Haisman **Attachments:** - [log4cplus_debug_hs_err_pid11184.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_debug_hs_err_pid11184.log) (23.5 kB; application/octet-stream) - [log4cplus_release_hs_err_pid10836.log](https://sourceforge.net/p/log4cplus/bugs/343/attachment/log4cplus_release_hs_err_pid10836.log) (23.9 kB; application/octet-stream) log4cplus: * 1.2.0 * Visual Studio 2012 * config: release and debug * windows 10, i7 4770 client: * 32 bit Java 7 application * log4cplus as dll * log4cplus.lib and log4cplusD.lib * multibyte chars * see attached logfiles * client DLL compile settings: no MFC, no ATL, multibyte charset, /MDd and /MD We use log4cplus in an custom C++ dll which itself gets dynamically loaded in java program. during the runtime everything works ok. At application exit we see an java hotspot error (see logs). This happens with and without calling `log4cplus::Logger::shutdown();` The problem also occurs if nothing but `log4cplus::initialize();` and `log4cplus::Logger::shutdown();` are called. From the hotspot error it looks like an cleanup issue: ~~~ Stack: [0x46760000,0x467b0000], sp=0x467aee5c, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [ntdll.dll+0xecc94] C [ntdll.dll+0x9683a] C [KERNEL32.DLL+0x1dbb9] C [MSVCR110.dll+0x9fa77] C [MSVCR110.dll+0x4defc] C [MSVCR110.dll+0x4f4cf] C [MSVCR110.dll+0x2431b] C [MSVCR110.dll+0x243dc] C [MSVCR110.dll+0x16629] C [MSVCR110.dll+0x6a312] C [MSVCP110.dll+0x2e2d8] C [MSVCP110.dll+0x2e47e] C [log4cplus.dll+0x229b] log4cplus::thread::SyncGuard<log4cplus::thread::Mutex>::SyncGuard<log4cplus::thread::Mutex>+0x2b C [log4cplus.dll+0x3f1dd] log4cplus::spi::ObjectRegistryBase::clear+0x2d C [log4cplus.dll+0x14225] log4cplus::`anonymous namespace'::DefaultContext::~DefaultContext+0x45 C [log4cplus.dll+0x143a5] log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context+0x25 C [log4cplus.dll+0x559cd] log4cplus::`anonymous namespace'::`dynamic atexit destructor for 'destroy_default_context_''+0xd C [log4cplus.dll+0x4e002] _CRT_INIT+0xc1 C [log4cplus.dll+0x4e228] __DllMainCRTStartup+0xcf C [log4cplus.dll+0x4e152] _DllMainCRTStartup+0x1c ~~~ --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |