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)

This comment has been minimized.

@crosbymichael

crosbymichael Jun 5, 2014
Contributor

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

This comment has been minimized.

@LK4D4

LK4D4 Jun 5, 2014
Author Contributor

Ah, ok, I'll drop this commit then

This comment has been minimized.

@LK4D4

LK4D4 Jun 5, 2014
Author Contributor

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

This comment has been minimized.

@crosbymichael

crosbymichael Jun 5, 2014
Contributor

It has to be before we update the container.State

@LK4D4
Copy link
Contributor Author

@LK4D4 LK4D4 commented Jun 5, 2014

@crosbymichael please take another look

@LK4D4
Copy link
Contributor Author

@LK4D4 LK4D4 commented Jun 6, 2014

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

LK4D4 added 3 commits Jun 5, 2014
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 LK4D4 commented Jun 11, 2014

@unclejack
Copy link
Contributor

@unclejack unclejack commented Jun 11, 2014

LGTM

1 similar comment
@vieux
Copy link
Contributor

@vieux vieux commented Jun 11, 2014

LGTM

@vieux
Copy link
Contributor

@vieux 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()

This comment has been minimized.

@crosbymichael

crosbymichael Jun 12, 2014
Contributor

Should the lock be kept for the Sort?

This comment has been minimized.

@crosbymichael

crosbymichael Jun 12, 2014
Contributor

nvm ;)

@crosbymichael
Copy link
Contributor

@crosbymichael crosbymichael commented Jun 12, 2014

LGTM

crosbymichael added a commit that referenced this pull request Jun 12, 2014
Fix some more race conditions
@crosbymichael crosbymichael merged commit 51b188c into moby:master Jun 12, 2014
1 check passed
1 check passed
@samalba
continuous-integration/travis-ci The Travis CI build passed
Details
@vieux vieux added this to the 1.0.1 milestone Jun 12, 2014
@LK4D4 LK4D4 deleted the LK4D4:fix_some_more_race_conditions branch Jun 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants