Skip to content

Fix deadlock in logger service#264

Open
vhotspur wants to merge 1 commit intomasterfrom
topic/fix-logger-deadlock
Open

Fix deadlock in logger service#264
vhotspur wants to merge 1 commit intomasterfrom
topic/fix-logger-deadlock

Conversation

@vhotspur
Copy link
Copy Markdown
Member

This PR fixes a deadlock in logger (discovered and reported by @vitSkalicky, thanks!).

The deadlock appeared when one instance needed to increment the reference counter of a parent log while that log was already locked from a different connection.

Replacing the locks with atomic ref counters should prevent this.

Practically it looks like it works but I would be glad for a second set of eyes if the use of atomic_refcount_t is fine (the part when we need to lock the global lock is still somewhat fragile but I am not sure about any other way to do it and still keep fine-grained locks for each logger).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant