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

hammer: ceph-osd valgrind invalid reads/writes #9238

Merged
merged 1 commit into from Jul 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/msg/simple/Pipe.cc
Expand Up @@ -479,13 +479,21 @@ int Pipe::accept()
* held by somebody trying to make use of the SimpleMessenger lock.
* So drop locks, wait, and retry. It just looks like a slow network
* to everybody else.
*
* We take a ref to existing here since it might get reaped before we
* wake up (see bug #15870). We can be confident that it lived until
* locked it since we held the msgr lock from _lookup_pipe through to
* locking existing->lock and checking reader_dispatching.
*/
existing->get();
pipe_lock.Unlock();
msgr->lock.Unlock();
existing->notify_on_dispatch_done = true;
while (existing->reader_dispatching)
existing->cond.Wait(existing->pipe_lock);
existing->pipe_lock.Unlock();
existing->put();
existing = 0;
goto retry_existing_lookup;
}

Expand Down