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.92) (envelope-from ) id 1j8sew-0004kh-80 for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2020 21:31:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j8seu-0002ZY-QH for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2020 21:31:28 +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 1j8seu-0002ZL-99 for pgsql-bugs@lists.postgresql.org; Mon, 02 Mar 2020 21:31:28 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j8ser-0000qm-6n for pgsql-bugs@lists.postgresql.org; Mon, 02 Mar 2020 21:31:27 +0000 Received: by mail-wr1-x441.google.com with SMTP id y17so1702514wrn.6 for ; Mon, 02 Mar 2020 13:31:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=DhXe+Yw+0AeG0QJ+aRt6SoaSrJdFBCd9Eu5MGMozVdQ=; b=fsPYhIdNtsStXsOotHKeaeaJbAWDZukfI5RILiq6ynPybkCSABZcZoc9qQsF/B+5Y9 G+Kwm2WwknNs89FZrYLArg8Q01gdADPLVs8TTyFOQA4r97B6QXj/l3Dd6OC77eJApKDe TpedP+KelPJR6GaVQhdDZGjcTFokv0GxlILnlGYLgAS2sp6IS8d07oRCJFpNzE06fDE7 4nq9+pKaWs4c2dpeqVJxMdYbm1iMYeHEbxRfgtIkyIK8YTcATCWgTVRMAQZ0GV3pndde hzBksuZeXW/bA0CPRmrHsvUdP3IQB0FihHjqhnuMKhyKBNK3ZWEMMAZnMqJbdXb/Y6r0 uNew== 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:content-transfer-encoding :in-reply-to; bh=DhXe+Yw+0AeG0QJ+aRt6SoaSrJdFBCd9Eu5MGMozVdQ=; b=gQD+hIcaBazeJCYjBn4MtpCWXOFOgr8PKBEMrGCEttJ7mySZ/UyDCPNxCEA1sJyQlZ 1QzB5IiYeGZCf/YJTNfU1f2p3rrPjqeDck1blpZ2p1kP3RDcK8wK6/oxiyBZXAqsaQW4 VsYvTW+fBxp2ztK32C8oXEagYCdl+Jj+Nb1KsAmtstq42uSG6mkvJDmSa54f5/UYjYVr q7sJmrg0MXCJDFIWgmX3UpybUKhwK5PTILDnmoH9cwxkf5lSR7rRecixQNfZmw3munsR rInhT58Exej7cjcETLoEckv/8GRCXPQJlJS3yCRHg7QHZkUlWFIjIxaomPGoIpG1H/hN teTg== X-Gm-Message-State: ANhLgQ1UJIF9LeK4odNid0MSkbmv0u6UMh9t0imETq0Jsw6/Yy5Q3iui 9W8aJJTUe6YLpkMIkORaGbR+xg== X-Google-Smtp-Source: ADFU+vu9kEO6Lxx8qOE0UBsfYZIEP/nL6fl7w41A4lL/PIhyDVyfzn/reBWL9lVsd8N3qV2a8brNsA== X-Received: by 2002:a5d:5411:: with SMTP id g17mr1381409wrv.4.1583184683598; Mon, 02 Mar 2020 13:31:23 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id z11sm394537wmd.47.2020.03.02.13.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 13:31:22 -0800 (PST) Date: Mon, 2 Mar 2020 22:31:21 +0100 From: Tomas Vondra To: =?utf-8?Q?Przemys=C5=82aw?= Szustak Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16283: crash on create index segmentation fault Message-ID: <20200302213121.w5tyczavjhrmupux@development> References: <16283-89418c2816e96f07@postgresql.org> <20200228162620.pfrugnfk527bml6y@development> <20200228181135.hkbtwdlvxfv37khn@development> <20200228210021.znum3xr3kprj3qec@development> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On Mon, Mar 02, 2020 at 08:18:00PM +0100, Przemysław Szustak wrote: >I installed postgresql-10-dbg. I can't find how to do it in postgis. >sudo apt install postgis(tab tab) > postgis postgis-doc postgis-gui >sudo apt install postgresql-10-postgis-(tab tab) > postgresql-10-postgis-2.4 postgresql-10-postgis-2.4-scripts > postgresql-10-postgis-2.5 postgresql-10-postgis-2.5-scripts > postgresql-10-postgis-3 postgresql-10-postgis-3-scripts > Not sure, but there should be postgis-dbgsym package, I think. >I updated github info. I find it rather annoying that we're discussing here but the relevant debug info is somewhere on github, getting updated. That makes is almost impossible for anyone to follow the discussion after a while. Please copy the important bits here in the future (attach them as a file, if necessary). >New logs from core dump was available below '*new crash dump file generated >after install postgres dbg and run gbd -p 'postgres-10-PID*''. >I generated bt from old dump crash too. > Well, both crashes fail at the same place - the last three frames look like this: #0 pfree (pointer=0x7f7a6e4068f8) at /build/postgresql-10-0Kn02a/postgresql-10-10.12/build/../src/backend/utils/mmgr/mcxt.c:954 #1 0x00007f7a65e39b5e in ?? () from /usr/lib/postgresql/10/lib/postgis-2.5.so #2 0x00007f7a65e3b367 in gserialized_gist_picksplit () from /usr/lib/postgresql/10/lib/postgis-2.5.so which means it fails here: void pfree(void *pointer) { MemoryContext context = GetMemoryChunkContext(pointer); (*context->methods->free_p) (context, pointer); <------ VALGRIND_MEMPOOL_FREE(context, pointer); } So the pointer passed to pfree() may be actually OK, but one of the pointers (context, methods or free_p) is probably somehow borked. It's hard to say from the backtrace, you'll have to inspect that from gdb (see my previous message for basic instructions). You'll probably need to install the postgis debug symbols first, but maybe try without it. Are you able to extract some subset of the data, so that people can reproduce this locally? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services