From: amdecreme@airfrance.fr
To: pgsql-bugs@postgresql.org
Subject: BUG #14261: Hanged randomly in hash_seq_search
Date: Tue, 19 Jul 2016 14:35:20 +0000
Message-ID: <20160719143520.7438.73745@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14261
Logged by: Amaury Decreme
Email address: amdecreme@airfrance.fr
PostgreSQL version: 9.4.1
Operating system: Red Hat Enterprise Linux Server release 6.6
Description:
Hello,
When I execute the following request around 10-50 times in a row, postgres
hangs randomly on the connection. New connections are still working.
The CPU peaks at 100% and the process needs to be SIGKILLed. SIGTERM is not
treated.
The request is:
SELECT * FROM MEASURE_FLAT_H
INNER JOIN (
SELECT max(dt) as dtmax FROM MEASURE_FLAT_H WHERE (ASSETS_NAME = ?) AND
(METRIC_NAME = ?)
) d ON (D.DTMAX = DT)
WHERE (ASSETS_NAME = ?) AND (METRIC_NAME = ?)
At this step, no lock is found in pg_locks.
The process can be found stuck in the hash_seq_search().
Call stack:
#0 0x000000000075e919 in hash_seq_search ()
#1 0x00007fd0af74fb2b in pgqs_entry_dealloc ()
from /tech/postgres/9.4.1/server/lib/pg_qualstats.so
#2 0x00007fd0af750a15 in pgqs_ExecutorEnd ()
from /tech/postgres/9.4.1/server/lib/pg_qualstats.so
#3 0x000000000055dade in PortalCleanup ()
#4 0x000000000077438a in PortalDrop ()
#5 0x000000000077472a in PreCommit_Portals ()
#6 0x00000000004b36ec in CommitTransaction ()
#7 0x00000000004b4ab5 in CommitTransactionCommand ()
#8 0x000000000067a269 in finish_xact_command ()
#9 0x000000000067d685 in PostgresMain ()
#10 0x000000000062c246 in PostmasterMain ()
#11 0x00000000005c4ab8 in main ()
Each time, I've seen the process looping infinitely from 75e910 to 75e927:
0x000000000075e910 <+96>: mov (%r9,%rcx,8),%rax
0x000000000075e914 <+100>: test %rax,%rax
0x000000000075e917 <+103>: jne 0x75e93c <hash_seq_search+140>
0x000000000075e919 <+105>: add $0x1,%edx
---Type <return> to continue, or q <return> to quit---
=> 0x000000000075e91c <+108>: cmp %edx,%esi
0x000000000075e91e <+110>: jb 0x75e958 <hash_seq_search+168>
0x000000000075e920 <+112>: add $0x1,%rcx
0x000000000075e924 <+116>: cmp %rcx,%r8
0x000000000075e927 <+119>: jg 0x75e910 <hash_seq_search+96>
(I know 9.4.1 is not the last minor release for 9.4 but I didn't find this
bug reported for the >=9.4 majors)
Do you have an idea of what is causing this strange issue ?
Best regards,
Amaury
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: amdecreme@airfrance.fr
Subject: Re: BUG #14261: Hanged randomly in hash_seq_search
In-Reply-To: <20160719143520.7438.73745@wrigleys.postgresql.org>
References: <20160719143520.7438.73745@wrigleys.postgresql.org>
* 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