fix get_or_create_sp() that may cause a dead lock

I would go and replace the locking stuff with ```with self.sesslock:``` now that we are at it.