Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYN1f-00039d-SC for pgsql-bugs@arkaria.postgresql.org; Tue, 12 May 2020 05:00:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYN1e-00071U-H1 for pgsql-bugs@arkaria.postgresql.org; Tue, 12 May 2020 05:00:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYN1e-0006rW-0J for pgsql-bugs@lists.postgresql.org; Tue, 12 May 2020 05:00:18 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYN1b-0003SE-AF for pgsql-bugs@lists.postgresql.org; Tue, 12 May 2020 05:00:17 +0000 Received: by mail-lj1-x233.google.com with SMTP id o14so10996288ljp.4 for ; Mon, 11 May 2020 22:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=FPXTJIgSZVy4T4gf8LaZQME4ZDi6sxSzQb+c3ZRk6E4=; b=gnsB1JPS09CJO4iUkAmQctuHMmraKGoSGdBhglzhfTdQ33mnE47oKyA6lGd8xS7KVZ nBfT9qNe23tNN1zUx57B4n7thaN1FVb44pw6qbAEmqPOULex76cOj9FO53jIlMp6wuW/ d2o5IG5TpoMkMpJKJhkqY9Y8zxmbjgWK1NrOjZSP7uKsLARJWv6Hw2EcrhC0ND/i4lCU N5kzTI9sJamomISKmxlV2txrtLFpkS3lDdWnfOddIfqunZGYjsy5aJD4Z68pZyysWlB4 YDfzclZIsOhEMcyu/JQSAgl9qlpV/w6MKdHPJeI+JidmXIT3DbPa9NywKB2Lm1nLORFb AzNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=FPXTJIgSZVy4T4gf8LaZQME4ZDi6sxSzQb+c3ZRk6E4=; b=CF2witRT4ts6JY2WIFE8yXGOHtClQOdVbXC9Ks2RH9d9pvlNy06ar2xPuv7hVeEcvr oclQIM8XvmkyJly5GAP0BFBZEsGbH82+0mP8V4QM40a+A8vW/Ww6JFs5+Be+FpxrJhwc hYCt/NlPdJ4zsx9IUnvEQc0TGB70iM7NyC6+wXfR3r9yPywAYUvOmcXCFNjFzNPdsjlK JN9Fo5EKIfcVQFbE6ybmGHAC3is6nv1l9zIQc/6/jNICuIL8f6zvF+1adq+ETRl2/YDt zfpclpUzHlZNyHbh0qRsRGdNEk6yG8vDgBbbr6xRM7yv0zO2ZqAWA/yJ2n095ya4Wc3M DBnw== X-Gm-Message-State: AOAM533Nn/1ht6I2sBdl+GRiHlFnma6BnQs4CtGeRuKUrRWPmd7ipWJj mMrOtz6pq/MPb4xmKLld+ER1nUoO X-Google-Smtp-Source: ABdhPJxKL9HQktbPmbVVdAPeOQfA+IHx9lGqpAddP+2W1xX2Fu1UzjtkJu61vOP1VbUokGcQ8F80qg== X-Received: by 2002:a2e:8549:: with SMTP id u9mr11803274ljj.24.1589259613290; Mon, 11 May 2020 22:00:13 -0700 (PDT) Received: from [1.0.0.7] ([178.155.6.211]) by smtp.gmail.com with ESMTPSA id 134sm13023797lfj.20.2020.05.11.22.00.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 22:00:12 -0700 (PDT) Subject: Re: BUG #16329: Valgrind detects an invalid read when building a gist index with buffering From: Alexander Lakhin To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org References: <16329-7a6aa9b6fa1118a1@postgresql.org> <3dda6945-c147-5afc-7720-38ec6848dafa@gmail.com> <10261.1588705157@sss.pgh.pa.us> <93ca4540-0016-8217-2b31-535613499987@gmail.com> Message-ID: <06f117b8-bbc1-4190-d204-ef329121cbca@gmail.com> Date: Tue, 12 May 2020 08:00:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <93ca4540-0016-8217-2b31-535613499987@gmail.com> Content-Type: multipart/alternative; boundary="------------662CB7DFBD678EBB7C61F02E" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------662CB7DFBD678EBB7C61F02E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 11.05.2020 23:00, Alexander Lakhin wrote: > Please look at the improved test that makes the code coverage for > gistbuildbuffers.c almost 100%. That improved test exposes another bug (when running under valgrind): ==00:00:00:34.861 1439277== Conditional jump or move depends on uninitialised value(s) ==00:00:00:34.861 1439277==    at 0x1FFE6A: gistpenalty (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F86E0: gistRelocateBuildBuffersOnSplit (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F67B7: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F6B6F: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F6E0E: gistProcessItup (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F701F: gistProcessEmptyingQueue (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F706D: gistBufferingBuildInsert (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7817: gistBuildCallback (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2293F3: heapam_index_build_range_scan (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7A23: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2B8372: index_build (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2B9C8D: index_create (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==  Uninitialised value was created by a heap allocation ==00:00:00:34.861 1439277==    at 0x6B646A: palloc (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F5A8A: initGISTstate (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7913: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2B8372: index_build (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2B9C8D: index_create (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x361677: DefineIndex (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x563FE3: ProcessUtilitySlow (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x56358F: standard_ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x56366E: ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x55FAED: PortalRunUtility (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x560640: PortalRunMulti (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x5612F8: PortalRun (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277== {       Memcheck:Cond    fun:gistpenalty    fun:gistRelocateBuildBuffersOnSplit    fun:gistbufferinginserttuples    fun:gistbufferinginserttuples    fun:gistProcessItup    fun:gistProcessEmptyingQueue    fun:gistBufferingBuildInsert    fun:gistBuildCallback    fun:heapam_index_build_range_scan    fun:gistbuild    fun:index_build    fun:index_create } ==00:00:00:34.861 1439277== Use of uninitialised value of size 8 ==00:00:00:34.861 1439277==    at 0x68E92D: FunctionCall3Coll (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==  Uninitialised value was created by a heap allocation ==00:00:00:34.861 1439277==    at 0x6B646A: palloc (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F5A8A: initGISTstate (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7913: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2B8372: index_build (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2B9C8D: index_create (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x361677: DefineIndex (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x563FE3: ProcessUtilitySlow (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x56358F: standard_ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x56366E: ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x55FAED: PortalRunUtility (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x560640: PortalRunMulti (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x5612F8: PortalRun (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277== {       Memcheck:Value8    fun:FunctionCall3Coll } ==00:00:00:34.861 1439277== Jump to the invalid address stated on the next line ==00:00:00:34.861 1439277==    at 0x0: ??? ==00:00:00:34.861 1439277==    by 0x68E92E: FunctionCall3Coll (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1FFE9F: gistpenalty (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F86E0: gistRelocateBuildBuffersOnSplit (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F67B7: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F6B6F: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F6E0E: gistProcessItup (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F701F: gistProcessEmptyingQueue (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F706D: gistBufferingBuildInsert (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7817: gistBuildCallback (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2293F3: heapam_index_build_range_scan (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7A23: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==  Address 0x0 is not stack'd, malloc'd or (recently) free'd ==00:00:00:34.861 1439277== {       Memcheck:Jump    obj:*    fun:FunctionCall3Coll    fun:gistpenalty    fun:gistRelocateBuildBuffersOnSplit    fun:gistbufferinginserttuples    fun:gistbufferinginserttuples    fun:gistProcessItup    fun:gistProcessEmptyingQueue    fun:gistBufferingBuildInsert    fun:gistBuildCallback    fun:heapam_index_build_range_scan    fun:gistbuild } ==00:00:00:34.861 1439277== ==00:00:00:34.861 1439277== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==00:00:00:34.861 1439277==  Bad permissions for mapped region at address 0x0 ==00:00:00:34.861 1439277==    at 0x0: ??? ==00:00:00:34.861 1439277==    by 0x68E92E: FunctionCall3Coll (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1FFE9F: gistpenalty (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F86E0: gistRelocateBuildBuffersOnSplit (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F67B7: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F6B6F: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F6E0E: gistProcessItup (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F701F: gistProcessEmptyingQueue (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F706D: gistBufferingBuildInsert (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7817: gistBuildCallback (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x2293F3: heapam_index_build_range_scan (in .../tmp_install/usr/local/pgsql/bin/postgres) ==00:00:00:34.861 1439277==    by 0x1F7A23: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres) 2020-05-12 06:51:30.764 MSK postmaster[1439231] LOG:  server process (PID 1439277) was terminated by signal 11: Segmentation fault 2020-05-12 06:51:30.764 MSK postmaster[1439231] DETAIL:  Failed process was running: create index gist_pointidx6 on gist_point_tbl using gist(p) include(t) with (buffering = on, fillfactor=50); Best regards, Alexander --------------662CB7DFBD678EBB7C61F02E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
11.05.2020 23:00, Alexander Lakhin wrote:
Please look at the improved test that makes the code coverage for gistbuildbuffers.c almost 100%.
That improved test exposes another bug (when running under valgrind):

