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

Fix some more race conditions #6214

Merged
merged 3 commits into from
Jun 12, 2014
Merged

Fix some more race conditions #6214

merged 3 commits into from
Jun 12, 2014

Conversation

LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Jun 5, 2014

Another -race load testing.
I'm not very sure about changes to server/buildfile.go, but it seems working good.
ping @vieux @unclejack @crosbymichael

@@ -464,6 +462,8 @@ func (container *Container) monitor(callback execdriver.StartCallback) error {
}
}

close(container.waitLock)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot move this, we moved this before changing the state because there is a race between the two that causes a panic.

The real fix for this is that we don't have the same information in two places ( wait lock and State ), until then there will always be a race between the two

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok, I'll drop this commit then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, can I move it between ToDisk and changing state? because race in ToDisk really

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be before we update the container.State

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jun 5, 2014

@crosbymichael please take another look

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jun 6, 2014

Dropped last commit. I'll prepare new PR with "wait" functions for State

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
@LK4D4
Copy link
Contributor Author

LK4D4 commented Jun 11, 2014

rebased
ping @vieux @unclejack @crosbymichael

@unclejack
Copy link
Contributor

LGTM

1 similar comment
@vieux
Copy link
Contributor

vieux commented Jun 11, 2014

LGTM

@vieux
Copy link
Contributor

vieux commented Jun 11, 2014

@crosbymichael can you please take a look also ?

for _, cont := range c.s {
containers.Add(cont)
}
c.Unlock()
containers.Sort()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the lock be kept for the Sort?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm ;)

@crosbymichael
Copy link
Contributor

LGTM

crosbymichael pushed a commit that referenced this pull request Jun 12, 2014
@crosbymichael crosbymichael merged commit 51b188c into moby:master Jun 12, 2014
@vieux vieux added this to the 1.0.1 milestone Jun 12, 2014
@LK4D4 LK4D4 deleted the fix_some_more_race_conditions branch June 13, 2014 05:40
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

Successfully merging this pull request may close these issues.

None yet

4 participants