pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Differentiated Software Solutions Pvt. Ltd. <diffs@vsnl.com>
To: pgsql-general@postgresql.org
To: vadim@krs.ru
To: pgsql-interfaces@postgresql.org
Cc: Kimi <kimi@intercept.co.in>
Subject: Spin lock error
Date: Sat, 11 Dec 1999 12:33:31 +0530
Message-ID: <001901bf43a6$16f12dc0$dcbec5cb@nagma> (raw)

Hi,

We are getting spinlock errors under the following conditions

Background :
We have developed a high performance application using postgres database ( a
3rd party application server).
This application should be scalanble to server 50 requests a second.
Application is written in perl 5.005 using DBI-1.12, DBD-Pg 0.92 and Redhat
linux 6.0
A request consists of one singleton select on a table of 200,000 rows on
it's primary key, a heavy duty cursor which is a 4 table join but which
returns 100 rows from tables containing maximum of 250 rows, a light sql
opening a cursor on a table containing 500 rows, 2 inserts into tables which
don't have primary key.

We are connecting to the database with autoconnect off.

Problem description :
On a light load there are no problems. As we have increased the load on the
application, the requests get piled up. We keep monitoring the requests
getting piled up using ps ax +AHw- grep post.
Somewhere when the requests crosses 20(ps returns more than 20 rows)....
suddenly postmaster comes down +ACEAIQ- In the server log the following message is
written out.
FATAL: s+AF8-lock(4000b011) at spin.c:125, stuck spinlock. Aborting.

FATAL: s+AF8-lock(4000b011) at spin.c:125, stuck spinlock. Aborting.

FATAL: s+AF8-lock(4000b011) at spin.c:125, stuck spinlock. Aborting.

FATAL: s+AF8-lock(4000b011) at spin.c:125, stuck spinlock. Aborting.

FATAL: s+AF8-lock(40179f44) at bufmgr.c:490, stuck spinlock. Aborting.
After this postmaster shutdown.

One observation If we try to recreate this in another linux machine...
multiple postmasters run in the linux machine when the number of requests
become more.
I'm also attaching a file containing 'ps' at the instance postmaster
crashed.

Can anybody please help

Thanks and regards,

Murali

Differentiated Software Solutions Pvt. Ltd.,
176, Gr. Floor, 6th Main
2nd Block RT Nagar
Bangalore - 560 032
India
Ph: 91 80 3431470

Attachments:

ps.txt (text/plain, 3.6K) download 6155 p0 S 0:00 grep post 4957 p2 S 0:00 /usr/local/bin/postmaster -i -p 5433 5992 p2 R 0:01 /usr/local/bin/postgres localhost postgres websight COPY 6009 p2 S 0:01 /usr/local/bin/postgres localhost postgres adcept commit 6020 p2 S 0:01 /usr/local/bin/postgres localhost postgres adcept SELECT 6024 p2 S 0:01 /usr/local/bin/postgres localhost postgres adcept SELECT 6038 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6051 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept commit 6062 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6072 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6076 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6077 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept idle 6078 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6110 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6112 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6122 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6137 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6141 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6147 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6149 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept idle 6151 p2 R 0:00 /usr/local/bin/postmaster -i 6165 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6172 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 6184 p2 R 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 20964 p6 S 0:00 su - postgres 23112 p4 S 0:00 su - postgres 27664 p2 R 0:03 /usr/local/bin/postmaster -i bash: /bin/ps: Too many open files in system 4957 p2 S 0:00 /usr/local/bin/postmaster -i -p 5433 8952 p2 S 0:01 /usr/local/bin/postgres localhost postgres adcept idle 8958 p2 S 0:01 /usr/local/bin/postgres localhost postgres adcept idle 8981 p2 S 0:00 /usr/local/bin/postgres localhost postgres websight idle 8984 p2 S 0:01 /usr/local/bin/postgres localhost postgres adcept SELECT 9012 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9013 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept idle 9052 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9054 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9066 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9071 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept idle 9077 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9082 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9083 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9097 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9119 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9127 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9128 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9149 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept SELECT 9155 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept idle 9156 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept idle 9158 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept idle 9159 p2 S 0:00 /usr/local/bin/postgres localhost postgres adcept idle 20964 p6 S 0:00 su - postgres 23112 p4 S 0:00 su - postgres

Message-ID: <001901bf43a6$16f12dc0$dcbec5cb@nagma>
Permalink:  ../001901bf43a6$16f12dc0$dcbec5cb@nagma/
Also on:    postgresql.org/message-id/001901bf43a6$16f12dc0$dcbec5cb@nagma

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: diffs@vsnl.com, pgsql-general@postgresql.org, vadim@krs.ru, kimi@intercept.co.in
  Subject: Re: Spin lock error
  In-Reply-To: <001901bf43a6$16f12dc0$dcbec5cb@nagma>

* 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