==00:00:00:34.861 1439277== Conditional jump or move depends on uninitialised value(s)
==00:00:00:34.861 1439277==    at 0x1FFE6A: gistpenalty (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F86E0: gistRelocateBuildBuffersOnSplit (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F67B7: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F6B6F: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F6E0E: gistProcessItup (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F701F: gistProcessEmptyingQueue (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F706D: gistBufferingBuildInsert (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7817: gistBuildCallback (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2293F3: heapam_index_build_range_scan (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7A23: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2B8372: index_build (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2B9C8D: index_create (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==  Uninitialised value was created by a heap allocation
==00:00:00:34.861 1439277==    at 0x6B646A: palloc (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F5A8A: initGISTstate (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7913: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2B8372: index_build (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2B9C8D: index_create (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x361677: DefineIndex (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x563FE3: ProcessUtilitySlow (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x56358F: standard_ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x56366E: ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x55FAED: PortalRunUtility (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x560640: PortalRunMulti (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x5612F8: PortalRun (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:gistpenalty
   fun:gistRelocateBuildBuffersOnSplit
   fun:gistbufferinginserttuples
   fun:gistbufferinginserttuples
   fun:gistProcessItup
   fun:gistProcessEmptyingQueue
   fun:gistBufferingBuildInsert
   fun:gistBuildCallback
   fun:heapam_index_build_range_scan
   fun:gistbuild
   fun:index_build
   fun:index_create
}
==00:00:00:34.861 1439277== Use of uninitialised value of size 8
==00:00:00:34.861 1439277==    at 0x68E92D: FunctionCall3Coll (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==  Uninitialised value was created by a heap allocation
==00:00:00:34.861 1439277==    at 0x6B646A: palloc (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F5A8A: initGISTstate (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7913: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2B8372: index_build (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2B9C8D: index_create (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x361677: DefineIndex (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x563FE3: ProcessUtilitySlow (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x56358F: standard_ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x56366E: ProcessUtility (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x55FAED: PortalRunUtility (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x560640: PortalRunMulti (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x5612F8: PortalRun (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==
{
   <insert_a_suppression_name_here>
   Memcheck:Value8
   fun:FunctionCall3Coll
}
==00:00:00:34.861 1439277== Jump to the invalid address stated on the next line
==00:00:00:34.861 1439277==    at 0x0: ???
==00:00:00:34.861 1439277==    by 0x68E92E: FunctionCall3Coll (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1FFE9F: gistpenalty (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F86E0: gistRelocateBuildBuffersOnSplit (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F67B7: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F6B6F: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F6E0E: gistProcessItup (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F701F: gistProcessEmptyingQueue (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F706D: gistBufferingBuildInsert (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7817: gistBuildCallback (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2293F3: heapam_index_build_range_scan (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7A23: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==00:00:00:34.861 1439277==
{
   <insert_a_suppression_name_here>
   Memcheck:Jump
   obj:*
   fun:FunctionCall3Coll
   fun:gistpenalty
   fun:gistRelocateBuildBuffersOnSplit
   fun:gistbufferinginserttuples
   fun:gistbufferinginserttuples
   fun:gistProcessItup
   fun:gistProcessEmptyingQueue
   fun:gistBufferingBuildInsert
   fun:gistBuildCallback
   fun:heapam_index_build_range_scan
   fun:gistbuild
}
==00:00:00:34.861 1439277==
==00:00:00:34.861 1439277== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==00:00:00:34.861 1439277==  Bad permissions for mapped region at address 0x0
==00:00:00:34.861 1439277==    at 0x0: ???
==00:00:00:34.861 1439277==    by 0x68E92E: FunctionCall3Coll (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1FFE9F: gistpenalty (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F86E0: gistRelocateBuildBuffersOnSplit (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F67B7: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F6B6F: gistbufferinginserttuples (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F6E0E: gistProcessItup (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F701F: gistProcessEmptyingQueue (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F706D: gistBufferingBuildInsert (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7817: gistBuildCallback (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x2293F3: heapam_index_build_range_scan (in .../tmp_install/usr/local/pgsql/bin/postgres)
==00:00:00:34.861 1439277==    by 0x1F7A23: gistbuild (in .../tmp_install/usr/local/pgsql/bin/postgres)
2020-05-12 06:51:30.764 MSK postmaster[1439231] LOG:  server process (PID 1439277) was terminated by signal 11: Segmentation fault
2020-05-12 06:51:30.764 MSK postmaster[1439231] DETAIL:  Failed process was running: create index gist_pointidx6 on gist_point_tbl using gist(p) include(t) with (buffering = on, fillfactor=50);

Best regards,
Alexander
--------------662CB7DFBD678EBB7C61F02E--