Re: Postgres processes getting stuck (bug?)

From: Ciprian Grigoras <ciprian(dot)grigoras(at)vitals(dot)com>
To: Jerry Sievers <gsievers19(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres processes getting stuck (bug?)
Date: 2016-04-29 19:51:00
Message-ID: CAEgQ-DQGUhdT3Hsvjmk7ic4sJWYLJtm6PDPk8aHGJkz3tQZ6Uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks everyone, it could be that the Linux server is problematic (it's
got a long uptime).
I ran the strace thing,

1. [root(at)box ~]# strace -p 20825
2. Process 20825 attached - interrupt to quit
3. connect(90, {sa_family=AF_FILE, path="/var/centrifydc/daemon2"}, 25

and it kept waiting there with minimal information, nothing else was
shown...

On Fri, Apr 29, 2016 at 2:33 PM, Jerry Sievers <gsievers19(at)comcast(dot)net>
wrote:

> Ciprian Grigoras <ciprian(dot)grigoras(at)vitals(dot)com> writes:
>
> > Hi guys,
> >
> > I had a question. We're running Postgresql 9.0.7 , and all of a sudden
> we started seeing unexpected behavior. One table got locked after we ran
> one simple INSERT on one
> > test item.
> > Nothing else was running against that table as far as we know, and the
> query is frozen there now. After some time we tried to terminate it
> forcefully
> > (pg_terminate_backend), ran that and the return of the command is "true"
> but the query still stays on, shows up on pg_stat_activity etc.
> > Reading from the table is fine, but we believe any other inserts /
> updates are not possible.
>
> What do you get from strace -p $pid?
>
> > Restarting the Postgresql server is not an option at this moment, since
> it's a production box and another high-demand database is running from that.
> >
> > Has anyone seen a similar issue (maybe a bug in the 9.0 version ?) where
> simple statements don't finish and get locked there and can't be killed by
> the
> > pg_terminate_backed ? What is the cause of this ?
> > Any reasonable way to find out more details on what caused this, how to
> prevent it in the future, and how it can be fixed sensitively now ? Thanks !
> >
> > just fyi, checking the data in the "pg_locks" (for that process that is
> frozen), shows a bunch of rows all with the same virtualtransactionid. Only
> one of them has the
> > mode of "ExclusiveLock" (the only record there with a locktype of
> "virtualxid"), a few have the "RowExclusiveLock" mode and the vast majority
> have the "AccessShareLock"
> > mode.
> >
> > Thanks,
> > Ciprian
> >
>
> --
> Jerry Sievers
> Postgres DBA/Development Consulting
> e: postgres(dot)consulting(at)comcast(dot)net
> p: 312.241.7800
>

--

[image: Description: vitals_logo_150.png]

*Ciprian Grigoras*

*Software Engineer *
*Vitals* | 160 Chubb Avenue, Suite 301, Lyndhurst, NJ 07071, USA

P : 201.459.6275 | M : 845.517.8710

http://www.vitals.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John McKown 2016-04-29 19:56:04 Re: Allow disabling folding of unquoted identifiers to lowercase
Previous Message Adrian Klaver 2016-04-29 19:47:25 Re: Primary Keys