Bug 19199

Summary: Postgresql Won't start on Alpha
Product: [Retired] Red Hat Linux Reporter: Dale Lovelace <dale>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Dale Lovelace <dale>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: fweimer, msw
Target Milestone: ---   
Target Release: ---   
Hardware: alpha   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-30 16:04:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Dale Lovelace 2000-10-16 19:45:17 UTC
[root@ha4 /root]# /etc/rc.d/init.d/postgresql start
Checking postgresql installation:                          [  OK  ]
Starting postgresql service:                               [FAILED]
[root@ha4 /root]# su postmaster
bash-2.04$ /usr/bin/postmaster -D /var/lib/pgsql/data/
001016.15:39:59.383  [1558] IpcSemaphoreCreate: semctl failed (Numerical
result out of range) id=1536
This type of error is usually caused by an improper
shared memory or System V IPC semaphore configuration.
For more information, see the FAQ and platform-specific
FAQ's in the source directory pgsql/doc or on our
web site at http://www.postgresql.org.
001016.15:39:59.385  [1558] FATAL 1:  InitProcGlobal: IpcSemaphoreCreate

Comment 1 Trond Eivind Glomsrxd 2000-10-17 14:55:32 UTC
Matt, any ideas?

Comment 2 Phil Copeland 2000-10-18 23:58:01 UTC
Initially I thought this was a problem with thhe IPC shared memory pools on the
various architcures for linux are not identical.
Eg for i386 it's 32Mb but only 4Mb for Alpha

	[root@i386 /root]# cat /proc/sys/kernel/shmmax 

	[root@Alpha /root]# cat /proc/sys/kernel/shmmax 

This is not the case.
When running the prgram through strace we can clearly see the culprit being the
call to semctl()
which fails (ERANGE) This is what the man page has to say on the subject.

ERANGE     The argument cmd has value SETALL or SETVAL and
                  the value to which semval has to  be  set  (for
                  some  semaphore  of  the set) is less than 0 or
                  greater than the implementation value SEMVMX.

(relevant portion of the strace output)
	semget(5432014, 0, 0)                   = -1 ENOENT (No such file or directory)
	semget(5432014, 16, IPC_CREAT|0x180|0600) = 4096
	semctl(4096, 0, SETALL, 0x11ffff1c0)    = -1 ERANGE (Numerical result out of

where the semctl call is
	int  semctl  (int  semid, int semnum, int cmd, union semun arg)

Unfortunately it's going to be extremely difficult to wade into
	a) the postgres code
	b) the libc code
	c) the kernel
which this call seems to have scope in.

The actual moment of death comes into play from 
leading into the actual call in
	src/backend/storage/ipc/ipc.c:318 (runs in from line 294)

Now I have a problem here because gdb is for some odd reason not letting me view
the structure thats being used in the call.

I personally can't progress further than this unless someone has come intresting
ideas of how to get around the gdb problem I'm having (note: I don't use gdb
that much)

I have to leave this one open
But at least chased down to a point that someone else can follow on from


Comment 3 Trond Eivind Glomsrxd 2000-10-19 16:40:16 UTC
We think it's a glibc issue, and Jakub has hopefully fixed it. glibc building
now, will build postgresql later.

Comment 4 Matt Wilson 2000-10-19 18:06:39 UTC
*** Bug 19327 has been marked as a duplicate of this bug. ***

Comment 5 Matt Wilson 2000-10-19 18:07:56 UTC
Filing bug against glibc

Comment 6 Jakub Jelinek 2000-10-19 19:41:26 UTC
glibc-2.1.95-2 should fix this (at least the stripped down testcase

Comment 7 Trond Eivind Glomsrxd 2000-10-30 18:53:47 UTC
*** Bug 20036 has been marked as a duplicate of this bug. ***