From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 30 04:19:12 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DA23671C for ; Tue, 30 Apr 2013 04:19:12 +0000 (UTC) (envelope-from vagner@bsdway.ru) Received: from bsdway.ru (bsdway.ru [62.109.17.46]) by mx1.freebsd.org (Postfix) with ESMTP id 652F0189D for ; Tue, 30 Apr 2013 04:19:11 +0000 (UTC) Received: from localhost ([188.134.95.3]) (authenticated bits=0) by bsdway.ru (8.14.4/8.14.5) with ESMTP id r3U3njpK003423; Tue, 30 Apr 2013 07:49:46 +0400 (MSD) (envelope-from vagner@bsdway.ru) Date: Tue, 30 Apr 2013 07:49:40 +0400 From: Vagner To: freebsd-hackers@freebsd.org Subject: Re: SystemV IPC. Segment info Message-ID: <20130430034940.GA8305@vagner-wrk.bsdway.ru> Mail-Followup-To: freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bsdway.ru [62.109.17.46]); Tue, 30 Apr 2013 07:49:46 +0400 (MSD) Cc: vagner@bsdway.ru X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 04:19:12 -0000 Tell me please, may I send this to PR, or this changes is not valid? > Hello! > A few weeks ago, I ran into problem, which related to SystemV IPC. > More than 20 processes attached to a segment shared queue. Process-initiator for > create segment was killed, as process which was accessed to segment > last. Segment didn't free memory, but tagged it as SHMSEG_REMOVED as > the result. This is a reason of memory overflow (memory assotiated as > shm). Moreover, processes, which was attached to this segment did't > get a new data. I have one resolve. I need to restarted all process, > which still attached to segment. But this reason have a problem. We > haven't list of this processes at system. Moreover, struct shmid_ds, > which described segment, haven't this info too. > > This patch is a resolve of problem. It: > - added a linked list of structures shmid_pi in struct shmid_ds. PID > (and last access time) recorded to this struct consistently. Memory > allocates with ident 'shminfo' for this list of struct shmid_pi. > - added syscall shminf for get all elements from list shmid_ds. > - added option [-P] in ipcs(1) for system call shminf. > > Thanks. > > -- > Respectfully, > Stanislav Putrya > System administrator > FotoStrana.Ru Ltd. > ICQ IM: 328585847 > Jabber-GoogleTalk: root.vagner > mob.phone SPB: +79215788755 > mob.phone RND: +79525600664 > email: vagner@bsdway.ru > email: putrya@playform.ru > email: root.vagner@gmail.com > site: bsdway.ru > site: fotostrana.ru > > ---------------------------------------- > ( ) ASCII ribbon campaign > X - against HTML, vCards and > / \ - proprietary attachments in e-mail > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: shminf.patch > Type: text/x-diff > Size: 30460 bytes > Desc: not available > URL: >