Avoid applog while ch_lock is held.