Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgUNY-002qqL-H1 for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Aug 2024 19:18:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sgUNW-0030hY-A4 for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Aug 2024 19:18:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgUNV-0030hO-LJ for pgsql-bugs@lists.postgresql.org; Tue, 20 Aug 2024 19:18:50 +0000 Received: from sonic319-20.consmr.mail.ne1.yahoo.com ([66.163.188.82]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgUNR-000eyE-VB for pgsql-bugs@lists.postgresql.org; Tue, 20 Aug 2024 19:18:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1724181524; bh=Nbs+Bsid6/jtL9eVQ7RkldtGZ6aZMFDaT3rvG6Q6kok=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=jrEYqTiD1R7WrTapIFCAwmBigBN7W2AXIK54vE3mHmbq0U59Ir25YfAE2ocW+XVZDRqFEFt+jK5n2BrAG0XaVxXaCefk32vPSakhH2kbMSzExYkk2mp+KAOGYsFLgVsyHVtOklBTQof1gYnp6Sdjwbkc/G9+N2xRc8Zvns4Z/u0saVuxom8aMNpmQ3tI/zQxGeNMK6mFhcKe7JlrEcTNwpwMG1zX1X0V7S1ScdqtlNQo7BWEOGDiGT4qlPB3rHVXcFpq/hA8yyr1rdNIIXXFS8lPC4hqBAH4MazSbnCg8ZyYlR7rGJ6CH6A2/ZvGOJ0+JqrJdpaP/RvNymzo8dlUgQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1724181524; bh=KCCwpCjVo3+J10qBXUUIANO9+TiYXPd5zNh56NvI1s7=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=ra3jEXMYZcng6XB3RyWSZd22Pa9ClwcFGn3Myqx/Mgv37baK6nvGGV+rRH0aOHEkvDMsSZnXItD/o3HnZaavS+3fKRvRPFgp4yPkx2AyMvQJ2RWydBfmOD/+s2tHkeolGvJR5tJcfkFGU4h7BMLQgM+He6c2+IrwF0l5sfO26sFzdnqF5Th99SVV3NFoeDyneHb+GFikP7G3jLsDu3qDjIcUsMvZkToIvlADgVr/UJa+0FICFoNrneePWppaiTf0ZRtv/6hRgNqAa5BngjB466TXgiTGQ6VclGFW3I4gVU/j9+dXs/vpF8D8jTj1BtGYVfbHenbEXhxKw+PMn67uGA== X-YMail-OSG: sn_MWCUVM1myZUzsMtDLFoMr0sP2rWAu6vx_2TILSIucsuAvkRMdy_Or0Grn5B1 4Rwflaaqld2F2bGtY2TfzHNeIijKHW2wzEhMatvInck8xCXoIBmEnUksY5tOoTREik1g0.cNNiMH KYdAek48TtWPHd4Y1onOr_TD7ne3xnQCsKCR6YAOV2Fq2zjZwtNhrT27WtAJObYSLO0EL6zCRFHr 5IHfObafQScgyACaXA94B0L31uJtAy9FwerJScpu_MRonnxDQ5ZfcgCbFXyZDmSVRB8pmMLOIKAP RvPMC4uAe.QahVZMWylD2oYnitMOPn52TiqQebxISxO5Uvru4gQA6sfWpd.s.xhdlvvkwRt6iYlX rj56pJR5mfRQLM0734AfEm.Ak8rRU9HoMiNigY3RFAZBmGYkJbhtbVM8bh8rEefVPIMm8lUeteOa mRZCgmh9iACx2lIMwIYzBEyysPPAaVCA7U1wZe.jD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CGu8N09yo2DyiqF1O lQJZhsxlu8Z8uGpxJNKiELN0hsORqqB3PNHjiqyEaE_rkUegPM8mW5MXKIx4MaOAe8hqFIDnI32y A2FfOpjk7NF_mgnpManSDlGB8.XJQl681_Fe2dfAuYwH4lDtzIdPFKb8OIvd8x0liz06LL.egChM RzLu_8GYAATm3Guz6ZPJ2qAma9GBifjWUdN39XC7PdfyjKEOuc9KQkMqpj33X7axc9Yih_Irseja CKms1kB_MjQyuYImv5en.C__x70MFxevPnaQ1LQ53i.rNzOY2MVvEk0Pkah20GyE_LldVK0bZLHF WtL2hs1BQ.4d0Fd7eHDfgKQDegn8y12AqSTmRTi7WPaQ79sFgN09LMQSKkFs9vw4eEohw6zsz1zg _Zo1QZ5xWvRuUt2pChNDtziQq45Hid0CbUbfMMuSYI4ihEJeGVzq.fj11kTc2xEA7BvsyRpRlWMm XpOsauBBRq4V7TZAsuLQ4i5I5mo5cj.4jq4sZcMzhKoqEZEwd5lTVN1t3mvrwJiUpclxrQuuYFVc nxCEqYBOmB_V.RBVCN8sI6q6Oa8h51xoxjGZUxpCUh_D6U9wtTB4yRqx2ECzkuSdij9PafpQpD1_ eNdf0tnzhu7eG09pliznoHKFDFNAdKBcNEHccajxAqZbASX3kMxN8nP_0Oj4k1SZs6wb4yTaCteg SCH2K0ODjn_a7q2oWQ0JHzPO.rSYFoNuqKzjbpmJ0XAm5k.O05hlkVBWyO1OMqt2hucBKlqAzzQu 2bBdBQiXws08YDx6I3CHGp5TtlJ72fRWtb6Df X-Sonic-MF: X-Sonic-ID: 58afb95f-a0f6-4107-a072-2539b55ff7a4 Received: from sonic.gate.mail.ne1.yahoo.com by sonic319.consmr.mail.ne1.yahoo.com with HTTP; Tue, 20 Aug 2024 19:18:44 +0000 Date: Tue, 20 Aug 2024 19:18:42 +0000 (UTC) From: Matthew Clark To: Tom Lane Cc: "pgsql-bugs@lists.postgresql.org" Message-ID: <90650442.10108278.1724181522516@mail.yahoo.com> In-Reply-To: <1527796.1724159772@sss.pgh.pa.us> References: <2123352386.9759142.1724114730509.ref@mail.yahoo.com> <2123352386.9759142.1724114730509@mail.yahoo.com> <1527796.1724159772@sss.pgh.pa.us> Subject: Re: server crash on raspberry pi for large queries MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10108277_1810163514.1724181522515" X-Mailer: WebService/1.1.22544 YMailNorrin Content-Length: 6504 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_10108277_1810163514.1724181522515 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable OS:=C2=A0 Linux pi 6.6.31+rpt-rpi-v6 #1 Raspbian 1:6.6.31-1+rpt1 (2024-05-= 29) armv6l GNU/Linux I can try to make a test case, essentially a large table, then "select coun= t(*)" from table.=C2=A0 The select works for smaller tables. I'm using the build of postgresql packaged with the OS version above; from = the apt repository and installed with "apt install postgresql".=C2=A0 repos= itory -=C2=A0 deb [ arch=3Darmhf ] http://raspbian.raspberrypi.com/raspbian/ bookworm mai= n contrib non-free rpi postgres --version postgres (PostgreSQL) 15.8 (Raspbian 15.8-0+deb12u1) On Tuesday, August 20, 2024 at 09:16:16 AM EDT, Tom Lane wrote: =20 =20 Matthew Clark writes: > issue: when issuing a large query ,=C2=A0 e.g.=C2=A0=C2=A0 "Select count(= *) from temperature" on a table with > 150M rows the system crashes. > =C2=A0 example error:=C2=A0=C2=A0 LOG:=C2=A0 server process (PID 20037) w= as terminated by signal 4: Illegal instruction=C2=A0 no more diagnostic inf= ormation is generated. > Workaround : this stops happening when jit_above_cost is set to -1 in pos= tgresql.conf=C2=A0=C2=A0 After changing this setting the problem stops. What this sounds like is a memory leak in the JIT stuff.=C2=A0 We fixed one such issue last year, but perhaps there's more.=C2=A0 Can you provide a self-contained test case?=C2=A0 Also, please be more specific about which Linux version you are using, and which LLVM version. =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 regards, tom lane =20 ------=_Part_10108277_1810163514.1724181522515 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
OS:  Linux pi 6.6.31+rpt-rpi-= v6 #1 Raspbian 1:6.6.31-1+rpt1 (2024-05-29) armv6l GNU/Linux

I can try= to make a test case, essentially a large table, then "select count(*)" fro= m table.  The select works for smaller tables.

I'm using the build of pos= tgresql packaged with the OS version above; from the apt repository and ins= talled with "apt install postgresql".  repository - 

deb [ arch=3Darmhf ] http://= raspbian.raspberrypi.com/raspbian/ bookworm main contrib non-free rpi



postgres --version

postgres (PostgreSQL) 15.8 (Raspbian 15.8-0+deb12u1)






=20
=20
On Tuesday, August 20, 2024 at 09:16:16 AM EDT, Tom= Lane <tgl@sss.pgh.pa.us> wrote:


=20 =20
Matthew Clark <mclark@drmatthewclark.com> writes:

> issue: when iss= uing a large query ,  e.g.   "Select count(*) from temperatu= re" on a table with > 150M rows the system crashes.
&g= t;   example error:   LOG:  server process (PID 20037) = was terminated by signal 4: Illegal instruction  no more diagnostic in= formation is generated.
> Workaround : this stops happ= ening when jit_above_cost is set to -1 in postgresql.conf   After= changing this setting the problem stops.


What this sounds like is a memory leak in the JIT stuff.  We= fixed
one such issue last year, but perhaps there's more= .  Can you provide
a self-contained test case? = Also, please be more specific about
which Linux version = you are using, and which LLVM version.

            regards, tom lane=

------=_Part_10108277_1810163514.1724181522515--