Fix the deadlock problem of profiler. fix the python script key error issue.