From nobody@FreeBSD.org  Wed Jul  1 17:12:08 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB23B106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Jul 2009 17:12:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A94FD8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Jul 2009 17:12:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n61HC8Bl044064
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 Jul 2009 17:12:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n61HC8lb044063;
	Wed, 1 Jul 2009 17:12:08 GMT
	(envelope-from nobody)
Message-Id: <200907011712.n61HC8lb044063@www.freebsd.org>
Date: Wed, 1 Jul 2009 17:12:08 GMT
From: durga velagapudi <dvelagapudi@adaranet.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ipcs -bp doesn't display the shm segsz if it is bigger than 2GB
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         136226
>Category:       kern
>Synopsis:       ipcs(1): ipcs -bp doesn't display the shm segsz if it is bigger than 2GB
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 01 17:20:01 UTC 2009
>Closed-Date:    Sun Jul 05 15:34:14 UTC 2009
>Last-Modified:  Sun Jul 05 15:34:14 UTC 2009
>Originator:     durga velagapudi
>Release:        FreeBSD 7.2-RELEASE #0
>Organization:
adara networks
>Environment:
FreeBSD host64-1 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The process allocates shared memory of size 9GB

When ipcs -bp is executed from command line

Shared Memory:
T           ID          KEY MODE        OWNER    GROUP           SEGSZ         CPID         LPID
m        65541         1296 --rw-rw---- root     wheel               0         1590         1576

The SEGSZ is 9GB allocated but it is shown as 0
>How-To-Repeat:
run a process which requestes shmget() api requesting 9GB. also set the sysctl.shmmax to 10GB
>Fix:
got to change the struct shmid_kernel struct member seg_sz to type size_t or unsigned long.



>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/136226: commit references a PR
Date: Sun,  5 Jul 2009 13:17:29 +0000 (UTC)

 Author: jilles
 Date: Sun Jul  5 13:17:18 2009
 New Revision: 195361
 URL: http://svn.freebsd.org/changeset/base/195361
 
 Log:
   MFC ipcs(1) part of r189283 by kib
   
   This fixes display of shared memory segment sizes greater than 2 GB in
   ipcs -b.
   
   PR:		kern/136226
   Approved by:	ed (mentor)
 
 Modified:
   stable/7/usr.bin/ipcs/   (props changed)
   stable/7/usr.bin/ipcs/ipcs.c
 
 Modified: stable/7/usr.bin/ipcs/ipcs.c
 ==============================================================================
 --- stable/7/usr.bin/ipcs/ipcs.c	Sun Jul  5 08:40:26 2009	(r195360)
 +++ stable/7/usr.bin/ipcs/ipcs.c	Sun Jul  5 13:17:18 2009	(r195361)
 @@ -452,8 +452,8 @@ print_kshmptr(int i, int option, struct 
  		    kshmptr->u.shm_nattch);
  
  	if (option & BIGGEST)
 -		printf(" %12d",
 -		    kshmptr->u.shm_segsz);
 +		printf(" %12zu",
 +		    kshmptr->shm_bsegsz);
  
  	if (option & PID)
  		printf(" %12d %12d",
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: jilles 
State-Changed-When: Sun Jul 5 15:34:14 UTC 2009 
State-Changed-Why:  
Fixed, please see the 20090312 entry in /usr/src/UPDATING for 
restrictions. A proper fix (with ABI change) will be in 8.0. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136226 
>Unformatted:
