--- old/src/share/vm/runtime/sweeper.cpp 2013-11-14 10:23:59.305488381 +0100 +++ new/src/share/vm/runtime/sweeper.cpp 2013-11-14 10:23:59.245488382 +0100 @@ -231,7 +231,8 @@ */ void NMethodSweeper::possibly_sweep() { assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode"); - if (!MethodFlushing || !sweep_in_progress()) { + // Only compiler threads are allowed to sweep + if (!MethodFlushing || !sweep_in_progress() || !Thread::current()->is_Compiler_thread()) { return; }