Re: IpcSemaphoreKill: ...) failed: Invalid argument

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: IpcSemaphoreKill: ...) failed: Invalid argument
Date: 2003-02-17 15:21:58
Message-ID: 8637.1045495318@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christoph Haller <ch(at)rodos(dot)fzk(dot)de> writes:
> I've seen this (see below) in the postmaster's log-file.
> I doubt this is normal behaviour.
> I'm using PostgreSQL 7.2.3 on hppa-hp-hpux10.20, compiled by GCC 2.95.2
> Does anybody know what may cause calls to semctl resp. shmctl
> (semaphore control resp. shared memory control) to fail?

FWIW, I do all my Postgres development on HPUX 10.20 with gcc, and I've
never seen anything like this.

> ZeroProcSemaphore: semctl(id=2450,SETVAL) failed: Invalid argument
> DEBUG: server process (pid 10237) exited with exit code 255
> DEBUG: terminating any other active server processes
> DEBUG: all server processes terminated; reinitializing shared memory
> and semaphores
> IpcSemaphoreKill: semctl(707088, 0, IPC_RMID, ...) failed: Invalid
> argument
> IpcSemaphoreKill: semctl(2449, 0, IPC_RMID, ...) failed: Invalid
> argument
> IpcSemaphoreKill: semctl(2450, 0, IPC_RMID, ...) failed: Invalid
> argument
> IpcMemoryDelete: shmctl(312410, 0, 0) failed: Invalid argument

This is a fairly spectacular failure :-(. As far as I can see from the
semctl and shmctl man pages, the only plausible reason for EINVAL is
that something had deleted the semaphores and shared memory out from
under Postgres. I do not believe that Postgres itself could have done
that --- it had to be some external agency. Unless the kernel is
broken, whatever requested those deletions had to be running as root or
as postgres in order to have the necessary permissions. You sure you
didn't have some loose-cannon script running around issuing ipcrm
commands?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Haller 2003-02-17 15:36:57 Re: IpcSemaphoreKill: ...) failed: Invalid argument
Previous Message Tom Lane 2003-02-17 15:04:05 Re: Questions about indexes?