Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building with mingw-w64-gcc #389

Merged
merged 7 commits into from
Jul 19, 2024
Merged

Conversation

MehdiChinoune
Copy link
Contributor

@MehdiChinoune MehdiChinoune commented Jul 9, 2024

Fixes #388

pkgconfig files could be used on Windows by both MSVC and MinGW compilers
WIN32 is not defined by default on MinGW. While _WIN32 is known be always defined on Windows

reported before: https://issues.apache.org/jira/browse/LOGCXX-5
WIN32 compile definition is required.
`!(defined(_WIN32) && defined(_LIBCPP_VERSION))` was added because In some platforms winpthreads exist but It's not used by libc++.
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/liblog4cxx.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/lib${LOG4CXX_LIB_NAME}.pc"
)
# Support for pkg-config in consuming projects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is pkg-config available on Windows? I don't think we want to always install the .pc file.

Adding a new option to force the .pc installation feels better to me, I'm not sure if anybody else has any thoughts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It's available.
Does it hurt to install pc file?

@swebb2066
Copy link
Contributor

Coul you please post versions of mingw environments and compilers you have tested this PR with?

@MehdiChinoune
Copy link
Contributor Author

Coul you please post versions of mingw environments and compilers you have tested this PR with?

UCRT64: GCC 14.1.0 + Binutils 2.42
CLANG64: Clang 18.1.8

CMake: 3.30.0
Ninja: 1.12.1

APR 1.7.4
APR-UTIL 1.6.3
FMT 10.2.1
Qt5: 5.15.14

Tests: 61/64

@swebb2066
Copy link
Contributor

Tests: 61/64

Could you post output of the tests that are failing?

@MehdiChinoune
Copy link
Contributor Author

Could you post output of the tests that are failing?

$ ctest --output-on-failure
Test project D:/dev/build
      Start  1: autoconfiguretestcase
 1/64 Test  #1: autoconfiguretestcase ...............   Passed    3.55 sec
      Start  2: asyncappendertestcase
 2/64 Test  #2: asyncappendertestcase ...............Exit code 0xc0000374
***Exception:   3.38 sec
LC_CTYPE: Arabic_Saudi Arabia.1256
asyncappendertestcase.:
  testDefaultThreshold
  testSetOptionThreshold
  closeTest
log4cxx: Attempted to append to closed appender named [async-CloseTest].
  test2
log4cxx: Attempted to append to closed appender named [async-test2].
  testEventFlush
log4cxx: Attempted to append to closed appender named [async-testEventFlush].
  testMultiThread

      Start  3: consoleappendertestcase
 3/64 Test  #3: consoleappendertestcase .............   Passed    0.03 sec
      Start  4: decodingtest
 4/64 Test  #4: decodingtest ........................   Passed    0.03 sec
      Start  5: encodingtest
 5/64 Test  #5: encodingtest ........................   Passed    0.04 sec
      Start  6: fileappendertest
 6/64 Test  #6: fileappendertest ....................   Passed    0.03 sec
      Start  7: filetestcase
 7/64 Test  #7: filetestcase ........................   Passed    0.03 sec
      Start  8: hexdumptestcase
 8/64 Test  #8: hexdumptestcase .....................   Passed    0.03 sec
      Start  9: hierarchytest
 9/64 Test  #9: hierarchytest .......................   Passed    0.03 sec
      Start 10: hierarchythresholdtestcase
10/64 Test #10: hierarchythresholdtestcase ..........   Passed    0.05 sec
      Start 11: jsonlayouttest
11/64 Test #11: jsonlayouttest ......................   Passed    0.03 sec
      Start 12: l7dtestcase
12/64 Test #12: l7dtestcase .........................   Passed    0.04 sec
      Start 13: leveltestcase
13/64 Test #13: leveltestcase .......................   Passed    0.03 sec
      Start 14: levelchangetestcase
14/64 Test #14: levelchangetestcase .................   Passed    0.03 sec
      Start 15: loggertestcase
15/64 Test #15: loggertestcase ......................   Passed    0.04 sec
      Start 16: mdctestcase
16/64 Test #16: mdctestcase .........................   Passed    0.03 sec
      Start 17: minimumtestcase
17/64 Test #17: minimumtestcase .....................   Passed    0.03 sec
      Start 18: ndctestcase
18/64 Test #18: ndctestcase .........................   Passed    0.03 sec
      Start 19: patternlayouttest
19/64 Test #19: patternlayouttest ...................***Failed    1.00 sec
LC_CTYPE: Arabic_Saudi Arabia.1256
patternlayouttest.:
  test1
  test2
  test3
  test4
  test5
  test6
  test7
  test8
  test9
  test10
  test11
  test12
  test13
  test14
