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

Possible deadlock in spit-appender #329

Closed
vincentjames501 opened this issue Nov 25, 2020 · 1 comment
Closed

Possible deadlock in spit-appender #329

vincentjames501 opened this issue Nov 25, 2020 · 1 comment
Labels

Comments

@vincentjames501
Copy link

The following commit added a new locking mechanism to the spit-appender: d531880

This can cause a possible deadlock if you try to log something while logging something (i.e. realizing a lazy collection).

While I realize this isn't advised, it used to work but now results in a deadlock:

(timbre/info "root" (pmap #(timbre/info "num" %) (range 10)))

Note: if you fully realize the collection, there are no issues.

(timbre/info "root" (vec (pmap #(timbre/info "num" %) (range 10))))
ryfow added a commit to ryfow/timbre that referenced this issue Nov 25, 2020
In spit-appender, force the output before acquiring a lock in
case the forced code tries to acquire the same spit-appender lock
from a different thread.
@ptaoussanis
Copy link
Member

@vincentjames501 Thanks for the report (+ reproducible) Vincent!

ptaoussanis pushed a commit that referenced this issue Nov 26, 2020
In spit-appender, force the output before acquiring a lock in
case the forced code tries to acquire the same spit-appender lock
from a different thread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants