From a69c4001dd891bf5d9b2862455d743d5d438cc96 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Mon, 3 Nov 2014 17:31:25 -0500 Subject: SERVER-15888: fix profiling inf. loop when can't profile --- src/mongo/db/introspect.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index 0b3afeb947d..1359abf0375 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -162,6 +162,10 @@ namespace { WriteUnitOfWork wunit(txn); Client::Context cx(txn, currentOp.getNS(), false); if ( !_profile(txn, c, cx.db(), currentOp, profileBufBuilder ) && lk.get() ) { + if ( tryAgain ) { + // we couldn't profile, but that's ok, we should have logged already + break; + } // we took an IX lock, so now we try again with an X lock tryAgain = true; continue; -- cgit v1.2.1