Line 439: Compare::compare(TEMP, LOG4CXX_FILE("witness/patternLayout.14")) was expected to be true, was false.
Files [output/patternlayout] and [witness/patternLayout.14] differ on line 1
One reads:  [DEBUG D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 0].
Other reads:[DEBUG patternlayouttest.cpp: Message 0].
--------------------------------
Contents of output/patternlayout:
1   : DEBUG D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 0
2   : DEBUG D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 0
3   : INFO  D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 1
4   : INFO  D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 1
5   : WARN  D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 2
6   : WARN  D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 2
7   : ERROR D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 3
8   : ERROR D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 3
9   : FATAL D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 4
10  : FATAL D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 4
--------------------------------
Contents of witness/patternLayout.14:
1   : DEBUG patternlayouttest.cpp: Message 0
2   : DEBUG patternlayouttest.cpp: Message 0
3   : INFO  patternlayouttest.cpp: Message 1
4   : INFO  patternlayouttest.cpp: Message 1
5   : WARN  patternlayouttest.cpp: Message 2
6   : WARN  patternlayouttest.cpp: Message 2
7   : ERROR patternlayouttest.cpp: Message 3
8   : ERROR patternlayouttest.cpp: Message 3
9   : FATAL patternlayouttest.cpp: Message 4
10  : FATAL patternlayouttest.cpp: Message 4
  testMDC1
  testMDC2
FAILED 1 of 16
Failed Tests                                    Total   Fail    Failed %
=======================================================================
patternlayouttest.                                 16      1      6.25%
  test14

      Start 20: propertyconfiguratortest
20/64 Test #20: propertyconfiguratortest ............   Passed    0.02 sec
      Start 21: rollingfileappendertestcase
21/64 Test #21: rollingfileappendertestcase .........   Passed    0.03 sec
      Start 22: streamtestcase
22/64 Test #22: streamtestcase ......................   Passed    0.04 sec
      Start 23: locationtest
23/64 Test #23: locationtest ........................***Failed    0.03 sec
LC_CTYPE: Arabic_Saudi Arabia.1256
locationtest.:
  test1
Line 53: Compare::compare(LOG4CXX_STR("output/location-good-test"), LOG4CXX_FILE("witness/location1-good")) was expected to be true, wa
s false.
Files [output/location-good-test] and [witness/location1-good] differ on line 1
One reads:  [DEBUG(D:/dev/logging-log4cxx/src/test/cpp/locationtest.cpp) - Message -1].
Other reads:[DEBUG(locationtest.cpp) - Message -1].
--------------------------------
Contents of output/location-good-test:
1   : DEBUG(D:/dev/logging-log4cxx/src/test/cpp/locationtest.cpp) - Message -1
--------------------------------
Contents of witness/location1-good:
1   : DEBUG(locationtest.cpp) - Message -1
FAILED 1 of 1
Failed Tests                                    Total   Fail    Failed %
=======================================================================
locationtest.                                       1      1    100.00%
  test1

      Start 24: locationdisabledtest
24/64 Test #24: locationdisabledtest ................   Passed    0.02 sec
      Start 25: terminationtestcase
25/64 Test #25: terminationtestcase .................   Passed    0.06 sec
      Start 26: fmttest
26/64 Test #26: fmttest .............................   Passed    0.12 sec
      Start 27: absolutetimedateformattestcase
27/64 Test #27: absolutetimedateformattestcase ......   Passed    0.03 sec
      Start 28: cacheddateformattestcase
28/64 Test #28: cacheddateformattestcase ............   Passed    0.03 sec
      Start 29: casttestcase
29/64 Test #29: casttestcase ........................   Passed    0.03 sec
      Start 30: charsetdecodertestcase
30/64 Test #30: charsetdecodertestcase ..............   Passed    0.03 sec
      Start 31: charsetencodertestcase
31/64 Test #31: charsetencodertestcase ..............   Passed    0.20 sec
      Start 32: cyclicbuffertestcase
32/64 Test #32: cyclicbuffertestcase ................   Passed    0.06 sec
      Start 33: datetimedateformattestcase
33/64 Test #33: datetimedateformattestcase ..........   Passed    0.04 sec
      Start 34: filewatchdogtest
34/64 Test #34: filewatchdogtest ....................   Passed    0.08 sec
      Start 35: inetaddresstestcase
35/64 Test #35: inetaddresstestcase .................   Passed    4.71 sec
      Start 36: iso8601dateformattestcase
36/64 Test #36: iso8601dateformattestcase ...........   Passed    0.02 sec
      Start 37: messagebuffertest
37/64 Test #37: messagebuffertest ...................   Passed    0.02 sec
      Start 38: optionconvertertestcase
38/64 Test #38: optionconvertertestcase .............   Passed    0.03 sec
      Start 39: propertiestestcase
39/64 Test #39: propertiestestcase ..................   Passed    0.03 sec
      Start 40: relativetimedateformattestcase
40/64 Test #40: relativetimedateformattestcase ......   Passed    0.03 sec
      Start 41: stringhelpertestcase
41/64 Test #41: stringhelpertestcase ................   Passed    0.02 sec
      Start 42: stringtokenizertestcase
