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

UpdateService Race Condition #3

Open
powerofpi opened this issue Dec 31, 2012 · 1 comment
Open

UpdateService Race Condition #3

powerofpi opened this issue Dec 31, 2012 · 1 comment

Comments

@powerofpi
Copy link

There is a subtle race condition in UpdateService.

As soon as the alarm is set on 107, there is a race between the current thread entering its synchronized block first (and executing 110) and the new thread entering its synchronized block (and evaluating the condition on line 60).

Currently, you get lucky and avoid the issue by virtue of scheduling the alarm far into the future. However, if you shorten the time until the next update, this race will be increasingly exposed.

@eprst
Copy link
Owner

eprst commented Dec 31, 2012

thanks, I'll take a look
On Dec 30, 2012 6:06 PM, "powerofpi" [email protected] wrote:

There is a subtle race condition in UpdateService.

As soon as the alarm is set on 107, there is a race between the current
thread entering its synchronized block first (and executing 110) and the
new thread entering its synchronized block (and evaluating the condition on
line 60).

Currently, you get lucky and avoid the issue by virtue of scheduling the
alarm far into the future. However, if you shorten the time until the next
update, this race will be increasingly exposed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3.

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