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 1pr4ja-0003Ri-E5 for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Apr 2023 22:32: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 1pr4jY-0001NH-9v for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Apr 2023 22:32:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pr4jX-0001N8-WB for pgsql-hackers@lists.postgresql.org; Mon, 24 Apr 2023 22:32:32 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pr4jV-004sFd-44 for pgsql-hackers@lists.postgresql.org; Mon, 24 Apr 2023 22:32:31 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 42AC85C007A; Mon, 24 Apr 2023 18:32:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 24 Apr 2023 18:32:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1682375547; x=1682461947; bh=BZ 7AftbuoaOYEhWbCNaAb/dCwoAcDbBWsoOGh91ZsRA=; b=mlIbCyp0CUEd6rzNy8 2GQim1e8EUwUX5ChVhhRSPxHlIlDLXqe7q7UBOoG39+bHs22JcmYhe16muaKKJVq qAEey8ldSn8rmdlc0FnlkuEb5zDwNAMQxLgUS04Wy4BkHJorp6q3UdJ2DDQYAd8D 20qn505Q6ZJxo/jtibmFmW50o8XKWH92/dAzz3DGNt5MunX0C68IjMz3a0pz7ZcT zPpsvai9DAuQ8+zxOaC27SHlzTemzYe/W8AGIaguV+PQdh1Hzd17sRhyYk5IiW5i ROGnni9f+h20RxvrgCX0Wu70XmgwKbuxzg46mDqBINFrReVIL1oAHFlYJSIYhZY7 /EPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682375547; x=1682461947; bh=BZ7AftbuoaOYE hWbCNaAb/dCwoAcDbBWsoOGh91ZsRA=; b=hxcwMpBSsQO0b0MPjk9QrPnQRJmKB UkHCJXqwVbFz0WEYg3rYmlFXlAcG30sM6U11gAUPRScBnqJTCu+T/F17IuihES7u ZAJBHjoN4p8wMOX7FT7TNWHAW7KkOt07iA8LjtBUwRsnUXxorDG8UEk1k8OahB6I QGj1blgY+VYznOHUNyqpiONal9tOH/qvej8YFT1PnzqtRQxwl+QzWadkyfv63Mur Ul3mOV4cUbMRDYVBQfZ8PTdILbm2dTECqKH8rzF+2YX6J9fsY2XoVokH0jwPnfS+ eBNXURK2aBAon9kl/RIqV1miYl5Zrz34PqFxl4rHFRioHtCWJgiztD7Rg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduuddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepledtgeekveehgfekgfevtdeigeevjeeutdffgffhveduhfdugeffgeei udduieevnecuffhomhgrihhnpegughdqihdrnhgvthenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdgu vg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Apr 2023 18:32:26 -0400 (EDT) Date: Mon, 24 Apr 2023 15:32:25 -0700 From: Andres Freund To: Christoph Berg , Thomas Munro Cc: pgsql-hackers@lists.postgresql.org Subject: Re: could not extend file "base/5/3501" with FileFallocate(): Interrupted system call Message-ID: <20230424223225.gle3x3sw5m4div2l@awork3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-04-24 10:53:35 +0200, Christoph Berg wrote: > I'm often seeing PG16 builds erroring out in the pgbench tests: Interesting! > I don't think the disk is full since it's always hitting that same > spot, on some of the builds: Yea, the EINTR pretty clearly indicates that it's not really out-of-space. > https://pgdgbuild.dus.dg-i.net/job/postgresql-16-binaries-snapshot/833/ > > This is overlayfs with tmpfs (upper)/ext4 (lower). Manually running > that test works though, and the FS seems to support posix_fallocate: I guess it requires a bunch of memory (?) pressure for this to happen (triggering blocking during fallocate, opening the window for a signal to arrive), which likely only happens when running things concurrently. We obviously can add a retry loop to FileFallocate(), similar to what's already present e.g. in FileRead(). But I wonder if we shouldn't go a bit further, and do it for all the fd.c routines where it's remotely plausible EINTR could be returned? It's a bit silly to add EINTR retries one-by-one to the functions. The following are documented to potentially return EINTR, without fd.c having code to retry: - FileWriteback() / pg_flush_data() - FileSync() / pg_fsync() - FileFallocate() - FileTruncate() With the first two there's the added complication that it's not entirely obvious whether it'd be better to handle this in File* or pg_*. I'd argue the latter is a bit more sensible? Greetings, Andres Freund