42/64 Test #42: stringtokenizertestcase .............   Passed    0.02 sec
      Start 43: timezonetestcase
43/64 Test #43: timezonetestcase ....................   Passed    0.02 sec
      Start 44: transcodertestcase
44/64 Test #44: transcodertestcase ..................   Passed    0.02 sec
      Start 45: threadutilitytestcase
45/64 Test #45: threadutilitytestcase ...............   Passed    0.03 sec
      Start 46: syslogwritertest
46/64 Test #46: syslogwritertest ....................   Passed    0.50 sec
      Start 47: xloggertestcase
47/64 Test #47: xloggertestcase .....................   Passed    0.05 sec
      Start 48: xmltests
48/64 Test #48: xmltests ............................   Passed    0.71 sec
      Start 49: defaultinittestcase
49/64 Test #49: defaultinittestcase .................   Passed    0.03 sec
      Start 50: filtertests
50/64 Test #50: filtertests .........................   Passed    0.02 sec
      Start 51: syslogappendertestcase
51/64 Test #51: syslogappendertestcase ..............   Passed    0.02 sec
      Start 52: telnetappendertestcase
52/64 Test #52: telnetappendertestcase ..............***Timeout 120.04 sec
LC_CTYPE: Arabic_Saudi Arabia.1256
telnetappendertestcase.:
  testDefaultThreshold
  testSetOptionThreshold
  testActivateClose
  testActivateSleepClose
  testActivateWriteClose
  testActivateWriteNoClose
SUCCESS

      Start 53: xmlsocketappendertestcase
53/64 Test #53: xmlsocketappendertestcase ...........   Passed    0.03 sec
      Start 54: eventlogtests
54/64 Test #54: eventlogtests .......................   Passed    0.03 sec
      Start 55: patternparsertestcase
55/64 Test #55: patternparsertestcase ...............   Passed    0.03 sec
      Start 56: filenamepatterntestcase
56/64 Test #56: filenamepatterntestcase .............   Passed    0.03 sec
      Start 57: filterbasedrollingtest
57/64 Test #57: filterbasedrollingtest ..............   Passed    0.07 sec
      Start 58: manualrollingtest
58/64 Test #58: manualrollingtest ...................   Passed    0.25 sec
      Start 59: sizebasedrollingtest
59/64 Test #59: sizebasedrollingtest ................   Passed    0.49 sec
      Start 60: timebasedrollingtest
60/64 Test #60: timebasedrollingtest ................   Passed    0.84 sec
      Start 61: rollingfileappenderpropertiestest
61/64 Test #61: rollingfileappenderpropertiestest ...   Passed   11.05 sec
      Start 62: errorhandlertestcase
62/64 Test #62: errorhandlertestcase ................   Passed    0.29 sec
      Start 63: levelmatchfiltertestcase
63/64 Test #63: levelmatchfiltertestcase ............   Passed    0.04 sec
      Start 64: levelrangefiltertestcase
64/64 Test #64: levelrangefiltertestcase ............   Passed    0.03 sec

94% tests passed, 4 tests failed out of 64

Total Test time (real) = 149.03 sec

The following tests FAILED:
          2 - asyncappendertestcase (Exit code 0xc0000374
)
         19 - patternlayouttest (Failed)
         23 - locationtest (Failed)
         52 - telnetappendertestcase (Timeout)
Errors while running CTest

@swebb2066
Copy link
Contributor

Line 439: Compare::compare(TEMP, LOG4CXX_FILE("witness/patternLayout.14")) was expected to be true, was false.
Files [output/patternlayout] and [witness/patternLayout.14] differ on line 1
One reads: [DEBUG D:/dev/logging-log4cxx/src/test/cpp/patternlayouttest.cpp: Message 0].
Other reads:[DEBUG patternlayouttest.cpp: Message 0].

Could you also change locationinfo.h

@swebb2066
Copy link
Contributor

swebb2066 commented Jul 12, 2024

The following tests FAILED:
2 - asyncappendertestcase (Exit code 0xc0000374

With the following change to add some debug statements:

diff --git a/src/test/cpp/asyncappendertestcase.cpp b/src/test/cpp/asyncappendertestcase.cpp
index 0b6cf794..5ee0e667 100644
--- a/src/test/cpp/asyncappendertestcase.cpp
+++ b/src/test/cpp/asyncappendertestcase.cpp
@@ -246,23 +246,35 @@ class AsyncAppenderTestCase : public AppenderSkeletonTestCase
                        std::vector<std::thread> threads;
                        for ( int x = 0; x < threadCount; x++ )
                        {
-                               std::thread thr([root, LEN]()
+                               threads.emplace_back([root, LEN]()
                                {
+                                       std::stringstream ss;
+                                       ss << std::this_thread::get_id();
+                                       LOG4CXX_ENCODE_CHAR(msg1, "Starting thread " + ss.str());
+                                       helpers::LogLog::debug(msg1);
                                        for (size_t i = 0; i < LEN; i++)
                                        {
                                                LOG4CXX_DEBUG(root, "message" << i);
                                        }
+                                       LOG4CXX_ENCODE_CHAR(msg2, "Finished thread " + ss.str());
+                                       helpers::LogLog::debug(msg2);
                                });
-                               threads.push_back( std::move(thr) );
                        }

                        for ( auto& thr : threads )
                        {
+                               std::stringstream ss;
+                               ss << thr.get_id();
+                               LOG4CXX_ENCODE_CHAR(msg1, "Waiting for thread " + ss.str());
+                               helpers::LogLog::debug(msg1);
                                if ( thr.joinable() )
                                {
                                        thr.join();
                                }
+                               LOG4CXX_ENCODE_CHAR(msg2, "Joined thread " + ss.str());
+                               helpers::LogLog::debug(msg2);
                        }
+                       helpers::LogLog::debug(LOG4CXX_STR("Closing asyncAppender"));
                        asyncAppender->close();

                        const std::vector<spi::LoggingEventPtr>& v = vectorAppender->getVector();

The following stack trace suggests there is a bug in the ucrt64 runtime:

steph@WEBB-HOME-LAPTOP UCRT64 ~/logging-log4cxx/build
$ LOG4CXX_DEBUG=true gdb ./src/test/cpp/asyncappendertestcase.exe
GNU gdb (GDB) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./src/test/cpp/asyncappendertestcase.exe...
(gdb) r -v
Starting program: C:\msys64\home\steph\logging-log4cxx\build\src\test\cpp\asyncappendertestcase.exe -v
[New Thread 23488.0x5a88]
[New Thread 23488.0x12a0]
[New Thread 23488.0x6700]
LC_CTYPE: English_Australia.utf8
asyncappendertestcase.:
-  testDefaultThreshold
log4cxx: Started
|  testSetOptionThreshold
\  closeTest
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
[New Thread 23488.0x4914]
log4cxx: AsyncAppender discardCount 0 pendingCountHistogram 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[Thread 23488.0x4914 exited with code 0]
log4cxx: Attempted to append to closed appender named [async-CloseTest].
-  test2
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
[New Thread 23488.0x6ab8]
log4cxx: AsyncAppender discardCount 0 pendingCountHistogram 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[Thread 23488.0x6ab8 exited with code 0]
log4cxx: Attempted to append to closed appender named [async-test2].
|  testEventFlush
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
[New Thread 23488.0x68b0]
log4cxx: AsyncAppender discardCount 0 pendingCountHistogram 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[Thread 23488.0x68b0 exited with code 0]
log4cxx: Attempted to append to closed appender named [async-testEventFlush].
/  testMultiThread
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
[New Thread 23488.0xf20]
[New Thread 23488.0x11f0]
[New Thread 23488.0x6060]
[New Thread 23488.0x59e8]
lo[New Thread 23488.0x6c70]
g4cxx: Starting thread 5[New Thread 23488.0xe4c]

log4cxx: Starting thre[New Thread 23488.0x6068]
ad 6
log4cxx: Waiting for thread 5
log4cxx: Starting thread 7
log4cxx: Starting thread 8
log4cxx: Starting thread 9
log4cxx: Starting thread 10
log4cxx: Finished thread 9
log4warning: Critical error detected c0000374
c
Thread 12 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 23488.0x6c70]
0x00007ff8b253c883 in ntdll!RtlIsZeroMemory () from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb) thread apply all backtrace

