Problem with frequent crashes related to semctl

From: Adrian Maier <adrian(dot)maier(at)thalesgroup(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem with frequent crashes related to semctl
Date: 2010-11-05 09:07:05
Message-ID: 22137_1288947903_4CD3C8BF_22137_419_1_4CD3C939.5040608@thalesgroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello !

I am running PostgreSQL 8.3.5 on a linux machine (Ubuntu 10.04).
Sometimes it happens that connecting to the database fails with error :

FATAL: semctl(360458, 3, SETVAL, 0) failed: Invalid argument (PGError)

If i restart postgres the problem gets "fixed". It doesn't matter how do i
connect to the database : i saw this happening from psql, from jdbc, and
from ruby.

The pgsql configuration is the default one : i have changed only
listen_addresses and the port.

However, the machine is configured with some pretty large values for POSIX queues:

fs.mqueue.msgsize_max=2621440
fs.mqueue.msg_max=10240
fs.mqueue.queues_max=10240

Also, the user is unlimited in regards to queues in /etc/security/limits/conf :
am hard msgqueue unlimited

These are needed for another application running on the same machine (which
performs some heavy communication via POSIX queues). I am not sure whether
this can interfere with the semaphores used by postgres ...

Does the situation described above ring any bell for anyone? Any suggestion
about how to analyse deeper the problem ?

I am also aware that the error happened also on another machine (Fedora linux)
that has the same mqueue settings.

Best regards,
Adrian Maier

PS: Here is an example log file :

LOG: database system was shut down at 2010-11-04 16:50:35 EET
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
FATAL: semctl(360458, 6, SETVAL, 0) failed: Invalid argument
FATAL: semctl(360458, 3, SETVAL, 0) failed: Invalid argument
FATAL: semctl(360458, 2, SETVAL, 0) failed: Invalid argument
LOG: received smart shutdown request
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
LOG: semctl(327689, 0, IPC_RMID, ...) failed: Invalid argument
LOG: semctl(360458, 0, IPC_RMID, ...) failed: Invalid argument

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rmd22 2010-11-05 10:36:43 Modfying source code to read tuples before and after UPDATE...how to?
Previous Message Andreas Schmitz 2010-11-05 09:03:32 Re: Cloning database without dump/restore