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

PureeBufferedOutput will never resume, if the flushSync function is skipped by locking storage with another PureeBufferedOutput instance #61

Open
sys1yagi opened this issue Jun 20, 2018 · 1 comment

Comments

@sys1yagi
Copy link

Hi.

Problem

When there are two or more PureeBufferedOutputs, if the flushSync function is skipped by locking storage with another PureeBufferedOutput instance, it will never resume.

Caused by

  • PureeBufferedOutput has RetryableTaskRunner and send log by the runner.
  • RetryableTaskRunner start by tryToStart function but the function skip if already 'future' exists.
  • PureeBufferedOutput call tryToStart function when receive new log.
  • PureeBufferedOutput#flushSync() will be skipped when 'storage' is locked.
  • RetryableTaskRunner resets 'future' only if it have done the send process (success / failed).
  • So, if there are multiple PureeBufferedOutputs and one locks the 'storage', the other instance's "future" will not be reset and the flushTask will not work. 😵

Idea

I have no idea... 🙀

thanks.

@litmon
Copy link
Contributor

litmon commented Oct 3, 2018

@sys1yagi Thanks for reporting.
I patched this bug in #62 , but it cannot completely fix because if this situation loops it will be occurred.
In the future, I will try to split storage's lock which has each PureeBufferedOuput.

@litmon litmon mentioned this issue Nov 1, 2018
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