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 1lEBcI-0001Gq-28 for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Feb 2021 13:51:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lEBcG-0000dg-Pu for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Feb 2021 13:51:12 +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 1lEAvv-0003xl-DW for pgsql-bugs@lists.postgresql.org; Mon, 22 Feb 2021 13:07:27 +0000 Received: from st43p00im-zteg10073501.me.com ([17.58.63.180]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEAvq-0001bb-RF for pgsql-bugs@lists.postgresql.org; Mon, 22 Feb 2021 13:07:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1613999240; bh=bvDNWPqLJC1l44442OJgTQqwsoHfyG9cfkoCZwkEjuU=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=F0lgj+ULWlnrYbUYuj15m/okbUVPHGEUc+JKlh/4ldgY+TD2WPlTvK5cGrhjo+0iZ T6t7QNqnz8dtcj+CMSf5zsEjAj/UNN4KjhnzWzVrdqONU9cr0jWdlLOuc1AG01NxFy cHXV5Y4QgDL+VOfsjMhW/AQ5htSZHFqagI55b4ASSLnlRuLv6hznKda8pr8cmEz3/4 j+DNyGClRcYTj26FXNTACg6zDjRRHlwOom4OD/m1AV/kV3SckOKDDLMex3NMGKIS0V /S9BufcF7GPnGcIwAM3W9ww9Jk8TPz2ebqFZj6SpzEhnEFDh4+DDoNdQEL72ydAfZs r3gvno2NXFUMQ== Received: from [192.168.0.109] (unknown [5.147.27.172]) by st43p00im-zteg10073501.me.com (Postfix) with ESMTPSA id 7C12EAE0662; Mon, 22 Feb 2021 13:07:17 +0000 (UTC) From: Joachim Gehweiler Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: BUG #16827: macOS interrupted syscall leads to a crash Message-Id: <6FB1D6CA-4102-4077-ABFD-C88EAC47BC88@icloud.com> Date: Mon, 22 Feb 2021 14:07:07 +0100 To: tgl@sss.pgh.pa.us, andres@anarazel.de, ricardoungureanu@gmail.com, kimon.krenz@part9.com, pgsql-bugs@lists.postgresql.org X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-22_02:2021-02-22,2021-02-22 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=927 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2102220121 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane writes: > Andres Freund writes: > > Tom, all, this seems like a serious problem likely to become more > > widespread. I don't really know how we can reasonably address this > > short-term, adding EINTR handling to all the places that don't yet = have > > it (and ensuring that it stays that way) seems like it's a lot to = backport. >=20 > The only idea that comes to mind is to invent a wrapper for open > (and other affected syscalls) that adds a loop-on-EINTR. Ugly, > and it would not fix third-party extensions until they're recompiled. >=20 > My inclination is to regard this as something that's Apple's problem, > at least for now. Perhaps they'll realize what a disaster it is. > (OTOH, they've proven pretty mulish on making SIP usable=E2=80=A6) I would strongly vote to go for the loop-on-EINTR wrapper for open that = you=E2=80=99re suggesting, maybe also add a switch for it to the configuration with = default ON for macOS and OFF for all other platforms, for the following reasons: - the change that Apple made is not a "bug by accident=E2=80=9C but a = design decision, and Apple is known for not reverting design decisions, no matter what = chaos they imply (just recall the disaster that rewriting the USB stack = caused 5 years back, rendering thousands of USB devices useless; especially in the = music production business it=E2=80=99s the same procedure every year that = several companies are forced to provide hot fixes to make their software = usable again) - though I agree that it=E2=80=99s a no-go to introduce such a breaking = change, to some extent there seems to be a reasoning behind it: some antivirus = products are really slow on certain files (big zip files containing thousands of = html files, e.g. browsable html-ified documentation, easily can take dozens of minutes = to scan). So Apple might argue that their change ensures the systems to = stay responsive when antivirus is failing. This makes it less likely that = Apple will revert their change Regards, Joachim Gehweiler