fix mutex deadlock issue in service manager