From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dmitriy Sarafannikov <dimon99901@mail.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Re: [BUGS] Segfault in MemoryContextAlloc
Date: Fri, 11 Mar 2016 09:42:07 -0500
Message-ID: <1409.1457707327@sss.pgh.pa.us> (raw)
In-Reply-To: <1457701413.865304335@f395.i.mail.ru>
References: <1453890275.241158212@f404.i.mail.ru>
<1453891638.831641165@f352.i.mail.ru>
<31612.1454801878@sss.pgh.pa.us>
<1457701413.865304335@f395.i.mail.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
=?UTF-8?B?RG1pdHJpeSBTYXJhZmFubmlrb3Y=?= <dimon99901@mail.ru> writes:
>> Both this and the other behavior you reported sure seem like "can't
>> happen" situations. I do have a theory though: I think you are doing
>> something that is spawning multiple threads inside the backend, and then
>> the backend logic goes nuts because it's expecting to be single-threaded.
> I caught another segfault, which is similar to previous.
Uh, well:
> (gdb) info threads
> Id Target Id Frame
> 2 Thread 0x7f0e329d2740 (LWP 46202) 0x00007f0e305e972b in __libc_recv (fd=13, buf=buf@entry=0x7f0e32a1b140 <PqRecvBuffer>, n=n@entry=8192, flags=-1, flags@entry=0)
> at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
> * 1 Thread 0x7f0e32820700 (LWP 46918) MemoryContextAlloc (context=0x0, size=120) at /build/postgresql-9.4-1wOG_M/postgresql-9.4-9.4.6/build/../src/backend/utils/mmgr/mcxt.c:584
There's not enough information here to disclose what it is that's creating
a second thread, but you need to find that and make it stop.
regards, tom lane
--
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: tgl@sss.pgh.pa.us, dimon99901@mail.ru, andres@anarazel.de
Subject: Re: [BUGS] Segfault in MemoryContextAlloc
In-Reply-To: <1409.1457707327@sss.pgh.pa.us>
References: <1453890275.241158212@f404.i.mail.ru> <1453891638.831641165@f352.i.mail.ru> <31612.1454801878@sss.pgh.pa.us> <1457701413.865304335@f395.i.mail.ru> <1409.1457707327@sss.pgh.pa.us>
* 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