Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpSxB-0007Jm-D6 for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Sep 2016 04:28:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpSxA-0004Af-Vw for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Sep 2016 04:28:13 +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 1bpSxA-0004AO-6M for pgsql-bugs@postgresql.org; Thu, 29 Sep 2016 04:28:12 +0000 Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bpSx2-00022y-MI for pgsql-bugs@postgresql.org; Thu, 29 Sep 2016 04:28:10 +0000 Received: by mail-qk0-x22b.google.com with SMTP id j129so59286271qkd.1 for ; Wed, 28 Sep 2016 21:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pcorp-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=DOdSkQSg/+HzfikI7wu3I/uK1CQIs9Qx02CbNePF1bw=; b=YNWh+p1GlCx5HON2QbSe8PQ729/kFou5fzb9OiEG+U+4n0Bz764FWP3WnwHWPv0wgA WI83FhBUcei68iV/mz0aH4DhrAOEEa4DRLtVItuJGSO/GuI3DNpciaE8y7PlvXalZoDV Ofxai+KMK8C05/2BWAqtY5nlB2Xc4OY72AXkWQoX+3KcxheOOCAQsi4tnYBO3Z3+Gm1h D1mA+nOidRdkoJVze8NQq0S+175SLwhlQsEUu5XcdRH0LRQWtg+ap0/yK0aWxCDs1wJM YIcY87h5SFb+9EonbZy3gVV6dUtwA5p65qVspC3hHhONstFHw93pntGt0nVFdg3QBSL/ hcww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=DOdSkQSg/+HzfikI7wu3I/uK1CQIs9Qx02CbNePF1bw=; b=C3AeK6bDo4bCRzzhSvu5YbECUxcXiD7jRRSxajteJov90pnaVyJqoL6x8MisZUpEgB PikCc7xyzF7KhRgHqID2Rlk1gJeBPQRdYPYWYatHYu6bifEDqhO5tPv5np3wFHCfzzhB 1QGrHyzswwDkh0lp/94fwpKjS70NmAnFtVmDguvLYN2mwRgMHCG2AtkttheFwbhDp9ZP XmdOj7RCKmyelcLoyYpn3W2d608Rgdqr9m8Sq6sXeQna7hHaW7u5Dh2OCzlgHAE17Cj5 Dp9Kc8DLCD16GoQkEGiPWuwY3dhIbRqOZ4V0LpzdwJFZaiQaL/M8tu48zOtj7EhuW4yq olHg== X-Gm-Message-State: AA6/9Rkpru+6EkAcllCJ4dwhxxJJJvPOMdY5LO3VqMC+nEzwbh4KKg3iw/occp2ze2nLxg== X-Received: by 10.55.198.85 with SMTP id b82mr17499700qkj.171.1475123282655; Wed, 28 Sep 2016 21:28:02 -0700 (PDT) Received: from R (50-78-240-110-static.hfc.comcastbusiness.net. [50.78.240.110]) by smtp.gmail.com with ESMTPSA id x24sm5638509qtc.31.2016.09.28.21.28.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 21:28:02 -0700 (PDT) From: "Regina Obe" To: "'Tom Lane'" Cc: References: <20160929035538.20224.39628@wrigleys.postgresql.org> <12479.1475122250@sss.pgh.pa.us> In-Reply-To: <12479.1475122250@sss.pgh.pa.us> Subject: Re: BUG #14344: string_agg(DISTINCT ..) crash Date: Thu, 29 Sep 2016 00:28:00 -0400 Message-ID: <000001d21a09$dd22a9f0$9767fdd0$@pcorp.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQJct1WVnWQyDQ2jJMKKDC67Wwlj3wGF4jZKn25zwgA= Content-Language: en-us X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org > lr@pcorp.us writes: > Let me know if you need more info or if this has already been fixed. > Hm, works OK for me: > regression=# SELECT string_agg(DISTINCT state, ',' ORDER BY state) FROM string_agg_crash_test; > string_agg > ------------------- > HI,IL,KS,MA,MA,NY > (1 row) > But I see no post-rc1 fixes that look like they might explain this. > regards, tom lane I was able to get it to crash under my mingw64 9.6beta4ish build too. Gdb looks like this: Reading symbols from C:\ming64gcc48\projects\postgresql\rel\pg9.6w64gcc48\bin\postgres.exe...done . 0x000000007732ae11 in ntdll!DbgBreakPoint () from C:\Windows\SYSTEM32\ntdll.dll (gdb) cont Continuing. [Thread 6944.0x61c exited with code 0] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 6944.0x2384] toast_raw_datum_size (value=242751291) at tuptoaster.c:358 358 tuptoaster.c: No such file or directory. (gdb) bt #0 toast_raw_datum_size (value=242751291) at tuptoaster.c:358 #1 0x000000000078e616 in texteq (fcinfo=0x299e760) at varlena.c:1615 #2 0x00000000007bb045 in FunctionCall2Coll (flinfo=flinfo@entry=0x50ea400, collation=collation@entry=0, arg1=arg1@entry=85010827, arg2=) at fmgr.c:1319 #3 0x0000000000585548 in execTuplesMatch (slot1=slot1@entry=0x50e9e28, slot2=slot2@entry=0x50ea248, numCols=numCols@entry=2, matchColIdx=0x50ea350, eqfunctions=0x50ea3d0, evalContext=evalContext@entry=0x38d550) at execGrouping.c:100 #4 0x00000000005984e5 in process_ordered_aggregate_multi ( pergroupstate=0x50e9980, pertrans=0x50e8968, aggstate=0x50aaaf0) at nodeAgg.c:1244 #5 finalize_aggregates (aggstate=aggstate@entry=0x50aaaf0, peraggs=peraggs@entry=0x50abfb0, pergroup=pergroup@entry=0x50e9980, currentSet=currentSet@entry=0) at nodeAgg.c:1552 #6 0x0000000000598c7a in agg_retrieve_direct (aggstate=0x50aaaf0) at nodeAgg.c:2157 #7 ExecAgg (node=node@entry=0x50aaaf0) at nodeAgg.c:1837 #8 0x000000000058b228 in ExecProcNode (node=node@entry=0x50aaaf0) at execProcnode.c:503 #9 0x00000000005871c5 in ExecutePlan (dest=0x50e5838, direction=, numberTuples=0, sendTuples=1 '\001', operation=CMD_SELECT, use_parallel_mode=, planstate=0x50aaaf0, estate=0x50aa9d8) at execMain.c:1567 #10 standard_ExecutorRun (queryDesc=0x5057288, direction=, count=0) at execMain.c:338 #11 0x00000000006b1fe6 in PortalRunSelect (portal=portal@entry=0x509e978, forward=forward@entry=1 '\001', count=0, count@entry=43643472, dest=dest@entry=0x0) at pquery.c:948 #12 0x00000000006b3686 in PortalRun (portal=0x299ee90, portal@entry=0x509e978, count=43643472, count@entry=2147483647, isTopLevel=isTopLevel@entry=0 '\000', dest=0x0, dest@entry=0x50e5838, altdest=altdest@entry=0x50e5838, completionTag=0x299f210 "", completionTag@entry=0x4000000007b ) at pquery.c:789 #13 0x00000000006b0e54 in exec_simple_query ( query_string=0x100000000000000 ) at postgres.c:1094 #14 PostgresMain (argc=, argv=argv@entry=0x2893e0, dbname=0x18001700160015 , username=) at postgres.c:4074 #15 0x0000000000647aad in BackendRun (port=0x299f400) at postmaster.c:4262 #16 SubPostmasterMain (argc=argc@entry=3, argv=argv@entry=0x2f7ea0) at postmaster.c:4752 #17 0x0000000000803d68 in main (argc=3, argv=0x2f7ea0) at main.c:205 (gdb) I'll compile against the latest 9.6 branch then and see if it crashes there too. Might be windows specific perhaps. Thanks, Regina -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs