poco
poco copied to clipboard
Application crashed while rotating log files in Mac OS M1/M2
Multiple and constant instances of crashes observed for an application during log rotation. What I did The application was run with sudo command, the application and all the related paths have proper access permissions. The rotation parameters are set as below: logging.channels.c3.archive: number logging.channels.c3.class: FileChannel logging.channels.c3.formatter: f1 logging.channels.c3.path: /var/log/applicationXYZ/applicationXYZ.log logging.channels.c3.purgeCount: 5 logging.channels.c3.rotation: 1M
Observations: Whenever the log file applicationXYZ.log reaches the it's capacity (here 1M), it tries rotate the file, the application crashes and /bin/launchctl auto launches the application. The log file applicationXYZ.log.0, and execution goes on. Again when log file applicationXYZ.log reaches the it's capacity, the application crashes, and /bin/launchctl auto launches the application. The log files applicationXYZ.log.1 and applicationXYZ.log.0 are created.
This crash has been observed on MACOS M1/M2 Monterey 12.6.1 / 12.6.1 and Ventura 13.1. POCO Library version: 1.12.4
I have pasted the contents of crash file below, and it is the same with every other crash file.
See different crash reports --->
`Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information: dyld2 mode abort() called util(1394,0x104b33e00) malloc: *** error for object 0x7fadfdc16950: pointer being freed was not allocated
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff203c691e __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff203f55bd pthread_kill + 263 2 libsystem_c.dylib 0x00007fff2034a406 abort + 125 3 libsystem_malloc.dylib 0x00007fff2022a165 malloc_vreport + 548 4 libsystem_malloc.dylib 0x00007fff2022d2aa malloc_report + 151 5 libPocoFoundation.94.dylib 0x0000000104c480b7 Poco::FileStreamBuf::~FileStreamBuf() + 135 6 libPocoFoundation.94.dylib 0x0000000104c497e8 Poco::FileOutputStream::~FileOutputStream() + 72 7 libPocoFoundation.94.dylib 0x0000000104bc1efe Poco::LogFile::~LogFile() + 30 8 libPocoFoundation.94.dylib 0x0000000104b75048 Poco::ArchiveByNumberStrategy::archive(Poco::LogFile*) + 56 9 libPocoFoundation.94.dylib 0x0000000104bb42b1 Poco::FileChannel::log(Poco::Message const&) + 97 10 libPocoFoundation.94.dylib 0x0000000104bb8b57 Poco::FormattingChannel::log(Poco::Message const&) + 119 11 util 0x0000000103f5eaa7 main + 9511 12 libdyld.dylib 0x00007fff20410f3d start + 1 `
`System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [9734]
VM Region Info: 0 is not in any region. Bytes before following region: 4378705920
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 104fdc000-104fec000 [ 64K] r-x/r-x SM=COW ...scan-util
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_platform.dylib 0x190ca708c _platform_memmove + 444
1 libc++.1.dylib 0x190bca564 std::__1::basic_string<char, std::__1::char_traits
`System Integrity Protection: enabled
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information: abort() called
0 libsystem_kernel.dylib 0x183682d98 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1836b7ee0 pthread_kill + 288
2 libsystem_c.dylib 0x1835f2340 abort + 168
3 libc++abi.dylib 0x183672b08 abort_message + 132
4 libc++abi.dylib 0x183662938 demangling_terminate_handler() + 312
5 libobjc.A.dylib 0x183558330 _objc_terminate() + 160
6 libc++abi.dylib 0x183671ea4 std::__terminate(void ()()) + 20
7 libc++abi.dylib 0x183674c1c __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception) + 36
8 libc++abi.dylib 0x183674bc8 __cxa_throw + 140
9 libPocoFoundation.94.dylib 0x10538e140 Poco::FileImpl::handleLastErrorImpl(int, std::__1::basic_string<char, std::__1::char_traits
It is happening with New Poco Library 1.12.4 Only. I have checked with Poco library 1.11.3 with same application, issue not happened. Issue seems to be introduced in version 1.12.4. Can you please help on this issue? @obiltschnig / @aleks-f / @hmartinez82
Hi All, @obiltschnig / @aleks-f / @hmartinez82, Can you please help to check this issue ?
@hideme4u , Hi! Can you give me simple reproducible code sample?
I'm a dev only on Windows, sorry 🥲
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.