Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK7It-0006tG-MR for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Nov 2017 18:41:51 +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 1eK7Is-0000Lr-Fn for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Nov 2017 18:41:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eK7Is-0000Li-3I for pgsql-bugs@lists.postgresql.org; Wed, 29 Nov 2017 18:41:50 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eK7Io-0008Ke-JS for pgsql-bugs@lists.postgresql.org; Wed, 29 Nov 2017 18:41:49 +0000 Received: by mail-wm0-x230.google.com with SMTP id 64so7890639wme.3 for ; Wed, 29 Nov 2017 10:41:46 -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=cUmDWl7yUVlFtrmc6rmaYytQF+UeK4OA5Kn7+smTdmw=; b=z8kwmBQFWD2HC3SpolU1ItIR1UX6ZYN2tYd456dphzH4iYEsxzE/djVjo6pulS4mwx HEfWzQsxOp/5+80NTbT7YXGrZAawiYdNi4KfbxUJmiWG5B2Js3B332+eIl8rMcWEnSWP tmhMXOqxkd/DK9htcOmJh2Mu8IKnOcG3t93w9Mt+5HOEOOxfQxF4uNg/kyMhTTAxWwTk cB+VZWBHBWUjcXCdgusDMQgBb3s4xlv/eXuVN65oiBCQuyuoegaIoCmOB8MN5aH6F5JQ S8rsu1muQ+QiXi8L4fhGNqOKmV/yJVNBkJp5HrAwPy1fFXR5WDDpR+CxGJRGDTL3RKub jUBQ== 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=cUmDWl7yUVlFtrmc6rmaYytQF+UeK4OA5Kn7+smTdmw=; b=GfV0NTmKOodqz+P+K2VxceFbaXOEyPZobTuJp0Nb1jf25YX+3IHdB4qlmSnB80jl8N pBivWdcmXq+1f71i/JWZ53BR2Bymq3Mffpl04dBOqEBhzv4r44vvmGUXaMIJEfbsQnJU EPL2FT5ccOMCuSLfOsIguRZFhWlvrfq9+JyAvm8tr5D7n94hi+6+Hhrun9jpHz9bR1nO HRM8DdYq7ZdnG/g+oLTM21UR40LmBhAnYGJSXA4M5EqoxP+Utq0XBTeoHE8zSE/Nfu/B dzbI3JkDACFpPOqIs2JWDhEmrxNNC3khACAc361lpGtN/7M1qkZA6Q3wJXWeoYdUUZOn ZM5w== X-Gm-Message-State: AJaThX5MujxI9dsWI6jv+dOgoKtuHUms9ayXnrfbN4PmUtNkHVQge/rh YhY0PvO/w3B7QwN3ICcg7H/oO7+2CKc8BjZuzLMggHw4WxIewU8jRl7qvCOu45xWJ5aTcpz4nPn hNdB56KeNwi+uHAke3jnK+jufa0pHMN1KlyOWcsI/h8ikCGkjKiS8+RYQ4/hL08Fo8E+maqts/w k8EIJK48ZXY4ZY X-Google-Smtp-Source: AGs4zMbcqBwnK9fFKwkdL+cFpYhwR8RAglSSeiPjBhZtk6yoHOsy1/k2Xd9IJZLxDviAxI5wJZqS3Q== X-Received: by 10.80.142.178 with SMTP id w47mr9350263edw.251.1511980904821; Wed, 29 Nov 2017 10:41:44 -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 j3sm2031183edh.55.2017.11.29.10.41.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 10:41:43 -0800 (PST) Subject: Re: BUG in 10.1 - dsa_area could not attach to a segment that has been freed To: Alexander Voytsekhovskyy Cc: Amit Kapila , pgsql-bugs@lists.postgresql.org References: <5426a66a-c722-6a34-2de2-275c774345aa@2ndquadrant.com> From: Tomas Vondra Message-ID: <46967194-cbb1-9a94-e39d-503c7c2ed417@2ndquadrant.com> Date: Wed, 29 Nov 2017 19:41:39 +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 05:23 PM, Alexander Voytsekhovskyy wrote: > thanks for detailed instructions! > > Here it is: > > Note: breakpoint 1 also set at pc 0x5560252c21f5. > Breakpoint 2 at 0x5560252c21f5: file > /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/utils/mmgr/dsa.c, > line 1736. > (gdb) bt > #0  0x00007f53e538e9b3 in __epoll_wait_nocancel () at > ../sysdeps/unix/syscall-template.S:84 > #1  0x000055602516a791 in WaitEventSetWaitBlock (nevents=1, > occurred_events=0x7ffc2849a460, cur_timeout=-1, set=0x556026359498) at > /build/postgresql-10-qAeTPy/postgresql-10-10.1/build/../src/backend/storage/ipc/latch.c:1048 Unfortunately, that's still not it. This shows the backtrace at the moment when gdb attached to the process (because it interrupts the exectution). You need to do "c" first, to continue the execution. So it should be: 1) gdb -p $PID 2) (gdb) handle SIGUSR1 noprint nostop 3) (gdb) break dsa.c:1736 4) (gdb) c 5) run the query, gdb should interrupt at the breakpoint 6) (gdb) bt regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services