fixed a potential crash bug caused by invoking mutex in interrupt context