bug-fix: trying to eliminate deadlocks

- add session create and release semaphore to try and
  eliminate deadlocks