Re: [BUGS] BUG #3242: FATAL: could not unlock semaphore: error code 298 - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [BUGS] BUG #3242: FATAL: could not unlock semaphore: error code 298
Date
Msg-id 20070420081214.GB9033@svr2.hagander.net
Whole thread Raw
In response to Re: [BUGS] BUG #3242: FATAL: could not unlock semaphore: error code 298  (Marcin Waldowski <M.Waldowski@sulechow.net>)
Responses Re: [BUGS] BUG #3242: FATAL: could not unlock semaphore: error code 298  (Marcin Waldowski <M.Waldowski@sulechow.net>)
List pgsql-hackers
On Fri, Apr 20, 2007 at 10:09:39AM +0200, Marcin Waldowski wrote:
> Magnus Hagander wrote:
> >I've looked at the code there, and can't find a clear problem. One way it
> >could happen is if the actual PGSemaphoreUnlock() is called once more than
> >needed. 
> >
> >CC:ing to hackers for this question:
> >
> >Any chance that's happening? If this happens with SysV semaphores, will
> >they error out, or just say it was done and do nothing? (meaning should we
> >actuallyi be ignoring this error on windows?)
> >  
> 
> Hmm, PGSemaphoreUnlock() actually ignore this error, only log that it 
> happens.

No. It does ereport(FATAL) which terminates the backend.


> As I mentioned previously after it happens others connections 
> were hung on update operations. What is strange we cannot reproduce this 
> problem on Linux. But we can do this on Windows. What another 
> information should we provide?

Doesn't the postmaster restart all other backends due to the FATAL error?
Are you saying that you can no longer make new connections to the server,
or is the problem coming from that the aplpication doesn't like that the
server kicked out all connections?

If you can produce a self-contained test-case, that would certainly make
debugging a lot easier. So if it's possible - but I realise that might not
be easy for a problem like this :-)

//Magnus



pgsql-hackers by date:

Previous
From: Marcin Waldowski
Date:
Subject: Re: [BUGS] BUG #3242: FATAL: could not unlock semaphore: error code 298
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: [PATCHES] Full page writes improvement, code update