Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr5Yn-0007gl-6o for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Feb 2019 18:35:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gr5Yk-0002pL-EE for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Feb 2019 18:35:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr5Yj-0002ml-UP for pgsql-hackers@lists.postgresql.org; Tue, 05 Feb 2019 18:35:02 +0000 Received: from mail-it1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr5Yg-00038g-Bz for pgsql-hackers@postgresql.org; Tue, 05 Feb 2019 18:35:00 +0000 Received: by mail-it1-x12c.google.com with SMTP id c9so10818389itj.1 for ; Tue, 05 Feb 2019 10:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Qter3nDwEuv++9QlWh9G1Pik/NaH0KqXPMrKLIyH3Mo=; b=IBAa5LA9wH0yart8hyAsL2/ZoBnyBiDlYyimFe17bHCly4f9wqsRFT9ZnEDCq2dUgX 9Ktb0qq07YSsuRZbZpdrhPdsTujx+sT3st9M2mljFD5kBlZW39gQmysC4taVlKCBEWCs vfajiCQt9P2KlZyPCxsvnz4ISiU9boQcvwlmUUTXiXZTffESQgeq2zvtJr7E+QvtXZak oUCK2oEUSSVz+FszEi/KhafdLQtJMC+Mc4rW5cBmORazrvw6FNSCOSG9gFNWl3A5Nybb jxgmS7LgzxNMLb+SBNcIAveEsjGLmDlXpW4m9ioqFvNqP/88jWV1n3k+xLHfUIA7zKs3 BFqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Qter3nDwEuv++9QlWh9G1Pik/NaH0KqXPMrKLIyH3Mo=; b=Iyknv5aQDpZP1GT2Rs5WiRfFU5sohW+QINS3Fnkcnwg1C473nITuKdCCg6emrhebZt Sg24FeUwRWprZqbdtZyRf71+In4geXT4B/ozxDaPLaJ6ri19r0YVMSwIa7gPRIHh1RbS 26YGbabgEKuGvjNX5OKaavyceVpIEPJXfYM8RDBLiT7QYztg5YlmsatJbqofER90USFW cSRT6yvzR82mvYT9lgrKffzfqJw6ZzqJhzEs+w407DoFZOhbM+dnIp7/9ee+EO9HrHZ/ I7z7q7Vfsqc7emvOipLsrylV8BJgqct736AaY1vUlFGd1UFP/faMMrCsuaWxNSKy55wF l0vg== X-Gm-Message-State: AHQUAubgO+PqgBHGL2p6h2sB25rNj2CYwBWws9R70dUGOLyCN92WpyqH yK8K36dA5NoJq/XrOUA+444epg== X-Google-Smtp-Source: AHgI3IbM9cX/2RRgZv6BZhDdJhmeCT1QuLIIqpQm90Zor+ZueVu3htErN0KAaeQdqBb06eS5xODE2Q== X-Received: by 2002:a02:844:: with SMTP id 65mr3445053jac.133.1549391697262; Tue, 05 Feb 2019 10:34:57 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id c21sm1663930iob.22.2019.02.05.10.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 10:34:56 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id ACD29800825; Tue, 5 Feb 2019 12:34:54 -0600 (CST) Date: Tue, 5 Feb 2019 12:34:54 -0600 From: Justin Pryzby To: pgsql-hackers@postgresql.org Cc: Thomas Munro Subject: Re: pg11.1: dsa_area could not attach to segment Message-ID: <20190205183454.GS29720@telsasoft.com> References: <20181231221734.GB25379@telsasoft.com> <20190205163509.GM29720@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190205163509.GM29720@telsasoft.com> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk And here's the "dsa_allocate could not find %zu free pages" error with core. @@ -726,5 +728,5 @@ dsa_allocate_extended(dsa_area *area, size_t size, int flags) */ - if (!FreePageManagerGet(segment_map->fpm, npages, &first_page)) - elog(FATAL, - "dsa_allocate could not find %zu free pages", npages); + assert (FreePageManagerGet(segment_map->fpm, npages, &first_page)); + + // if (!FreePageManagerGet(segment_map->fpm, npages, &first_page)) elog(PANIC, "dsa_allocate could not find %zu free pages", npages); LWLockRelease(DSA_AREA_LOCK(area)); < 2019-02-05 13:23:29.137 EST >LOG: background worker "parallel worker" (PID 7140) was terminated by signal 6: Aborted < 2019-02-05 13:23:29.137 EST >DETAIL: Failed process was running: explain analyze SELECT * FROM eric_enodeb_metrics WHERE start_time>='2017-10-01' AND (site_id<1900 OR site_id>2700) #0 0x00000037b9c32495 in raise () from /lib64/libc.so.6 #1 0x00000037b9c33c75 in abort () from /lib64/libc.so.6 #2 0x00000037b9c2b60e in __assert_fail_base () from /lib64/libc.so.6 #3 0x00000037b9c2b6d0 in __assert_fail () from /lib64/libc.so.6 #4 0x00000000008c6f74 in dsa_allocate_extended (area=0x27c05e0, size=393220, flags=5) at dsa.c:729 #5 0x000000000068521f in pagetable_allocate (pagetable=, size=) at tidbitmap.c:1511 #6 0x00000000006876d2 in pagetable_grow (tbm=0x7f84a8d86a58, pageno=1635) at ../../../src/include/lib/simplehash.h:383 #7 pagetable_insert (tbm=0x7f84a8d86a58, pageno=1635) at ../../../src/include/lib/simplehash.h:508 #8 tbm_get_pageentry (tbm=0x7f84a8d86a58, pageno=1635) at tidbitmap.c:1225 #9 0x0000000000687c50 in tbm_add_tuples (tbm=0x7f84a8d86a58, tids=, ntids=1, recheck=false) at tidbitmap.c:405 #10 0x00000000004e43df in btgetbitmap (scan=0x2829fa8, tbm=0x7f84a8d86a58) at nbtree.c:332 #11 0x00000000004d8a91 in index_getbitmap (scan=0x2829fa8, bitmap=) at indexam.c:726 #12 0x0000000000647c98 in MultiExecBitmapIndexScan (node=0x2829720) at nodeBitmapIndexscan.c:104 #13 0x0000000000646078 in MultiExecBitmapOr (node=0x28046e8) at nodeBitmapOr.c:153 #14 0x0000000000646afd in BitmapHeapNext (node=0x2828db8) at nodeBitmapHeapscan.c:145 #15 0x000000000063a550 in ExecScanFetch (node=0x2828db8, accessMtd=0x6469e0 , recheckMtd=0x646740 ) at execScan.c:95 #16 ExecScan (node=0x2828db8, accessMtd=0x6469e0 , recheckMtd=0x646740 ) at execScan.c:162 #17 0x0000000000638ce0 in ExecProcNodeInstr (node=0x2828db8) at execProcnode.c:461 #18 0x00000000006414fc in ExecProcNode (pstate=) at ../../../src/include/executor/executor.h:237 #19 ExecAppend (pstate=) at nodeAppend.c:294 #20 0x0000000000638ce0 in ExecProcNodeInstr (node=0x27cb0a0) at execProcnode.c:461 #21 0x00000000006349c7 in ExecProcNode (queryDesc=0x7f84a8de7520, direction=, count=0, execute_once=160) at ../../../src/include/executor/executor.h:237 #22 ExecutePlan (queryDesc=0x7f84a8de7520, direction=, count=0, execute_once=160) at execMain.c:1723 #23 standard_ExecutorRun (queryDesc=0x7f84a8de7520, direction=, count=0, execute_once=160) at execMain.c:364 #24 0x00007f84a97c8618 in pgss_ExecutorRun (queryDesc=0x7f84a8de7520, direction=ForwardScanDirection, count=0, execute_once=true) at pg_stat_statements.c:892 #25 0x00007f84a91aa7dd in explain_ExecutorRun (queryDesc=0x7f84a8de7520, direction=ForwardScanDirection, count=0, execute_once=true) at auto_explain.c:268 #26 0x0000000000635071 in ParallelQueryMain (seg=0x268fba8, toc=0x7f84a93ed000) at execParallel.c:1402 #27 0x0000000000508f34 in ParallelWorkerMain (main_arg=) at parallel.c:1409 #28 0x0000000000704760 in StartBackgroundWorker () at bgworker.c:834 #29 0x000000000070e11c in do_start_bgworker () at postmaster.c:5698 #30 maybe_start_bgworkers () at postmaster.c:5911 #31 0x0000000000710786 in sigusr1_handler (postgres_signal_arg=) at postmaster.c:5091 #32 #33 0x00000037b9ce1603 in __select_nocancel () from /lib64/libc.so.6 #34 0x000000000071300e in ServerLoop (argc=, argv=) at postmaster.c:1670 #35 PostmasterMain (argc=, argv=) at postmaster.c:1379 #36 0x000000000067e8c0 in main (argc=3, argv=0x265f960) at main.c:228 #0 0x00000037b9c32495 in raise () from /lib64/libc.so.6 No symbol table info available. #1 0x00000037b9c33c75 in abort () from /lib64/libc.so.6 No symbol table info available. #2 0x00000037b9c2b60e in __assert_fail_base () from /lib64/libc.so.6 No symbol table info available. #3 0x00000037b9c2b6d0 in __assert_fail () from /lib64/libc.so.6 No symbol table info available. #4 0x00000000008c6f74 in dsa_allocate_extended (area=0x27c05e0, size=393220, flags=5) at dsa.c:729 npages = 97 first_page = span_pointer = 1099511632488 pool = 0x7f84a93eecf0 size_class = start_pointer = segment_map = result = 140207751879680 __func__ = "dsa_allocate_extended" __PRETTY_FUNCTION__ = "dsa_allocate_extended" #5 0x000000000068521f in pagetable_allocate (pagetable=, size=) at tidbitmap.c:1511 tbm = 0x7f84a8d86a58 ptbase = #6 0x00000000006876d2 in pagetable_grow (tbm=0x7f84a8d86a58, pageno=1635) at ../../../src/include/lib/simplehash.h:383 olddata = 0x7f84a8d23004 i = copyelem = startelem = 0 oldsize = newdata = #7 pagetable_insert (tbm=0x7f84a8d86a58, pageno=1635) at ../../../src/include/lib/simplehash.h:508 hash = 218584604 startelem = curelem = data = insertdist = 0 #8 tbm_get_pageentry (tbm=0x7f84a8d86a58, pageno=1635) at tidbitmap.c:1225 page = found = #9 0x0000000000687c50 in tbm_add_tuples (tbm=0x7f84a8d86a58, tids=, ntids=1, recheck=false) at tidbitmap.c:405 blk = off = 14 wordnum = bitnum = currblk = page = i = __func__ = "tbm_add_tuples" #10 0x00000000004e43df in btgetbitmap (scan=0x2829fa8, tbm=0x7f84a8d86a58) at nbtree.c:332 so = 0x2843c90 ntids = 5842 heapTid = #11 0x00000000004d8a91 in index_getbitmap (scan=0x2829fa8, bitmap=) at indexam.c:726 ntids = __func__ = "index_getbitmap" #12 0x0000000000647c98 in MultiExecBitmapIndexScan (node=0x2829720) at nodeBitmapIndexscan.c:104 tbm = 0x7f84a8d86a58 scandesc = 0x2829fa8 nTuples = doscan = #13 0x0000000000646078 in MultiExecBitmapOr (node=0x28046e8) at nodeBitmapOr.c:153 subnode = 0x2829720 subresult = bitmapplans = nplans = 2 i = result = 0x7f84a8d86a58 __func__ = "MultiExecBitmapOr" #14 0x0000000000646afd in BitmapHeapNext (node=0x2828db8) at nodeBitmapHeapscan.c:145 econtext = 0x2828b08 scan = 0x282d808 tbm = tbmiterator = 0x0 shared_tbmiterator = 0x0 tbmres = targoffset = slot = 0x282a888 pstate = 0x7f84a93eda40 dsa = 0x27c05e0 __func__ = "BitmapHeapNext" Justin