fix get_or_create_sp() that may cause a dead lock
Merge pull request #756 from LipuFei/fix_swift_next

fix get_or_create_sp() that may cause a dead lock