pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Wayne Piekarski <wayne@senet.com.au>
Cc: pgsql-hackers@postgreSQL.org
Subject: [HACKERS] spinlock freeze ?(Re: INSERT/UPDATE waiting (another example))
Date: Thu, 13 May 1999 19:28:49 +0900
Message-ID: <000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp> (raw)
In-Reply-To: <199905101230.WAA15717@helpdesk.senet.com.au>

Hello all,

>
> Hi everyone!
>
>
> Tom Lane Writes:
>
> > Wayne Piekarski <wayne@senet.com.au> writes:
> > > Currently, I start up postmaster with -B 192, which I guess
> puts it below
> > > the value of 256 which causes problems. Apart from when I got past 256
> > > buffers, does the patch fix anything else that might be
> causing problems?
> >

[snip]

>
> Then another one after restarting everything:
>
> ERROR:  cannot open segment 1 of relation sessions_done_id_index
>

I got the same error in my test cases.
I don't understand the cause of this error.

But it seems I found another problem instead.

    spinlock io_in_progress_lock of a buffer page is not
    released by operations called by elog() such as
    ProcReleaseSpins(),ResetBufferPool() etc.

    For example,the error we have encountered probably occured
    in ReadBufferWithBufferLock().
    When elog(ERROR/FATAL) occurs in smgrread/extend() which
    is called from ReadBufferWithBufferLock(),smgrread/extend()
    don't release the io_in_progress_lock spinlock of the page.
    If other transactions get that page as a free Buffer page,those
    transactions wait the release of io_in_progress_lock spinlock
    and would abort with message such as

> FATAL: s_lock(1800d37c) at bufmgr.c:657, stuck spinlock. Aborting.
>
> FATAL: s_lock(1800d37c) at bufmgr.c:657, stuck spinlock. Aborting.

Comments ?

I don't know details about spinlock stuff.
Sorry,if my thought is off the point.

And I have another question.

It seems elog(FATAL) doesn't release allocated buffer pages.
It's OK ?
AFAIC elog(FATAL) causes proc_exit(0) and proc_exit() doesn't
call ResetBufferPool().

Thanks.

Hiroshi Inoue
Inoue@tpf.co.jp




Message-ID: <000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp>
Permalink:  ../000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp/
Also on:    postgresql.org/message-id/000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: Inoue@tpf.co.jp, tgl@sss.pgh.pa.us, wayne@senet.com.au, pgsql-hackers@postgreSQL.org
  Subject: Re: [HACKERS] spinlock freeze ?(Re: INSERT/UPDATE waiting (another example))
  In-Reply-To: <000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp>
  References: <199905101230.WAA15717@helpdesk.senet.com.au> <000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox