Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK4oS-0006ZB-QL for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Nov 2017 16:02:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK4oS-0001lT-Da for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Nov 2017 16:02:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eK4oS-0001lK-4x for pgsql-bugs@lists.postgresql.org; Wed, 29 Nov 2017 16:02:16 +0000 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eK4oK-0006ua-FG for pgsql-bugs@lists.postgresql.org; Wed, 29 Nov 2017 16:02:14 +0000 Received: by mail-wr0-x22f.google.com with SMTP id l22so3843718wrc.11 for ; Wed, 29 Nov 2017 08:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LocpENZqply/6+N9UdFLDcep9RpwAqvwwn8W0p5tGjY=; b=yhfzRQbFxNlyiTJTYs+Dl8+AAs12Dt2gPZvsidGv8yqIq6xhqWTO9N1oiw3m3Twrmp lWxnL5GiVZ3722Bf3cXelKRN/pU3OO4yxrNRhtwfDPq6pjHExdH76liEywXnVi62yXP9 YpiubrU2H4tz/YKKpXc6csQoQloyFmdmzJj2ptCr3uhg4na7J2rJz/LvJxJT9mMx5EAe ufQ8gAtFysYsINZB0UUmfj2TPh+FfDF2TD1CbvQvUjHlx73WXfGIo6ZPc1RZQgkCsMi5 s739WXTLWrMxZYqbG8J1ud8+fTrjQgEKSj+U3Lhvj2/HtK1+hwxFKdagcL913oYfeqkO H/Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LocpENZqply/6+N9UdFLDcep9RpwAqvwwn8W0p5tGjY=; b=Tl/mSlI19gTpBBRulKbTkAqsM82pHhthAXFUwcZuTxMcOg+phIRYTM/LSjB0YvK4i9 6HreL3XegD+Q0PjGbzs/MZP7tT7HHI6YTE/qwK+8i8cSZnnhzHKHpfC7WXFBU2luueY5 3sNPsvnjpQHLyFZnbiz8DsU1++vhYSTmNXEXmc0Jgi7p9rRoEPk6QVv3A10jcWwPxviC GhXMy6jHGJdGWuDCRmaltpx2M+ZNQ0BLafMf6mb9D32RZu5Gknd4+TNKy70z6V/Ktayy 7/VsPALOSszJc+1E8wSd9LKW3Es3/iMohZf/2oOk4qwkBGbXvHuCE3SOi7Mbe8B7SRnX RHGQ== X-Gm-Message-State: AJaThX7Ashfk68LosS/oG0+x6g71X5Ftgg45Mh/oE/uEoPO/sxINY94H AdPlUMHPOGQu/XOxMToJCHm5slKNT3e389zqW1y/7D9NcA1jwcBd4uSb1wBYQF0Gdrt/ejzkWQ+ i9/rcDmnH+sURXd7249k86dnjbBv4WpmOwRADzxsRc5rVagWV8ImAUavKs4RSgb0Fvkhyr4XZJF RE0dVa8M9ubNOk X-Google-Smtp-Source: AGs4zMar6FCfiWCAeRHJYmC3migESWKsGNAkwXA3ND1N0UDOqx84sJpVBm9ZD6YYu9jJC/rAStU4WA== X-Received: by 10.223.168.23 with SMTP id l23mr2814926wrc.15.1511971325974; Wed, 29 Nov 2017 08:02:05 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id 26sm2727915wrw.19.2017.11.29.08.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 08:02:05 -0800 (PST) Subject: Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed To: Alexander Voytsekhovskyy , Amit Kapila Cc: pgsql-bugs@lists.postgresql.org References: From: Tomas Vondra Message-ID: <5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com> Date: Wed, 29 Nov 2017 17:02:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/29/2017 04:46 PM, Alexander Voytsekhovskyy wrote: > I see my fault > > here is GDB with correct symbols > > Program received signal SIGUSR1, User defined signal 1. > pagetable_insert (found=, key=8192, tb= out>) at > /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/lib/simplehash.h:540 > 540    >  /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/include/lib/simplehash.h: > No such file or directory. > Continuing. > I think you really need to do "handle SIGUSR1 noprint nostop" to eliminate the SIGUSR1 noise. That is absolutely irrelevant to the issue you're trying to investigate. Furthermore, this does not give us any sort of stack trace. You need to either set a breakpoint at the elog() call, which I believe is this one: https://github.com/postgres/postgres/blob/REL_10_STABLE/src/backend/utils/mmgr/dsa.c#L1736 wait for it to get triggered, and then generate backtrace using 'bt'. So something like 1) gdb -p $PID 2) (gdb) handle SIGUSR1 noprint nostop 3) (gdb) break dsa.c:1736 4) run the query, gdb should interrupt at the breakpoint 5) (gdb) bt and then send us the output of that gdb command. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services