test notify and fix stop() deadlock bug