From owner-freebsd-hackers@freebsd.org Sat Aug 12 05:12:28 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF870D933B1 for ; Sat, 12 Aug 2017 05:12:28 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id DFF1D7411D for ; Sat, 12 Aug 2017 05:12:28 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yv.noip.me (c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id v7C4wrwq070299 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 11 Aug 2017 21:58:53 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56] claimed to be yv.noip.me To: Freebsd hackers list From: Yuri Subject: How can the shared memory object be undeletable when all shared memory segments belong to the same user? Message-ID: Date: Fri, 11 Aug 2017 21:58:52 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2017 05:12:29 -0000 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,0644) 16151 scsynth NAMI "/SuperColliderServer_57110" 16151 scsynth RET shm_open -1 errno 17 File exists ... 16151 scsynth CALL shm_open(0x803fdb3e0,0x2,0644) 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