Bug 170171 - ipcs -lm always report "max total shared memory (kbytes) = 0"
ipcs -lm always report "max total shared memory (kbytes) = 0"
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
4
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-07 21:29 EDT by Marcos Martins da Silva
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-22 11:29:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marcos Martins da Silva 2005-10-07 21:29:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.7.12) Gecko/20050927 Fedora/1.0.7-2.1.fc4.nr Firefox/1.0.7

Description of problem:
Changes applied to /proc/sys/kernel/shmmax using echo or sysctl always works: 
echo 327680 > /proc/sys/kernel/shmmax
ipcs -lm
max number of segments = 4096
max seg size (kbytes) = 327680
max total shared memory (kbytes) = 0
min seg size (bytes) = 1

But changes applied to /proc/sys/kernel/shmall using echo or sysctl never works: 
echo 327680 > /proc/sys/kernel/shmall
ipcs -lm
max number of segments = 4096
max seg size (kbytes) = 327680
max total shared memory (kbytes) = 0
min seg size (bytes) = 1

Even an untouched system should display the default value (8388608 kbytes) for max total shared memory: shmmax*pagesize (2097152*4096). 
For my home desktop machine and my usual programs I found no problem, but when I try to use Fedora 4 as a DataBase server (Intersystems Cach�) I have regular errors when the database program tries to attach shared memory

Version-Release number of selected component (if applicable):
util-linux-2.12p-9.12

How reproducible:
Always

Steps to Reproduce:
Just type ipcs -lm on prompt!
  

Actual Results:  max total shared memory (kbytes) = 0
Always

Expected Results:  It shoul display the product shmmax*pagesize

Additional info:

RHEL AS 4 shows the apropriate values
Comment 1 Karel Zak 2005-10-18 12:42:41 EDT
The max shmem calculation in the ipcs util overflow ULONG_MAX. I'm going to fix
it in the next util-linux update. Thanks for report.
Comment 2 Marcos Martins da Silva 2005-10-18 20:40:55 EDT
Not at all. I'm glad to be useful to Fedora Core Project. I know that's just a
little one but it demonstrates how serious you are. By the way, this problem is
the reason why I receive "unable to attach to shared memory segment error 22"
when I try to use Intersystems Cache or it was just a coincidence I just
happened to found when I was checking memory parameters?
Comment 3 Karel Zak 2005-10-19 03:17:41 EDT
I think it was coincidence -- 'ipcs' is only interpreter of shmctl(2) data. The
bad interpretation could be a problem for tools that use the 'ipcs' util as data
source, but I think it's unusual. 

"unable to attach to shared memory segment error 22" seems like problem with
wrong   shared memory segment identification (see man shmctl, error EINVAL).

Note You need to log in before you can comment on or make changes to this bug.