Welcome, Guest. Please login or register.
+  Linux Soft Forum
|-+  Cercetează» Software» shmget() failed, unable to allocate a shared memory segment. [solved]
[Picture 161] [Picture 160] [Picture 159]
Username:
Password:
 
Pages: [1]   Go Down
  Print  
Author Topic: shmget() failed, unable to allocate a shared memory segment. [solved]  (Read 1015 times)
0 Members and 1 Guest are viewing this topic.
Master of the Darkside
Membru
*

almost retired


« on: August 31, 2007, 05:14:14 PM »

Īncerc sa rulez crafty (program de sah) cu un hash oarecare pt poziţii. Ca root merge perfect dar ca user primesc următoarea eroare:
Code:
master@localhost ~/crafty $ crafty hash=192M
found computer opening book file [./bookc.bin].
ERROR.  shmget() failed, unable to allocate a shared memory segment.
        Please verify that your /proc/sys/kernel/shmmax value is
        large enough to allow allocating the amount of memory you
        are requesting.  "echo 1000000000 > /proc/sys/kernel/shmmax"
        will allow a segment up to one billion bytes.
Deci s-ar părea că userul normal nu poate accesa shared memory. Idei? Smiley
Mulţumesc.
« Last Edit: August 31, 2007, 08:42:37 PM by Master of the Darkside » Logged

Master of the Darkside
Membru
*

almost retired


« Reply #1 on: August 31, 2007, 08:38:29 PM »

So...aparent pt root valoarea din /proc/sys/kernel/shmmax este ignorată. Inainte aveam:

Code:
master@localhost $ cat /proc/sys/kernel/shmmax
33554432

Adică 32M, şi evident că nu mergea cu hash=192M.
Am modificat īn /etc/sysctl.conf şi am pus kernel.shmmax = 536870912 adică 512M.
Apoi după sysctl -p a mers... Problem solved.
Tre să mă interesez cum afectează valoarea shmmax comportamentul sistemului.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: