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

Process hangs when logging buffer overflow happens and Dispathcer thread has died #76

Open
rohitnitk2004 opened this issue May 10, 2024 · 2 comments

Comments

@rohitnitk2004
Copy link

Async appender checks dispatcher thread liveness and then only adds to logging buffer.

However If the dispatcher thread dies just after this liveness check and logging buffer is already full ( in multi-threaded application with too much logging happening ) then this thread gets blocked forever ( refer 1st snapshot)

To make it worse; it keeps holding a lock on Rootlogger which makes other threads blocked as well ( refer 2nd snapshot )

image

image

@ceki
Copy link
Member

ceki commented May 10, 2024

Thank you for this report. What leads you to believe that the dispatcher thread has died?

@rohitnitk2004
Copy link
Author

took thread dump of running application and saw below as per snapshot. We have a uncaught exception handler which logs error.

in this cases; dispatcher thread is not yet "dead" and like other logging threads; it is stuck trying to get lock on root logger. However it reached here because of an uncaught exception and in absence of uncaught exception handler; it would have died and led to same problem for other logging threads.

image

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

No branches or pull requests

2 participants