Description
In current version of V8 3.28.73 a deadlock causes the process to hang and consume 100% CPU when CPU profiling is active and the application is serving requests. The reason is this line of code https://github.com/joyent/node/blob/v0.12.2/deps/v8/src/isolate.cc#L50, which leads to pthread_mutex_lock deadlock. It is removed in version 3.29.79.
To reproduce start the CPU profiling using V8 API (e.g. with v8-profiler) and run some load agains the server. My sample app would also do some requests to DBs to simulate real world apps. When it hangs, you can use gdb to verify it hangs because of pthread_mutex_lock.
Looks like the patching would be dangerous since the V8 commit fixing the issue has multiple changes and was actually nothing to do with this issue. So the solution is to upgrade V8.
Are there any plans to upgrade V8 in the 0.12 at some point? The issue makes it impossible to profile applications under load test and in production.