Red Hat Bugzilla – Bug 19199
Postgresql Won't start on Alpha
Last modified: 2007-04-18 12:29:22 EDT
[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  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  FATAL 1: InitProcGlobal: IpcSemaphoreCreate
Matt, any ideas?
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
I have to leave this one open
But at least chased down to a point that someone else can follow on from
We think it's a glibc issue, and Jakub has hopefully fixed it. glibc building
now, will build postgresql later.
*** Bug 19327 has been marked as a duplicate of this bug. ***
Filing bug against glibc
glibc-2.1.95-2 should fix this (at least the stripped down testcase
*** Bug 20036 has been marked as a duplicate of this bug. ***