Re: [HACKERS] pgbench stuck with 100% cpu usage - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: [HACKERS] pgbench stuck with 100% cpu usage
Date
Msg-id CABOikdPRT+-hCYKx8176+_cpiTO_MY=P_yEjiLkdQRRkyu1r2Q@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pgbench stuck with 100% cpu usage  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [HACKERS] pgbench stuck with 100% cpu usage
List pgsql-hackers


On Fri, Sep 29, 2017 at 1:03 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:

The commit that introduced this code is 12788ae49e1933f463bc. So I amn
copying Heikki.

AFAICR the commit was mostly a heavy restructuring of previous unmaintainable spaghetti code. I'm not sure the problem was not there before under one form or another.

I agree that it should error out & stop the client in this case at least.

Here is a probable "fix", which does was the comment said should be done.


Looks good to me.
 
I could not trigger an infinite loop with various kill -9 and other quick stops. Could you try it on your side?


Ok, I will try. But TBH I did not try to reproduce that either and I am not sure if I can. I discovered the problem when my laptop's battery started draining out much more quickly. Having seen the problem, it seems very obvious though.

Thanks,
Pavan

--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: [HACKERS] pgbench stuck with 100% cpu usage
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple