Merge pull request #3718 from gao-yan/executor-shutdown-use-after-free
Fix: executor: avoid use-after-free upon shutdown