Re: BUG #3242: FATAL: could not unlock semaphore: error code 298

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Marcin Waldowski <M(dot)Waldowski(at)sulechow(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG #3242: FATAL: could not unlock semaphore: error code 298
Date: 2007-04-20 08:12:14
Message-ID: 20070420081214.GB9033@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marcin Waldowski 2007-04-20 08:41:59 Re: BUG #3242: FATAL: could not unlock semaphore: error code 298
Previous Message Marcin Waldowski 2007-04-20 08:09:39 Re: BUG #3242: FATAL: could not unlock semaphore: error code 298

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas ADI SD 2007-04-20 08:16:15 Re: [HACKERS] Full page writes improvement, code update
Previous Message Marcin Waldowski 2007-04-20 08:09:39 Re: BUG #3242: FATAL: could not unlock semaphore: error code 298