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 1n81vq-0002fv-Io for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Jan 2022 15:22:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n81vp-0007NP-6Z for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Jan 2022 15:22:29 +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 1n81vo-0007ND-Tt for pgsql-bugs@lists.postgresql.org; Thu, 13 Jan 2022 15:22:28 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n81vl-0005Ha-VE for pgsql-bugs@lists.postgresql.org; Thu, 13 Jan 2022 15:22:27 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 062983201F43; Thu, 13 Jan 2022 10:22:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 13 Jan 2022 10:22:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=erVr9/Om1BCJkjnnb6G2Pn7olZxJjg7TjGfgatqM0 Xk=; b=EANkMiCRxPW74gQjKsas4gYH/otuHJ5CUjkp1/qJGULq5qK7aERykq6Mz R6C55fQpPdIW8D1zQLQYbcBS7nsoI6k/3foY8ZCED7ryrtAVxhtTAAmU7Udxjdg3 HIOQxy8z2m8ozH3m0Vjuh7tPpeCODJQjgtWrR5T30BK9jbX/Lkhl90WNOIk/pXmv s7EKfXNozna5NVUf9oMI48S6QXUZkwdM8Xz8Dls63mK+WJlI24vj5c91ZI9CiyMT aE/uVhYI6lK0q+zf2y513wAxy7Wn8wf+FLULzW60nc299kDV4c0L7xy1gZd/+fjN KcfNrdLZPlRSR6yKZfj+j3L9Kzvhw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdefgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuhffvfhgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefgefgteefudehheduffev lefhkeeulefhfffgvdelgfffueduledtgfekiefhjeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jan 2022 10:22:17 -0500 (EST) Message-ID: Date: Thu, 13 Jan 2022 16:22:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: BUG #17362: Error "could not find block containing chunk" when using index with icu collation on CentOS 7 Content-Language: en-US From: Peter Eisentraut To: Peter Geoghegan , eronenp@gmail.com, PostgreSQL mailing lists References: <17362-63967721ee562fa7@postgresql.org> <3869d444-2f89-f157-318d-a71ed712dcb7@enterprisedb.com> In-Reply-To: <3869d444-2f89-f157-318d-a71ed712dcb7@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 13.01.22 16:12, Peter Eisentraut wrote: > On 11.01.22 23:19, Peter Geoghegan wrote: >> On Tue, Jan 11, 2022 at 3:16 AM PG Bug reporting form >> wrote: >>> When I query a table containing certain Unicode data, using an index >>> that >>> has certain collation, I get error message "could not find block >>> containing >>> chunk". This is fully reproducible on CentOS 7 using the official >>> RPM. (I >>> could not reproduce this on Oracle Linux 8, though): >> >> It looks like you're probably not using utf8 as your database >> encoding, based on the stacktrace -- even though I would expect that >> on your ICU version. What does "show server_encoding;" show you when >> run from psql? >> >> My guess is that you can temporarily work around the bug (which looks >> like a bug in our !HAVE_UCOL_STRCOLLUTF8 ICU support) by making sure >> to use UTF-8 as the server encoding. > > It looks like the reporter's system is rhel7, which does not have > HAVE_UCOL_STRCOLLUTF8, so it will use the other code independent of the > encoding. > > There could very well be some subtle memory counting bug or similar in > icu_to_uchar() perhaps.  Needs more analysis. Ok, I can reproduce this with the given test data and steps if I undef HAVE_UCOL_STRCOLLUTF8 in my build. Interestingly, I couldn't just rebuild and rerun the query. In order for the error to occur, I had to rebuild the index.