How can the shared memory object be undeletable when all shared memory segments belong to the same user?

Yuri yuri at rawbw.com
Sat Aug 12 05:12:29 UTC 2017


I got this sequence of shm_* failures that I can't understand:

  16151 scsynth  CALL  shm_unlink(0x803fdb3e0)
  16151 scsynth  NAMI  "/SuperColliderServer_57110"
  16151 scsynth  RET   shm_unlink -1 errno 13 Permission denied
...
  16151 scsynth  CALL 
shm_open(0x803fdb3e0,0xa02<O_RDWR|O_CREAT|O_EXCL>,0644<S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH>)
  16151 scsynth  NAMI  "/SuperColliderServer_57110"
  16151 scsynth  RET   shm_open -1 errno 17 File exists
...
  16151 scsynth  CALL 
shm_open(0x803fdb3e0,0x2<O_RDWR>,0644<S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH>)
  16151 scsynth  NAMI  "/SuperColliderServer_57110"
  16151 scsynth  RET   shm_open -1 errno 13 Permission denied


Deletion operation fails with EACCESS, creation operation fails with 
EEXIST, opening operation fails with EACCESS again. So the object 
exists, but this user can't delete or open it. At the same time, 'ipcs 
-m' shows that all active segments belong to the same user. Failures are 
persistent with application restarts.


Only renaming of the shared memory object in the code or reboot helped.


Yuri



More information about the freebsd-hackers mailing list