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 1kVEze-0004Vl-3x for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2020 14:21:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kVEzc-0008Kp-OZ for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2020 14:21:32 +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 1kVEzc-0008Ki-IA for pgsql-bugs@lists.postgresql.org; Wed, 21 Oct 2020 14:21:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVEza-0000Kr-1W for pgsql-bugs@lists.postgresql.org; Wed, 21 Oct 2020 14:21:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09LELRcn728719; Wed, 21 Oct 2020 10:21:27 -0400 From: Tom Lane To: zhitelev.ivan@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16680: Crash database with sefault 11 In-reply-to: <16680-ffe81c53d7013bfe@postgresql.org> References: <16680-ffe81c53d7013bfe@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 21 Oct 2020 10:00:36 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <728717.1603290087.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Oct 2020 10:21:27 -0400 Message-ID: <728718.1603290087@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > PostgreSQL version: 10.5 > Operating system: Debian stretch 9.11. Core version: 4.9.0-11-amd64 > Core was generated by `postgres: apipy pgapp 10.10.24.20(370'. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00007fb9b5d7a303 in epoll_wait () at > ../sysdeps/unix/syscall-template.S:84 > 84 ../sysdeps/unix/syscall-template.S: No such file or directory. > (gdb) bt > #0 0x00007fb9b5d7a303 in epoll_wait () at > ../sysdeps/unix/syscall-template.S:84 > #1 0x000056501737c618 in WaitEventSetWait () > #2 0x00005650172a6687 in secure_read () > #3 0x00005650172b0310 in ?? () > #4 0x00005650172b1155 in pq_getbyte () > #5 0x000056501739d537 in PostgresMain () > #6 0x00005650170fc9b5 in ?? () > #7 0x0000565017333d1c in PostmasterMain () > #8 0x00005650170fdda1 in main () That's a mighty interesting backtrace; I don't recall having seen any reports of crashes in epoll_wait() before. (Well, there's [1], but I have my doubts about whether that reported backtrace can be trusted at all.) The thing is that it's hard to see how a crash in epoll_wait() would be our bug and not glibc's. Maybe a wild value of the events pointer could cause that rather than the expected EFAULT result, but it's fairly clear from the WaitEventSet code that it can't pass a wild pointer. nevents has to be constant 1, too, given this stack trace. So I'm suspecting an OS bug. The fact that you're running an EOL'd Debian branch doesn't inspire much confidence that that's impossible. I suggest an OS update. While you're at it, update Postgres too --- 10.5 is nine quarterly releases out of date. regards, tom lane [1] https://www.postgresql.org/message-id/flat/16094-8fb7061e5370fb00%40po= stgresql.org