find bug while allocating sems