Thread 14 (Thread 23488.0x6068):
#0  0x00007ff8b24d3b94 in ntdll!ZwWaitForAlertByThreadId () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8b24640e3 in ntdll!TpWorkOnBehalfClearTicket () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff8b2451ce4 in ntdll!RtlEnterCriticalSection () from C:\WINDOWS\SYSTEM32\ntdll.dll
#3  0x00007ff8b2451ad2 in ntdll!RtlEnterCriticalSection () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x00007ff8b253459c in ntdll!RtlRegisterSecureMemoryCacheCallback () from C:\WINDOWS\SYSTEM32\ntdll.dll
#5  0x00007ff8b24edf1a in ntdll!EtwLogTraceEvent () from C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x00007ff8b246d239 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#7  0x00007ff8afef1966 in ucrtbase!_malloc_base () from C:\WINDOWS\System32\ucrtbase.dll
#8  0x00007fff97c93b5c in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#9  0x00007fff96dfe5d3 in std::__new_allocator<std::shared_ptr<log4cxx::Appender> >::allocate(unsigned long long, void const*) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#10 0x00007fff96de292c in std::_Vector_base<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > >::_M_allocate(unsigned long long) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#11 0x00007fff96e27dcb in std::shared_ptr<log4cxx::Appender>* std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<std::shared_ptr<log4cxx::Appender> const*, std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > > >(unsigned long long, __gnu_cxx::__normal_iterator<std::shared_ptr<log4cxx::Appender> const*, std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > >, __gnu_cxx::__normal_iterator<std::shared_ptr<log4cxx::Appender> const*, std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > >) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#12 0x00007fff96e28291 in std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > >::operator=(std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > const&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#13 0x00007fff96d22896 in log4cxx::helpers::AppenderAttachableImpl::getAllAppenders() const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#14 0x00007fff96d22742 in log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#15 0x00007fff96d2770e in log4cxx::AsyncAppender::dispatch() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#16 0x00007fff96e4b3c6 in void std::__invoke_impl<void, void (log4cxx::AsyncAppender::*)(), log4cxx::AsyncAppender*>(std::__invoke_memfun_deref, void (log4cxx::AsyncAppender::*&&)(), log4cxx::AsyncAppender*&&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#17 0x00007fff96e5aeac in std::__invoke_result<void (log4cxx::AsyncAppender::*)(), log4cxx::AsyncAppender*>::type std::__invoke<void (log4cxx::AsyncAppender::*)(), log4cxx::AsyncAppender*>(void (log4cxx::AsyncAppender::*&&)(), log4cxx::AsyncAppender*&&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#18 0x00007fff96e20e05 in void std::thread::_Invoker<std::tuple<void (log4cxx::AsyncAppender::*)(), log4cxx::AsyncAppender*> >::_M_invoke<0ull, 1ull>(std::_Index_tuple<0ull, 1ull>) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#19 0x00007fff96e20e78 in std::thread::_Invoker<std::tuple<void (log4cxx::AsyncAppender::*)(), log4cxx::AsyncAppender*> >::operator()() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#20 0x00007fff96e2091c in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (log4cxx::AsyncAppender::*)(), log4cxx::AsyncAppender*> > >::_M_run() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#21 0x00007fff97c953ff in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#22 0x00007ff83ef14dbb in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#23 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#24 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#25 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#26 0x0000000000000000 in ?? ()

Thread 13 (Thread 23488.0xe4c):
#0  0x00007fff96e08f27 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#1  0x00007fff96df6847 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#2  0x00007fff96de417c in std::__shared_ptr<log4cxx::spi::LoggingEvent, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#3  0x00007fff96de4207 in std::__shared_ptr<log4cxx::spi::LoggingEvent, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<log4cxx::spi::LoggingEvent, (__gnu_cxx::_Lock_policy)2>&&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#4  0x00007fff96dcca8e in std::shared_ptr<log4cxx::spi::LoggingEvent>::operator=(std::shared_ptr<log4cxx::spi::LoggingEvent>&&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#5  0x00007fff96d976c0 in log4cxx::AsyncAppender::AsyncAppenderPriv::EventData::operator=(log4cxx::AsyncAppender::AsyncAppenderPriv::EventData&&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#6  0x00007fff96d25e8b in log4cxx::AsyncAppender::append(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#7  0x00007fff96d23f3f in log4cxx::AppenderSkeleton::doAppendImpl(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#8  0x00007fff96d258e8 in log4cxx::AsyncAppender::doAppend(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#9  0x00007fff96d227ae in log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#10 0x00007fff96d4fa72 in log4cxx::Logger::callAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#11 0x00007fff96d4fc6c in log4cxx::Logger::addEvent(std::shared_ptr<log4cxx::Level> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, log4cxx::spi::LocationInfo const&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#12 0x00007fff96d4fd6a in log4cxx::Logger::addDebugEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, log4cxx::spi::LocationInfo const&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#13 0x00007ff6f7999a02 in AsyncAppenderTestCase::testMultiThread()::{lambda()#1}::operator()() const ()
#14 0x00007ff6f79977f0 in void std::__invoke_impl<void, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(std::__invoke_other, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#15 0x00007ff6f7999335 in std::__invoke_result<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>::type std::__invoke<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#16 0x00007ff6f7992758 in void std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::_M_invoke<0ull>(std::_Index_tuple<0ull>) ()
#17 0x00007ff6f79927d8 in std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::operator()() ()
#18 0x00007ff6f79925ac in std::thread::_State_impl<std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> > >::_M_run() ()
#19 0x00007fff97c953ff in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#20 0x00007ff83ef14dbb in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#21 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
--Type <RET> for more, q to quit, c to continue without paging--c
#22 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#23 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#24 0x0000000000000000 in ?? ()

