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gPj05LjQgbWFqb3JzKQ0K
DQpEbyB5b3UgaGF2ZSBhbiBpZGVhIG9mIHdoYXQgaXMgY2F1c2luZyB0aGlz
IHN0cmFuZ2UgaXNzdWUgPw0KDQoNCkJlc3QgcmVnYXJkcywNCg0KQW1hdXJ5
Cgo=

Re: BUG #14261: Hanged randomly in hash_seq_search

From
Tom Lane
Date:
amdecreme@airfrance.fr writes:
> 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 ()

I do not know what pg_qualstats.so is, but it's certainly not part of the
PG core distribution.  I suggest asking its author(s) about known bugs
in their code ...

            regards, tom lane

Re: BUG #14261: Hanged randomly in hash_seq_search

From
Julien Rouhaud
Date:
On 19/07/2016 18:58, Tom Lane wrote:
> amdecreme@airfrance.fr writes:
>> 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 ()
>
> I do not know what pg_qualstats.so is, but it's certainly not part of the
> PG core distribution.  I suggest asking its author(s) about known bugs
> in their code ...
>

Culprit here, and unfortunately that's not a bug that've already been
reported.

Amaury, could you instead send a bug report on
https://github.com/dalibo/pg_qualstats/issues ?

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org

Re: BUG #14261: Hanged randomly in hash_seq_search

From
"Amaury Decreme"
Date: