Check if there is anything to delete with :
ipcs -a | grep `whoami`
On linux delete them all via :
ipcs | nawk -v u=`whoami` '/Shared/,/^$/{ if($6==0&&$3==u) print "ipcrm shm",$2,";"}/Semaphore/,/^$/{ if($3==u) print "ipcrm sem",$2,";"}' | /bin/sh
For sun it would be :
ipcs -a | nawk -v u=`whoami` '$5==u &&(($1=="m" && $9==0)||($1=="s")){print "ipcrm -"$1,$2,";"}' | /bin/sh
courtsesy of di.uoa.gr
Check again if all is ok
For deleting your sems/shared mem - supposing you are a user in a workstation with no admin rights