finally found the crashing bug. need to check cur cpu in scheduler