Re: Problem with locks - Mailing list pgsql-hackers

From Stefan Kaltenbrunner
Subject Re: Problem with locks
Date
Msg-id 46BF1540.9010009@madness.at
Whole thread Raw
In response to Re: Problem with locks  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark wrote:
> "Gregory Stark" <stark@enterprisedb.com> writes:
> 
>> "Gregory Stark" <stark@enterprisedb.com> writes:
>>
>>> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>>>
>>>> Gregory Stark <stark@enterprisedb.com> writes:
>>>>> We're seeing a problem where occasionally a process appears to be granted a
>>>>> lock but miss its semaphore signal.
>>>> Kernel bug maybe?  What's the platform?
> 
> I've written a synthetic test program to check for lost semaphore wakeups. I
> can't seem to produce any on my machine but haven't had a chance to run it yet
> on the benchmark machine that's been showing the problem.
> 
> If I can't produce any lost wakeups with a program like this it looks more
> like it might be a Postgres or GCC bug than a Linux bug.
> 
> It would be helpful if people could run this on various architectures and
> various versions of Linux (or other OSes). I've been running it with 40
> processes for an hour, but even shorter runs would be useful. It will drive
> the load on your machine through the roof but doesn't cause any i/o.

doesn't work on OpenBSD:

$ gcc -o ipctest ipctest.c -lpthread
$ ./ipctest 40 3600
running with 40 processes for 3600s
sem_init: Operation not permitted


"This implementation does not support shared semaphores, and reports
this fact by setting errno to EPERM.  This is perhaps a stretch of the
intention of POSIX, but is compliant, with the caveat that sem_init()
always reports a permissions error when an attempt to create a shared
semaphore is made."


Stefan


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Problem with locks
Next
From: Peter Eisentraut
Date:
Subject: Re: proper way to fix information_schema.key_column_usage view