Thread 12 (Thread 23488.0x6c70):
#0  0x00007ff8b253c883 in ntdll!RtlIsZeroMemory () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8b254595a in ntdll!.misaligned_access () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff8b2545c3a in ntdll!.misaligned_access () from C:\WINDOWS\SYSTEM32\ntdll.dll
#3  0x00007ff8b2551c35 in ntdll!.misaligned_access () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x00007ff8b246c2dd in ntdll!RtlGetCurrentServiceSessionId () from C:\WINDOWS\SYSTEM32\ntdll.dll
#5  0x00007ff8b246aff1 in ntdll!RtlFreeHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x00007ff8afef364b in ucrtbase!_free_base () from C:\WINDOWS\System32\ucrtbase.dll
#7  0x00007fff97c6a990 in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#8  0x00007fff96d9548d in run_dtor_list (ptr=<optimized out>) at C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tls_atexit.c:62
#9  run_dtor_list (ptr=0x83dc70) at C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tls_atexit.c:56
#10 tls_callback (hDllHandle=<optimized out>, dwReason=<optimized out>, lpReserved=<optimized out>) at C:/M/B/src/mingw-w64/mingw-w64-crt/crt/tls_atexit.c:165
#11 0x00007ff8b24abfaa in ntdll!RtlGetCurrentDirectory_U () from C:\WINDOWS\SYSTEM32\ntdll.dll
#12 0x00007ff8b2458b7f in ntdll!RtlActivateActivationContextUnsafeFast () from C:\WINDOWS\SYSTEM32\ntdll.dll
#13 0x00007ff8b2459809 in ntdll!LdrShutdownThread () from C:\WINDOWS\SYSTEM32\ntdll.dll
#14 0x00007ff8b24593a9 in ntdll!LdrShutdownThread () from C:\WINDOWS\SYSTEM32\ntdll.dll
#15 0x00007ff8b248af9e in ntdll!RtlExitUserThread () from C:\WINDOWS\SYSTEM32\ntdll.dll
#16 0x00007ff8af8cde3a in KERNELBASE!FreeLibraryAndExitThread () from C:\WINDOWS\System32\KernelBase.dll
#17 0x00007ff8aff093fd in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#18 0x00007ff8aff61719 in ucrtbase!_endthreadex () from C:\WINDOWS\System32\ucrtbase.dll
#19 0x00007ff83ef14e83 in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#20 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#21 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#22 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#23 0x0000000000000000 in ?? ()

Thread 11 (Thread 23488.0x59e8):
#0  0x00007fff96d506fb in log4cxx::Logger::isDebugEnabled() const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#1  0x00007ff6f798a646 in log4cxx::Logger::isDebugEnabledFor(std::shared_ptr<log4cxx::Logger> const&) ()
#2  0x00007ff6f7999937 in AsyncAppenderTestCase::testMultiThread()::{lambda()#1}::operator()() const ()
#3  0x00007ff6f79977f0 in void std::__invoke_impl<void, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(std::__invoke_other, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#4  0x00007ff6f7999335 in std::__invoke_result<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>::type std::__invoke<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#5  0x00007ff6f7992758 in void std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::_M_invoke<0ull>(std::_Index_tuple<0ull>) ()
#6  0x00007ff6f79927d8 in std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::operator()() ()
#7  0x00007ff6f79925ac in std::thread::_State_impl<std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> > >::_M_run() ()
#8  0x00007fff97c953ff in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#9  0x00007ff83ef14dbb in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#10 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#11 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#12 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#13 0x0000000000000000 in ?? ()

Thread 10 (Thread 23488.0x6060):
#0  0x00007ff8b24d0024 in ntdll!ZwWaitForSingleObject () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8af889a9e in WaitForSingleObjectEx () from C:\WINDOWS\System32\KernelBase.dll
#2  0x00007ff83ef12fe9 in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#3  0x00007fff96d21416 in __gthread_mutex_lock(long long*) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#4  0x00007fff96e1ddb8 in std::mutex::lock() () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#5  0x00007fff96dcc09a in std::lock_guard<std::mutex>::lock_guard(std::mutex&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#6  0x00007fff96d22877 in log4cxx::helpers::AppenderAttachableImpl::getAllAppenders() const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#7  0x00007fff96d22742 in log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#8  0x00007fff96d4fa72 in log4cxx::Logger::callAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#9  0x00007fff96d4fc6c in log4cxx::Logger::addEvent(std::shared_ptr<log4cxx::Level> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, log4cxx::spi::LocationInfo const&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#10 0x00007fff96d4fd6a in log4cxx::Logger::addDebugEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, log4cxx::spi::LocationInfo const&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#11 0x00007ff6f7999a02 in AsyncAppenderTestCase::testMultiThread()::{lambda()#1}::operator()() const ()
#12 0x00007ff6f79977f0 in void std::__invoke_impl<void, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(std::__invoke_other, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#13 0x00007ff6f7999335 in std::__invoke_result<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>::type std::__invoke<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#14 0x00007ff6f7992758 in void std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::_M_invoke<0ull>(std::_Index_tuple<0ull>) ()
#15 0x00007ff6f79927d8 in std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::operator()() ()
#16 0x00007ff6f79925ac in std::thread::_State_impl<std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> > >::_M_run() ()
#17 0x00007fff97c953ff in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#18 0x00007ff83ef14dbb in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#19 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#20 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#21 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#22 0x0000000000000000 in ?? ()

