SystemV IPC. Segment info

Vagner vagner at bsdway.ru
Tue Apr 30 04:19:12 UTC 2013


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 at bsdway.ru
> email: putrya at playform.ru
> email: root.vagner at 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: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20130415/233bf05f/attachment-0001.patch>
> 


More information about the freebsd-hackers mailing list