This happens because the main thread is waiting for the sample scheduler thread to finish, but sometimes it never does. This can be resolved by emptying the scheduler's sample queue before requesting the scheduler thread to finish. This will make sure the scheduler thread returns to it's main loop quickly, and can handle the termination request.
Created attachment 265745 [details] Patch
Comment on attachment 265745 [details] Patch Clearing flags on attachment: 265745 Committed r192578: <http://trac.webkit.org/changeset/192578>
All reviewed patches have been landed. Closing bug.
Thanks for reviewing!