Merge "Clean up fd when failed to add monitor thread" into lmp-dev