You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "hordi (via GitHub)" <gi...@apache.org> on 2024/04/25 16:56:44 UTC

[I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

hordi opened a new issue, #373:
URL: https://github.com/apache/logging-log4cxx/issues/373

   Can't provide any simple app to reproduce the issue, but getting it frequently enough in production multi-thread code during  LogManager::shutdown() call before main.cpp exit (nothing is running at this moment). Using 1.2.0 version.
   Very often see some strange delay ~1-30 seconds, sometimes up to 30 minutes. Sometimes crashed with ACCESS_VIOLATION message.
   In Process Explorer I saw some function with 0x0000000 address (disappeared quickly). Core dump was absolutely not helpful.
   Used logging is trivial enough - console low intensive output only.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

Posted by "hordi (via GitHub)" <gi...@apache.org>.
hordi commented on issue #373:
URL: https://github.com/apache/logging-log4cxx/issues/373#issuecomment-2080848928

   Yes, I have one more running thread which I can't turn off, that is intel-TBB thread that I can't control (no API provided to completely shutdown TBB, but no active work there during log3cxx shutdown).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 closed issue #373: Delay/pause/crash in LogManager::shutdown()
URL: https://github.com/apache/logging-log4cxx/issues/373


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on issue #373:
URL: https://github.com/apache/logging-log4cxx/issues/373#issuecomment-2105409263

   @hordi Thank you for the update


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on issue #373:
URL: https://github.com/apache/logging-log4cxx/issues/373#issuecomment-2081374680

   Could you build a Log4cxx with LOG4CXX_EVENTS_AT_EXIT=ON?
   
   This will remove Log4cxx static variable destructors from the onexit chain. You could also then add logging to any other onexit processing to which you have access which may provide you some useful information


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on issue #373:
URL: https://github.com/apache/logging-log4cxx/issues/373#issuecomment-2078328839

   It sounds like your other threads are not being shutdown before the main thread is exiting.  That does lead to undefined behavior.
   
   The only safe way to exit is to stop all threads before returning from `main`, since once the application is exiting the statically allocated variables will be destroyed in an undefined order.  If other threads are still running, crashes are likely as other threads will try to access memory that has just be deallocated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Delay/pause/crash in LogManager::shutdown() [logging-log4cxx]

Posted by "hordi (via GitHub)" <gi...@apache.org>.
hordi commented on issue #373:
URL: https://github.com/apache/logging-log4cxx/issues/373#issuecomment-2104701140

   Finally have found how to turn off TBB thread - do not getting the crash in run log4cxx shutdown any more.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org