Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2017 21:58:52 -0700
From:      Yuri <yuri@rawbw.com>
To:        Freebsd hackers list <freebsd-hackers@FreeBSD.org>
Subject:   How can the shared memory object be undeletable when all shared memory segments belong to the same user?
Message-ID:  <b959b884-c362-5d93-39bb-6d9c9fd4f6bf@rawbw.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b959b884-c362-5d93-39bb-6d9c9fd4f6bf>