Thread 9 (Thread 23488.0x11f0):
#0  0x00007ff8b24d3b94 in ntdll!ZwWaitForAlertByThreadId () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8b24640e3 in ntdll!TpWorkOnBehalfClearTicket () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff8b2451ce4 in ntdll!RtlEnterCriticalSection () from C:\WINDOWS\SYSTEM32\ntdll.dll
#3  0x00007ff8b2451ad2 in ntdll!RtlEnterCriticalSection () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x00007ff8b253459c in ntdll!RtlRegisterSecureMemoryCacheCallback () from C:\WINDOWS\SYSTEM32\ntdll.dll
#5  0x00007ff8b24edf1a in ntdll!EtwLogTraceEvent () from C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x00007ff8b246d239 in ntdll!RtlAllocateHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
#7  0x00007ff8afef1966 in ucrtbase!_malloc_base () from C:\WINDOWS\System32\ucrtbase.dll
#8  0x00007fff97c93b5c in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#9  0x00007fff96dfe5d3 in std::__new_allocator<std::shared_ptr<log4cxx::Appender> >::allocate(unsigned long long, void const*) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#10 0x00007fff96de292c in std::_Vector_base<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > >::_M_allocate(unsigned long long) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#11 0x00007fff96e27dcb in std::shared_ptr<log4cxx::Appender>* std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<std::shared_ptr<log4cxx::Appender> const*, std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > > >(unsigned long long, __gnu_cxx::__normal_iterator<std::shared_ptr<log4cxx::Appender> const*, std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > >, __gnu_cxx::__normal_iterator<std::shared_ptr<log4cxx::Appender> const*, std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > >) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#12 0x00007fff96e28291 in std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > >::operator=(std::vector<std::shared_ptr<log4cxx::Appender>, std::allocator<std::shared_ptr<log4cxx::Appender> > > const&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#13 0x00007fff96d22896 in log4cxx::helpers::AppenderAttachableImpl::getAllAppenders() const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#14 0x00007fff96d22742 in log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#15 0x00007fff96d4fa72 in log4cxx::Logger::callAppenders(std::shared_ptr<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#16 0x00007fff96d4fc6c in log4cxx::Logger::addEvent(std::shared_ptr<log4cxx::Level> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, log4cxx::spi::LocationInfo const&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#17 0x00007fff96d4fd6a in log4cxx::Logger::addDebugEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, log4cxx::spi::LocationInfo const&) const () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#18 0x00007ff6f7999a02 in AsyncAppenderTestCase::testMultiThread()::{lambda()#1}::operator()() const ()
#19 0x00007ff6f79977f0 in void std::__invoke_impl<void, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(std::__invoke_other, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#20 0x00007ff6f7999335 in std::__invoke_result<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>::type std::__invoke<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#21 0x00007ff6f7992758 in void std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::_M_invoke<0ull>(std::_Index_tuple<0ull>) ()
#22 0x00007ff6f79927d8 in std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::operator()() ()
#23 0x00007ff6f79925ac in std::thread::_State_impl<std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> > >::_M_run() ()
#24 0x00007fff97c953ff in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#25 0x00007ff83ef14dbb in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#26 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#27 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#28 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#29 0x0000000000000000 in ?? ()

Thread 8 (Thread 23488.0xf20):
#0  0x00007ff8b24d00a4 in ntdll!ZwWriteFile () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8af87b81b in WriteFile () from C:\WINDOWS\System32\KernelBase.dll
#2  0x00007ff8aff94f01 in ucrtbase!_umask_s () from C:\WINDOWS\System32\ucrtbase.dll
#3  0x00007ff8afef85c2 in ucrtbase!_free_base () from C:\WINDOWS\System32\ucrtbase.dll
#4  0x00007ff8afef844d in ucrtbase!_free_base () from C:\WINDOWS\System32\ucrtbase.dll
#5  0x00007ff8afef826b in ucrtbase!_free_base () from C:\WINDOWS\System32\ucrtbase.dll
#6  0x00007ff8afee3fcc in ucrtbase!fputs () from C:\WINDOWS\System32\ucrtbase.dll
#7  0x00007ff8afee3f1f in ucrtbase!fputs () from C:\WINDOWS\System32\ucrtbase.dll
#8  0x00007ff8afee3edf in ucrtbase!fputs () from C:\WINDOWS\System32\ucrtbase.dll
#9  0x00007ff8afee3dc8 in ucrtbase!fputs () from C:\WINDOWS\System32\ucrtbase.dll
#10 0x00007fff96d79ad1 in log4cxx::helpers::SystemErrWriter::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#11 0x00007fff96d5508d in log4cxx::helpers::LogLog::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#12 0x00007fff96d54cc5 in log4cxx::helpers::LogLog::debug(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from C:\msys64\home\steph\logging-log4cxx\build\src\main\cpp\liblog4cxx.dll
#13 0x00007ff6f7999ac9 in AsyncAppenderTestCase::testMultiThread()::{lambda()#1}::operator()() const ()
#14 0x00007ff6f79977f0 in void std::__invoke_impl<void, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(std::__invoke_other, AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#15 0x00007ff6f7999335 in std::__invoke_result<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>::type std::__invoke<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}>(AsyncAppenderTestCase::testMultiThread()::{lambda()#1}&&) ()
#16 0x00007ff6f7992758 in void std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::_M_invoke<0ull>(std::_Index_tuple<0ull>) ()
#17 0x00007ff6f79927d8 in std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> >::operator()() ()
#18 0x00007ff6f79925ac in std::thread::_State_impl<std::thread::_Invoker<std::tuple<AsyncAppenderTestCase::testMultiThread()::{lambda()#1}> > >::_M_run() ()
#19 0x00007fff97c953ff in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#20 0x00007ff83ef14dbb in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#21 0x00007ff8aff09333 in ucrtbase!_recalloc () from C:\WINDOWS\System32\ucrtbase.dll
#22 0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#23 0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#24 0x0000000000000000 in ?? ()

