fixbug, master thread unexpected shutdown