spanning tree. still need to test on cyclic topo
prevent XSB from blocking: flush error buffer