Thread 4 (Thread 23488.0x6700):
#0  0x00007ff8b24d3bf4 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8b246585e in ntdll!RtlClearThreadWorkOnBehalfTicket () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#3  0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 23488.0x12a0):
#0  0x00007ff8b24d3bf4 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8b246585e in ntdll!RtlClearThreadWorkOnBehalfTicket () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#3  0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 23488.0x5a88):
#0  0x00007ff8b24d3bf4 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8b246585e in ntdll!RtlClearThreadWorkOnBehalfTicket () from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007ff8b114257d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#3  0x00007ff8b248af28 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 23488.0x617c):
#0  0x00007ff8b24d0024 in ntdll!ZwWaitForSingleObject () from C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007ff8af889a9e in WaitForSingleObjectEx () from C:\WINDOWS\System32\KernelBase.dll
#2  0x00007ff83ef1689a in ?? () from C:\msys64\ucrt64\bin\libwinpthread-1.dll
#3  0x00007fff97c4e4f7 in ?? () from C:\msys64\ucrt64\bin\libstdc++-6.dll
#4  0x00007ff6f7986e81 in AsyncAppenderTestCase::testMultiThread() ()
#5  0x00007ff6f7989c48 in void LogUnit::runTest<AsyncAppenderTestCase>(abts_case*, void (AsyncAppenderTestCase::*)()) ()
#6  0x00007ff6f79858f8 in AsyncAppenderTestCase::RegisterSuite::testMultiThreadRegistration::run(abts_case*, void*) ()
#7  0x00007ff6f7981ba2 in abts_run_test(abts_suite*, char const*, void (*)(abts_case*, void*), void*) ()
#8  0x00007ff6f798368e in LogUnit::TestSuite::run(abts_suite*) const ()
#9  0x00007ff6f7982d2c in abts_run_suites(abts_suite*) ()
#10 0x00007ff6f79827bc in main ()
(gdb)

@MehdiChinoune
Copy link
Contributor Author

UCRT runtime comes from Windows OS, We could do nothing about.
Could we keep this PR about "Fix building" instead of "Fix running"?

@MehdiChinoune
Copy link
Contributor Author

Also MinGW apps are native Windows and shouldn't have any issue with \ used in paths.

@swebb2066
Copy link
Contributor

Also MinGW apps are native Windows and shouldn't have any issue with \ used in paths.

I believe locationinfo.h needs to set LOG4CXX_SHORT_FILENAME_SPLIT_CHAR based on the compiler, not the system

The following change fixes patternlayouttest failure

diff --git a/src/main/include/log4cxx/spi/location/locationinfo.h b/src/main/include/log4cxx/spi/location/locationinfo.h
index 3b68d531..c4af54e4 100644
--- a/src/main/include/log4cxx/spi/location/locationinfo.h
+++ b/src/main/include/log4cxx/spi/location/locationinfo.h
@@ -22,7 +22,7 @@
 #include <string>
 #include <string.h>

-#if defined(_WIN32)
+#if defined(_MSC_VER)
 #define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '\\'
 #else
 #define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '/'

@swebb2066
Copy link
Contributor

swebb2066 commented Jul 13, 2024 via email

@swebb2066
Copy link
Contributor

The following tests FAILED:
52 - telnetappendertestcase (Timeout)

When telnet appender is not explictly closed, the onexit processing chain does not terminate.

The following change will at least fix the test.

diff --git a/src/test/cpp/net/telnetappendertestcase.cpp b/src/test/cpp/net/telnetappendertestcase.cpp
index b7aebbe5..1268c227 100644
--- a/src/test/cpp/net/telnetappendertestcase.cpp
+++ b/src/test/cpp/net/telnetappendertestcase.cpp
@@ -118,6 +118,7 @@ class TelnetAppenderTestCase : public AppenderSkeletonTestCase
 #endif
                                LOG4CXX_INFO(root, "Hello, World " << i);
                        }
+                       appender->close();
                }

 };

@swebb2066 swebb2066 merged commit 4f0abc2 into apache:master Jul 19, 2024
11 of 12 checks passed
@MehdiChinoune MehdiChinoune deleted the mingw-fixes branch July 19, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails to build with mingw-w64-gcc
3 participants