IpcSemaphoreLock/Unlock and proc_exit on 7.2.6 - Mailing list pgsql-hackers

From Kris Jurka
Subject IpcSemaphoreLock/Unlock and proc_exit on 7.2.6
Date
Msg-id Pine.BSO.4.56.0411132219160.29416@leary.csoft.net
Whole thread Raw
Responses Re: IpcSemaphoreLock/Unlock and proc_exit on 7.2.6  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I have an underpowered server running 7.2.6 that backs a website which
occasionally gets hit by a bunch of traffic and starts firing off "FATAL
1:  Sorry, too many clients already" messages.  This is all as expected,
but sometimes it just crashes.  I had no clue what was going on until I
checked the stderr log (because I had set it up to use syslog).  In there
I find a whole bunch of these:

IpcSemaphoreLock: semop(id=-1) failed: Invalid argument
IpcSemaphoreLock: semop(id=-1) failed: Invalid argument
IpcSemaphoreLock: semop(id=-1) failed: Invalid argument
IpcSemaphoreLock: semop(id=-1) failed: Invalid argument
IpcSemaphoreUnlock: semop(id=-1) failed: Invalid argument
IpcSemaphoreLock: semop(id=-1) failed: Invalid argument
IpcSemaphoreUnlock: semop(id=-1) failed: Invalid argument
IpcSemaphoreLock: semop(id=-1) failed: Invalid argument

Looking at the source I see proc_exit as the failure path for these two 
functions (IpcSemaphoreLock, IpcSemaphoreUnlock).  I've read the comments 
around the code, but must admit that I can't really follow what's going 
on.

Could anyone shed some light on what is going on?  Certainly the semId of 
-1 looks a little suspicious.

This is on freebsd 4.5

Kris Jurka



pgsql-hackers by date:

Previous
From: Travis P
Date:
Subject: Re: CVS should die
Next
From: Chris Albertson
Date:
Subject: Re: [Pgsphere-dev] GIST index concurrency concern