Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA28040 for ; Thu, 13 May 1999 06:25:27 -0400 (EDT) (envelope-from Inoue@tpf.co.jp) Received: from cadzone ([126.0.1.40] (may be forged)) by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id TAA00386; Thu, 13 May 1999 19:24:32 +0900 From: "Hiroshi Inoue" To: "Tom Lane" , "Wayne Piekarski" Cc: 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> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <199905101230.WAA15717@helpdesk.senet.com.au> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Importance: Normal Hello all, > > Hi everyone! > > > Tom Lane Writes: > > > Wayne Piekarski 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