fix debug server shutdown and dump go routines