Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.0
-
Security Level: Public
-
None
-
Linux with SMP
Description
I've noticed that mapreduce tests take huge amount of time to run on my box.
Investigation showed that it's caused by unfairness of mutexes which v8 is using for it's isolate Locker. I.e. I've seen that:
a) terminateTask locker constructor gets stuck for minutes (confirmed by looking at threads' backtraces in gdb)
b) v8 isolate preemption 'works'. There's periodic sched_yield invocations, but seemingly they are not effective as sched_yield is effectively a noop especially if another thread we want to "yield" to is running on another CPU
c) I've seen that pausing sched_yield invocation a bit by placing breakpoint there that automatically continues execution makes v8's context switching effective
Patch is coming soon