Обсуждение: Solaris 7 x86 error

Поиск
Список
Период
Сортировка

Solaris 7 x86 error

От
myers
Дата:

Folks:

I get the following errors when trying to start up Postgres ('postmaster
-S') on a Solaris 7 x86 machine:

IpcMemoryCreate: shmget failed (Invalid argument) key=5432010, size=120,
permission=700
IpcMemoryIdGet: shmget failed (No such file or directory) key=5432010,
size=120, permission=0
IpcMemoryAttach: shmat failed (Invalid argument) id=-2
FATAL 1:  AttachSLockMemory: could not attach segment


The shared memory settings in /etc/system are:

set shmsys:shminfo_shmmax=50331648
set shmsys:shminfo_shmmin=200
set shmsys:shminfo_shmmni=200
set shmsys:shminfo_shmseg=200
set semsys:seminfo_semmap=250
set semsys:seminfo_semmni=500
set semsys:seminfo_semmns=500
set semsys:seminfo_semmsl=500
set semsys:seminfo_semmnu=500
set semsys:seminfo_semume=100


Compiler was gcc 2.95.1.

A truss of the postmaster process shows the following:

shmget(5432010, 120, 0700|IPC_CREAT)            Err#22 EINVAL
IpcMemoryCreate: shmget failed (Invalid argument) key=5432010, size=120,
permis\
sion=700write(2, " I p c M e m o r y C r e".., 87)      = 87

write(2, "\n", 1)                               = 1
shmget(5432010, 120, 0)                         Err#2 ENOENT
IpcMemoryIdGet: shmget failed (No such file or directory) key=5432010,
size=120\
, permission=0write(2, " I p c M e m o r y I d G".., 93)        = 93

write(2, "\n", 1)                               = 1
shmat(-2, 0, 0)                                 Err#22 EINVAL


Am I doing something obviously wrong?  Many thanks for advice.

(BTW, does the search function in the mailing list message archive work?
Trying simple, obvious search values like 'solaris' or 'linux' produces no
hits.)

-David.




Re: [GENERAL] Solaris 7 x86 error

От
Bruce Momjian
Дата:
See Solaris FAQ on web site.  That is newer.


>
>
> Folks:
>
> I get the following errors when trying to start up Postgres ('postmaster
> -S') on a Solaris 7 x86 machine:
>
> IpcMemoryCreate: shmget failed (Invalid argument) key=5432010, size=120,
> permission=700
> IpcMemoryIdGet: shmget failed (No such file or directory) key=5432010,
> size=120, permission=0
> IpcMemoryAttach: shmat failed (Invalid argument) id=-2
> FATAL 1:  AttachSLockMemory: could not attach segment
>
>
> The shared memory settings in /etc/system are:
>
> set shmsys:shminfo_shmmax=50331648
> set shmsys:shminfo_shmmin=200
> set shmsys:shminfo_shmmni=200
> set shmsys:shminfo_shmseg=200
> set semsys:seminfo_semmap=250
> set semsys:seminfo_semmni=500
> set semsys:seminfo_semmns=500
> set semsys:seminfo_semmsl=500
> set semsys:seminfo_semmnu=500
> set semsys:seminfo_semume=100
>
>
> Compiler was gcc 2.95.1.
>
> A truss of the postmaster process shows the following:
>
> shmget(5432010, 120, 0700|IPC_CREAT)            Err#22 EINVAL
> IpcMemoryCreate: shmget failed (Invalid argument) key=5432010, size=120,
> permis\
> sion=700write(2, " I p c M e m o r y C r e".., 87)      = 87
>
> write(2, "\n", 1)                               = 1
> shmget(5432010, 120, 0)                         Err#2 ENOENT
> IpcMemoryIdGet: shmget failed (No such file or directory) key=5432010,
> size=120\
> , permission=0write(2, " I p c M e m o r y I d G".., 93)        = 93
>
> write(2, "\n", 1)                               = 1
> shmat(-2, 0, 0)                                 Err#22 EINVAL
>
>
> Am I doing something obviously wrong?  Many thanks for advice.
>
> (BTW, does the search function in the mailing list message archive work?
> Trying simple, obvious search values like 'solaris' or 'linux' produces no
> hits.)
>
> -David.
>
>
>
>
> ************
>
>


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: [GENERAL] Solaris 7 x86 error

От
myers
Дата:

On Tue, 28 Sep 1999, Bruce Momjian wrote:

> See Solaris FAQ on web site.  That is newer.


Doesn't help -- at least, assuming you meant item 1.3 in that FAQ.  I've
varied the shared memory settings from four megabytes to over 200.  I
still get the same error.

I wonder if something changed for 2.7.  It seems to me I've gotten this
working on 2.6 and under (albeit on Sparc CPUs).

-David.



Re: [GENERAL] Solaris 7 x86 error

От
myers
Дата:

> See Solaris FAQ on web site.  That is newer.


Oops.  Okay.  Here's a lesson in getting too fancy.  With the following
settings in /etc/system, Postgres does not work:

set shmsys:shminfo_shmmax=50000000
set shmsys:shminfo_shmmin=200
set shmsys:shminfo_shmmni=200
set shmsys:shminfo_shmseg=200
set semsys:seminfo_semmap=250
set semsys:seminfo_semmni=500
set semsys:seminfo_semmns=500
set semsys:seminfo_semmsl=500
set semsys:seminfo_semmnu=500
set semsys:seminfo_semume=100


Pare this down to the minimum, and Postgres *does* work:

set shmsys:shminfo_shmmax=50000000


Why, I don't know, especially since those extra shared memory directives
appear to exceed Postgres' requirements.  But for the record, keep
/etc/system simple.

Thanks to Bruce for pointing me in the right direction.

-David.



Re: [GENERAL] Solaris 7 x86 error

От
Ivan Richwalski
Дата:
On Tue, 28 Sep 1999, myers wrote:
>
> Oops.  Okay.  Here's a lesson in getting too fancy.  With the following
> settings in /etc/system, Postgres does not work:
>
> set shmsys:shminfo_shmmax=50000000
> set shmsys:shminfo_shmmin=200
> set shmsys:shminfo_shmmni=200
> set shmsys:shminfo_shmseg=200
> set semsys:seminfo_semmap=250
> set semsys:seminfo_semmni=500
> set semsys:seminfo_semmns=500
> set semsys:seminfo_semmsl=500
> set semsys:seminfo_semmnu=500
> set semsys:seminfo_semume=100
>
>
> Pare this down to the minimum, and Postgres *does* work:
>
> set shmsys:shminfo_shmmax=50000000
>
>
> Why, I don't know, especially since those extra shared memory directives
> appear to exceed Postgres' requirements.  But for the record, keep
> /etc/system simple.
>

    I think the problem is that you set shminfo_shmmin ( The
minimum size for a shared segment ) to 200 bytes.  But in the truss
that you posted earlier, postmaster is trying to create a memory
segment that is too small:

    shmget(5432010, 120, 0700|IPC_CREAT)  Err#22 EINVAL


    The man page for shmget has this in the ERRORS section:

    EINVAL    size is less than the system-imposed minimum
        or greater than the system-imposed maximum.

    EINVAL    A shared memory identifier exists for key but
        the size of the segment associated with it is
        less than size and size is not equal to 0.


    I've had some pretty good results with shminfo_shmmax=16777216
( Maximum size of any one shared memory segment is 16Meg ).  This is
on an Ultra 1 with 256Meg of RAM running Solaris 2.6. Just make sure
to increase the number of buffers when you start the postmaster to
match the maximum size of your shared memory segments.

Ivan Richwalski.


Re: [GENERAL] Solaris 7 x86 error

От
Andy Lewis
Дата:
I'm having the exact same problems on an Ultra 5 and Solaris 7.

What gives?

Thanks

Andy

On Mon, 27 Sep 1999, myers wrote:

>
>
> On Tue, 28 Sep 1999, Bruce Momjian wrote:
>
> > See Solaris FAQ on web site.  That is newer.
>
>
> Doesn't help -- at least, assuming you meant item 1.3 in that FAQ.  I've
> varied the shared memory settings from four megabytes to over 200.  I
> still get the same error.
>
> I wonder if something changed for 2.7.  It seems to me I've gotten this
> working on 2.6 and under (albeit on Sparc CPUs).
>
> -David.
>
>
>
> ************
>