From unknown Sat Jun 21 10:28:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44631 <44631@debbugs.gnu.org> To: bug#44631 <44631@debbugs.gnu.org> Subject: Status: 28.0.50; Byte compilation fails if destination file is a mount point Reply-To: bug#44631 <44631@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:28:55 +0000 retitle 44631 28.0.50; Byte compilation fails if destination file is a moun= t point reassign 44631 emacs submitter 44631 Philipp Stephani severity 44631 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 07:40:10 2020 Received: (at submit) by debbugs.gnu.org; 14 Nov 2020 12:40:10 +0000 Received: from localhost ([127.0.0.1]:49994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kduqg-0003Nh-Bd for submit@debbugs.gnu.org; Sat, 14 Nov 2020 07:40:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:38656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kduqe-0003NW-Kk for submit@debbugs.gnu.org; Sat, 14 Nov 2020 07:40:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kduqe-0000qH-D1 for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 07:40:08 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:35687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kduqZ-0002Qr-TE for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 07:40:07 -0500 Received: by mail-wr1-x42a.google.com with SMTP id k2so13347730wrx.2 for ; Sat, 14 Nov 2020 04:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=fJH+M+2Pm7OdWMcKPuLEL7rhjN/QLKW5W3JvNjF1v64=; b=DaBUsERlRTVjw34EgTjBouCBa96biBF0mzxeysJHAonfqvRz8VDX8EV6ePb288DuHJ BtuYmDX7TwZgaaMfEcknI5L4DF5ZZzvh1c+hxcWHo/ZvU6xeaJybWRewJSjWUQlMZgSX N2y4apArIZQBOZ6MQBMvaZyfzahlVEMwm/vkEZZn5nby5aCxSM1+qdTPrpB0kmrnSVzd 0ZOXRjz2bUtotKvksI603RyvbBWPdxk/5Y9GbTbqGc5sl2ZX7JbobCPl8BKS9YR9pgpi XX1hmSfhCXUIrYPHHxwp+4bJojCoZOML58c3NVgNx/UpwAIDf8scQYAEfhz22bfrBzVd H7EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=fJH+M+2Pm7OdWMcKPuLEL7rhjN/QLKW5W3JvNjF1v64=; b=KvBwGnQU0wwlgsxwiBVLr/KiCLu9gjue2n8SKlFXTU0Qyl8jj5n+NAqUwfSXJ2ZU3x 73I93QsxUYgq2Qlb4JmFV/FFLt4n8NL9fdySk0jjB/fsv1PAUTPGNqq6WFDwe/5QYf1B ejsGJVsPghsAgXsZhEca4iT8K0MPbiqNLLtj2U4KZ+oQFKpIsn6ZZ4i0wktoHUWous1d OL4xsihkT0sPP6Ow0q8cr0RXZIILymGWxB8hdwl+Go1emnXPr4ptpAm4MaXcwu4SmXT/ C4FuYd0Whcxx5Q1TQ9iVNIechELne3O3xCGaz4hXlhYy0ZjLk2zi7V2rRFflRfTPaRBy +o+A== X-Gm-Message-State: AOAM531rxtJiVjRGLdKAxaNWKlS2qUqrl5wevJ64wOr/hruxYQCK8GUR BKCsBqxqr35n1YS3JklSlW+AWo/9j24= X-Google-Smtp-Source: ABdhPJxkXl+yN12zHGnOuqqfDRSmWWdPxIhl6IVgTwtFv2N0Nedau9wITcAMTEXcQdS9oARh1n5yPg== X-Received: by 2002:adf:ce07:: with SMTP id p7mr10066419wrn.39.1605357600387; Sat, 14 Nov 2020 04:40:00 -0800 (PST) Received: from phst1 ([46.128.199.221]) by smtp.gmail.com with ESMTPSA id g186sm23496924wma.1.2020.11.14.04.39.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 04:39:59 -0800 (PST) From: Philipp Stephani To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Byte compilation fails if destination file is a mount point Date: Sat, 14 Nov 2020 13:39:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=p.stephani2@gmail.com; helo=mail-wr1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) $ mkdir /tmp/mount $ touch /tmp/mount/{file.el,file.elc,out.elc} $ sudo mount --bind /tmp/mount/{out,file}.elc $ emacs -Q -batch -f batch-byte-compile /tmp/mount/file.el >>Error occurred processing /tmp/mount/file.el: File error (("Renaming" "De= vice or resource busy" "/tmp/mount/file.elc91nN38" "/tmp/mount/file.elc")) Removing old name: Device or resource busy, /tmp/mount/file.elc Granted, this is rather exotic. Nevertheless, byte-compile-file could fall back to a direct write-region without temporary file + rename, or rename-file could fall back to copy + remove on EBUSY (like EXDEV). In GNU Emacs 28.0.50 (build 123, x86_64-pc-linux-gnu, GTK+ Version 3.24.22,= cairo version 1.16.0) of 2020-11-14 Repository revision: b13e87c35bb0215c211a456b8bc3184bf16eb5de Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux rodete Configured using: 'configure --enable-gcc-warnings=3Dwarn-only --enable-gtk-deprecation-warnings --without-pop --with-mailutils --enable-checking=3Dall --enable-check-lisp-object-type --with-modules 'CFLAGS=3D-O0 -ggdb3'' Configured features: XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER Important settings: value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc dired dired-loaddefs rfc822 mml easymenu mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils phst skeleton derived edmacro kmacro pcase ffap thingatpt url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars mailcap rx gnutls puny dbus xml subr-x seq byte-opt gv bytecomp byte-compile cconv compile text-property-search comint ansi-color ring cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 69605 6950) (symbols 48 8580 1) (strings 32 24388 1373) (string-bytes 1 790285) (vectors 16 13889) (vector-slots 8 188851 5441) (floats 8 26 30) (intervals 56 212 0) (buffers 992 11)) --=20 Google Germany GmbH Erika-Mann-Stra=C3=9Fe 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4lschlicherweise erhal= ten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, l=C3=B6sche= n Sie alle Kopien und Anh=C3=A4nge davon und lassen Sie mich bitte wissen, dass d= ie E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don=E2=80=99t forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 11:04:17 2020 Received: (at 44631) by debbugs.gnu.org; 14 Nov 2020 16:04:17 +0000 Received: from localhost ([127.0.0.1]:51662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdy2C-0004dc-JR for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:04:16 -0500 Received: from quimby.gnus.org ([95.216.78.240]:43916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdy2A-0004d8-Ot for 44631@debbugs.gnu.org; Sat, 14 Nov 2020 11:04:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+Pu0afOk7Q/4u25SUS+qSovgF07Po/o7jQKF+QAvdxI=; b=TiTnCNVwSXxPZJpgBZUrhUxi3N urgvzsteb09irzYbJ8rwO5Ak0IlC7wK/SyB+XLUnzpJb+iaE96pZuH4Nr/SUuy7s92vZusUgtJ5nt HDrXPofATo7wtK423mInQO4bBFpG1J+xkcingf8Wa9HOmHMUl/KqeUIZkPzfAo3N6MeU=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdy21-0000SA-Rj; Sat, 14 Nov 2020 17:04:08 +0100 From: Lars Ingebrigtsen To: Philipp Stephani Subject: Re: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point References: X-Now-Playing: Genesis's _Duke_: "Man of Our Times" Date: Sat, 14 Nov 2020 17:04:04 +0100 In-Reply-To: (Philipp Stephani's message of "Sat, 14 Nov 2020 13:39:56 +0100") Message-ID: <87ima8ylfv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philipp Stephani writes: > Granted, this is rather exotic. It's really exotic. :-) I'm just wondering -- did you happen upon this while trying to do something, or is it just designed to trigger the bug? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44631 Cc: 44631@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philipp Stephani writes: > Granted, this is rather exotic. It's really exotic. :-) I'm just wondering -- did you happen upon this while trying to do something, or is it just designed to trigger the bug? > Nevertheless, byte-compile-file could > fall back to a direct write-region without temporary file + rename, or > rename-file could fall back to copy + remove on EBUSY (like EXDEV). Hm... the latter sounds like an easy fix, but aren't there more commond cases where you get EBUSY where copy + remove would fail, too? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 16:03:35 2020 Received: (at 44631) by debbugs.gnu.org; 22 Nov 2020 21:03:35 +0000 Received: from localhost ([127.0.0.1]:48415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgwWF-0007Rv-1c for submit@debbugs.gnu.org; Sun, 22 Nov 2020 16:03:35 -0500 Received: from mail-ot1-f43.google.com ([209.85.210.43]:40502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgwWE-0007Rh-0Y for 44631@debbugs.gnu.org; Sun, 22 Nov 2020 16:03:34 -0500 Received: by mail-ot1-f43.google.com with SMTP id 79so14089058otc.7 for <44631@debbugs.gnu.org>; Sun, 22 Nov 2020 13:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yld+livQuAAbulrAN4NBjIJNJEgknnFq67/0nyf4bYY=; b=gkZQ5nUydKu/HvjOUG1GRRXqiPLqMivDISSU8zCQnPxBhFa+28Rlf2baqeXWhF6424 f5zaKWCv1NAq5V7v/JmhsF9wNeo46d69eDmzombfgUUEfXA3g/OE5y9nRIFa9xUibzot es8Qvju/w3y6fg8MicU3SIkOPauKFyh9n849lcGA8Vsw13R3mKrewBaVGBDM9mxtekgW 2wyxd+d0F2mN6TYYVef/28hCt3j6VimqErUGlZLrVEGCqHPEywsMn9C6c3RsAAt5zFis AxpwttDDMCcaI0MWBXaLYUKaO7u76r42p5v5ifVXMCWtkCxNft4U987lk64RYfcEyM/3 rEhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yld+livQuAAbulrAN4NBjIJNJEgknnFq67/0nyf4bYY=; b=Xmz4cXdOV10QRcObhIbtRJz4XI1Nj/MSUCk3cyNXoClp+ezYtCCbo9P+uWopN2iGHa I1yDag1s/jgOh4prvOtMBJf9E9QAdyhzdfXIDhTYGuhmsivVPPYgrPIL0Z9/gzQbtfqO TYKD96DwYfvgkKxMj70Ssqcvk52rd4Dg9c/wpnWGl2egsmzh93Qnsk1q1uLbnBoVl23J WDIjch2iR6NZa9GzTN8Fol9CGUh0MjDSuRME8HCtlM/hqlCpOiD0vlqTnLujQETa+B8B RfGj+wktUEIu2hFEPccC0tPRItyR36y882Get9s9QrN1jP0rxdNAJ1XtvqblPzjlIIpt Q7XA== X-Gm-Message-State: AOAM533033ykDgaktf9f3QUsF4Bk8LikUUBOcgyhblTD57mRAl/m9PXM 3X83MPtoegECX9A9Llidw3GZSPUiCNCSIQoqEcdCli1f0gQ= X-Google-Smtp-Source: ABdhPJwEWKgPo5BZxvudPQvb0PRj6ZVCOU0zIxHUt3WO4o78SXBEdI7y+r+q/ksTMmVg/4tgXlmgUkdkf99n7DoY4EM= X-Received: by 2002:a05:6830:2301:: with SMTP id u1mr12570973ote.36.1606079008273; Sun, 22 Nov 2020 13:03:28 -0800 (PST) MIME-Version: 1.0 References: <87ima8ylfv.fsf@gnus.org> In-Reply-To: <87ima8ylfv.fsf@gnus.org> From: Philipp Stephani Date: Sun, 22 Nov 2020 22:03:17 +0100 Message-ID: Subject: Re: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44631 Cc: 44631@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Sa., 14. Nov. 2020 um 17:04 Uhr schrieb Lars Ingebrigtsen : > > Philipp Stephani writes: > > > Granted, this is rather exotic. > > It's really exotic. :-) I'm just wondering -- did you happen upon this > while trying to do something, or is it just designed to trigger the bug? I've been experimenting with creating a sandbox for Emacs using https://developers.google.com/sandboxed-api/. That works by (a) installing a Linux kernel syscall filter to limit the allowed syscalls, and (b) enabling user and mount namespaces. Using the mount namespaces, the sandbox can be restricted exactly to the files that Emacs needs to access. In the case of byte compilation, it needs to write exactly one file, the byte-compiled output, so it's possible to mount exactly that file. This bug makes this approach impossible. (That's not a really onerous restriction; one can e.g. mount an empty directory, and then have the output file written there. It would just be nicer if it worked without such workarounds.) > > > Nevertheless, byte-compile-file could > > fall back to a direct write-region without temporary file + rename, or > > rename-file could fall back to copy + remove on EBUSY (like EXDEV). > > Hm... the latter sounds like an easy fix, but aren't there more commond > cases where you get EBUSY where copy + remove would fail, too? Probably, but I guess the situation wouldn't become worse, as presumably these cases already fail today. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 01:16:38 2020 Received: (at 44631) by debbugs.gnu.org; 24 Nov 2020 06:16:38 +0000 Received: from localhost ([127.0.0.1]:52494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khRd0-0003JQ-34 for submit@debbugs.gnu.org; Tue, 24 Nov 2020 01:16:38 -0500 Received: from quimby.gnus.org ([95.216.78.240]:49392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khRcy-0003IK-1K for 44631@debbugs.gnu.org; Tue, 24 Nov 2020 01:16:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=k2ecQILHC1Ai8Sd5zwZ5kEIw7jESl8bgMcicqjQPm7M=; b=mkSw1//z5NUcelrpjODuAWo/dc xYatA8+LwO4EaYE5X+WSxc+0CH26R/ouSLQh1o1KahIrjbnX4D5/2iqhJ3i9ViwBDHezAbPIEAvhB eBp+TN71ggwyL13/JMasY9pre/kvGvxELgmh/YdpCrdhFZ7RV1rn0Me3aKRVZco4Bytk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khRco-0000HN-6V; Tue, 24 Nov 2020 07:16:29 +0100 From: Lars Ingebrigtsen To: Philipp Stephani Subject: Re: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point References: <87ima8ylfv.fsf@gnus.org> X-Now-Playing: The Police's =?utf-8?Q?=5FZenyatt=C3=A0?= Mondatta_: "Don't Stand So Close To Me" Date: Tue, 24 Nov 2020 07:16:24 +0100 In-Reply-To: (Philipp Stephani's message of "Sun, 22 Nov 2020 22:03:17 +0100") Message-ID: <87y2irb7pj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philipp Stephani writes: > I've been experimenting with creating a sandbox for Emacs using > https://developers.google.com/sandboxed-api/. That works by (a) > installing a Linux kernel syscall filter to limit the allowed > sy [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44631 Cc: 44631@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philipp Stephani writes: > I've been experimenting with creating a sandbox for Emacs using > https://developers.google.com/sandboxed-api/. That works by (a) > installing a Linux kernel syscall filter to limit the allowed > syscalls, and (b) enabling user and mount namespaces. Using the mount > namespaces, the sandbox can be restricted exactly to the files that > Emacs needs to access. In the case of byte compilation, it needs to > write exactly one file, the byte-compiled output, so it's possible to > mount exactly that file. This bug makes this approach impossible. Hm, interesting... >> > Nevertheless, byte-compile-file could >> > fall back to a direct write-region without temporary file + rename, or >> > rename-file could fall back to copy + remove on EBUSY (like EXDEV). >> >> Hm... the latter sounds like an easy fix, but aren't there more commond >> cases where you get EBUSY where copy + remove would fail, too? > > Probably, but I guess the situation wouldn't become worse, as > presumably these cases already fail today. No, I can't think of any cases where this would lead to a worse result than the current situation, but it's somewhat scary making a low-level general change like this in `rename-file' -- I have no idea whether EBUSY is used for other oddball failure cases like this. Making the change in byte-compile-file sounds safer, but would require more work. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 12 10:19:46 2020 Received: (at 44631) by debbugs.gnu.org; 12 Dec 2020 15:19:46 +0000 Received: from localhost ([127.0.0.1]:46282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ko6gU-0006Ht-DS for submit@debbugs.gnu.org; Sat, 12 Dec 2020 10:19:46 -0500 Received: from mail-ot1-f49.google.com ([209.85.210.49]:33379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ko6gS-0006HM-Oy for 44631@debbugs.gnu.org; Sat, 12 Dec 2020 10:19:45 -0500 Received: by mail-ot1-f49.google.com with SMTP id b18so11206190ots.0 for <44631@debbugs.gnu.org>; Sat, 12 Dec 2020 07:19:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x9Ep+7Sfx2shYMZuV7XQW6+62BRlHKv3EHXJtBnSjic=; b=tF2BK/rYhUdTtdplQnCjt1to/1vGK2KLWLIh6KF+6z9x8zWK0uyiL8PfM4G5wijm/9 3MdSOnu42gJfs3dQmoaJTnRwQ0Xg//sll4RXq+m4R8iRaYZsuAvri1vQdP/JiVvXZhUE zwOVpxFzqh6/RPe6ooIj+CP3J/SAV3KcpZ1qFcZkFUZYSrUPQ3OzYt598nZYGoKIgnnb FByEDGF5zd6QVJEvsqmMlMcp+7poEniNXmQTfSvrLIEfrT8xwtnvqmcojjDSX2Xwh9Ju 0tFr/LhSPlcxmf8OhDG619zqD7Q4Iu3+T4O4r+PG5Y25yI0GI4QzQk4YOig3ed782ZhF m2vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x9Ep+7Sfx2shYMZuV7XQW6+62BRlHKv3EHXJtBnSjic=; b=CcAv/EY6dKK8Wa32w4u4+sJtUzfYa7xy7cm7Ur1Re3w25Tcd2NnHT6RyZeKsG3BFwo Q8SuHWURlmxEAuZ0hMaH7u/juax+E7Q/1CTbK2X+JyUaOeH3iFB5KCYczrHEqifH5un8 3JA6Ll3nUWbp6AH5qv2Yml8OSiIC1iNCPlCNOpm2TpWoy9bwybW6yOQcPL/PLNkJQwEd ywSLXY4sxZse3c8hzPqA+LmbeAyKL6GedoxCEcMzjQAXW6IeDPf9jXFqSXjzaQ6URmM6 i4RMFdMZlK7Knu6ir4YTxtqrbyr80CvHU0l79uEK4YB8L7GQ9esmPX7C/mC3L4ANCyHG edPQ== X-Gm-Message-State: AOAM533uEvhUHCBq5Fvk9fCTfp+u83eSdJw2kpSYc+xQvPCpn2NliFB0 RS7VzPlM5LxxpWnfLSgm/s3mrDBzRP/GjoyN4Qg= X-Google-Smtp-Source: ABdhPJyAqVw49swwTaL8YgJl0/Gouzt+ppk53kuIQ9m/dd/5wMl7VUKP9HQOHBJLPT9bMkgrxwY9yK2gIyOsqy/Fs5o= X-Received: by 2002:a05:6830:3106:: with SMTP id b6mr7839544ots.36.1607786378975; Sat, 12 Dec 2020 07:19:38 -0800 (PST) MIME-Version: 1.0 References: <87ima8ylfv.fsf@gnus.org> <87y2irb7pj.fsf@gnus.org> In-Reply-To: <87y2irb7pj.fsf@gnus.org> From: Philipp Stephani Date: Sat, 12 Dec 2020 16:19:27 +0100 Message-ID: Subject: Re: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 44631 Cc: 44631@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Di., 24. Nov. 2020 um 07:16 Uhr schrieb Lars Ingebrigtsen : > >> > Nevertheless, byte-compile-file could > >> > fall back to a direct write-region without temporary file + rename, or > >> > rename-file could fall back to copy + remove on EBUSY (like EXDEV). > >> > >> Hm... the latter sounds like an easy fix, but aren't there more commond > >> cases where you get EBUSY where copy + remove would fail, too? > > > > Probably, but I guess the situation wouldn't become worse, as > > presumably these cases already fail today. > > No, I can't think of any cases where this would lead to a worse result > than the current situation, but it's somewhat scary making a low-level > general change like this in `rename-file' -- I have no idea whether > EBUSY is used for other oddball failure cases like this. > > Making the change in byte-compile-file sounds safer, but would require > more work. I guess it also depends on what the semantics are that byte-compile-file guarantees. If it attempts to guarantee atomicity, then only a intra-filesystem rename (or similar alternatives such as O_TMPFILE + linkat) are acceptable, and technically, not even the current fallback on EXDEV (which makes rename-file nonatomic) is OK. If atomic writes are best-effort, then we could always fall back to copy-file + delete-file on any file-error. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 13 07:32:52 2020 Received: (at 44631) by debbugs.gnu.org; 13 Dec 2020 12:32:52 +0000 Received: from localhost ([127.0.0.1]:47602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koQYW-0003YP-4Z for submit@debbugs.gnu.org; Sun, 13 Dec 2020 07:32:52 -0500 Received: from quimby.gnus.org ([95.216.78.240]:57932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koQYU-0003Xq-JA for 44631@debbugs.gnu.org; Sun, 13 Dec 2020 07:32:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kedgTIKAgJ3a7OC43InaJf/eGy4diT+wMm7pqu56rfo=; b=BeNruXLj62leuL10BmrYQAP9zR O3GNW8dGjO7pKh2I6bJNPrxQsjm6R5rp4n0uHd7n5YpYc+ZUPzvYE4QZEHxwc5XFKEEctLXmzM/yp YtqIKR1n7xnGMktBqEZjDlYtJjpeIDDufaRu6tEysDclY4IZ3nxsALAsCQiHfGLKHpbI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koQYI-0004hW-Iq; Sun, 13 Dec 2020 13:32:44 +0100 From: Lars Ingebrigtsen To: Philipp Stephani Subject: Re: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point References: <87ima8ylfv.fsf@gnus.org> <87y2irb7pj.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEUnKjFIWW55hYZX Ym+RmZyMd4beO1DQtL/MydHqHjSzucl8quv////g3T9KAAAAAWJLR0QMgbNRYwAAAAd0SU1FB+QM DQwbKg0MPcAAAAGjSURBVDjLbdFLbsIwEAZgrmDcCxBygcSpVHVpoqrqtmXBvg2EA5DQAxCLAwR5 XzXWdN37dfyIY1MGCYb5/DtOMpvN5nmSJEv9tSCJrxmC/5OR+U1YEkJuQoaQ3wAdIBSblPMyBB3Q kbTUZUA3nJs5obwc4c4uWVgg6QSm4ZmD+RWsCIkiHjIPRQRTgNAIpoDbywEP5vbyDhYZu4pY4Czc ihYeVixMUOaBZZSxac4KBytmyozZfVW95g7sPNMPPW27ppYfqQFul+MUoGla0aEYWOBilrzAGWBo jMj+Tb8PyvJSCSFAB7CEONbvCJRmz8LOh62R5tRXCAUr9Bw3+tlIU31V9QgPehsT+JVj1VsNnQvA xoNsDeyVHsPTNL8IDeKwv5rL1kInq/W6kmFA2IsfZVy7EU7xvBcW8Ke+DrhEHNGBEaLIdgIQhyDQ ejiD6qKzjoB3p6YTtxFAFwcMAOCzVZsoYEGps1LuxD1eUAilEB71Tkq5E++ww1OKEbC+bUAoUBEM Q20C5tVAmAC8yf4TZ/gBFQKeeDv2EAIcbeA/fF18C38TwJZnmmD7qQAAACV0RVh0ZGF0ZTpjcmVh dGUAMjAyMC0xMi0xM1QxMjoyNzo0MiswMDowMOcXzaIAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAt MTItMTNUMTI6Mjc6NDErMDA6MDCnom+DAAAAAElFTkSuQmCC X-Now-Playing: Colleen's _A Flame My Love, A Frequency_: "Another World" Date: Sun, 13 Dec 2020 13:32:37 +0100 In-Reply-To: (Philipp Stephani's message of "Sat, 12 Dec 2020 16:19:27 +0100") Message-ID: <87im956g4a.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philipp Stephani writes: > I guess it also depends on what the semantics are that > byte-compile-file guarantees. If it attempts to guarantee atomicity, > then only a intra-filesystem rename (or similar alternatives such as > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44631 Cc: 44631@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philipp Stephani writes: > I guess it also depends on what the semantics are that > byte-compile-file guarantees. If it attempts to guarantee atomicity, > then only a intra-filesystem rename (or similar alternatives such as > O_TMPFILE + linkat) are acceptable, and technically, not even the > current fallback on EXDEV (which makes rename-file nonatomic) is OK. > If atomic writes are best-effort, then we could always fall back to > copy-file + delete-file on any file-error. It's definitely best-effort, so altering byte-compile-file to try copy-file + delete-file sounds like the best solution to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 13 11:42:14 2020 Received: (at 44631-done) by debbugs.gnu.org; 13 Dec 2020 16:42:14 +0000 Received: from localhost ([127.0.0.1]:49958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koURq-0000Rk-9m for submit@debbugs.gnu.org; Sun, 13 Dec 2020 11:42:14 -0500 Received: from mail-oi1-f180.google.com ([209.85.167.180]:36452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koURo-0000RX-Oh for 44631-done@debbugs.gnu.org; Sun, 13 Dec 2020 11:42:13 -0500 Received: by mail-oi1-f180.google.com with SMTP id 9so9288693oiq.3 for <44631-done@debbugs.gnu.org>; Sun, 13 Dec 2020 08:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ggc/sc6KPwvPBw+tHmHGFFqyJxaHlDnwiPTEXLU0sco=; b=lULfFaLDJ0GFFwIZmU8kqPyRMT+9nlUgQYpQVoG8kRH0ITNQ8IaQjHp5LWPwV6bHsw 5t6IoDQHTuGjlnj0DSihdqWI5CXVez3Li6PurY2gCmNY2W5jHDKyP0CMG71umLnBIdWP OnR/DMzTwQWuH4YfgT9xEcJSt81UTZzG3KK92pWyVCoi8cxzpLGZL9SbY1AW+TAvzQIS sBqN1GH1UA6T7k68vg8Qtwwhy+siiFzo7S/k5lnNWOLbK1lg6bedjSX4oFqCkOsbcLsZ msk6gIEBob3aRj6LAFa0KK02/CYTfN7Hcbeo+Gu40mhShj9UrQALODNIsvCsdO5vNc8+ tkTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ggc/sc6KPwvPBw+tHmHGFFqyJxaHlDnwiPTEXLU0sco=; b=E/gfCrVS/iIVtrNYzUDxxO5CmjvJp9XKFpu44zM4LOFcgEH4jBvl0r0tbwuNWyFTtm 0cMHQ70Kw1IxyO69+QE6z4XQvAsPQJ618E1KJ6f2upR2DNm2GeyYws6vAsjdjVZrS2xF zQORMW6YYWY80FoSV7por/IBaTY/euDigvGnPMrR8JENrm15l4C0xDJJaPhj4JEsvqpf F22+luO2FCuuguxRHKHQHZc5U0u6BOmzcnOmLjFNHIACPF/Y29wYBXuqCC+MfULpeCYi UObxHIJmcCtVukb2LQcN0GmZNxTaQPpg/jizf9uiuhKLIRu5u9NG5froiCfSc88yWY6V SnpA== X-Gm-Message-State: AOAM531DVwNlkjc9L5djri7e50ymQabvNA7Ruq8b1xC9HTV27QSl3eBi PuWSbhs+pN885Iy1MuY0YWzEyIHiJa6Wbxapg8Y= X-Google-Smtp-Source: ABdhPJxgHVkc0zlRREYJUHySTDeU7VZ+ztJgyiwEBKjRAMqZhq9nPz5HB3P/hyLoyOJwewToJ5h0d4rOFGDgOY8Lf2Y= X-Received: by 2002:a54:4881:: with SMTP id r1mr15416252oic.9.1607877726942; Sun, 13 Dec 2020 08:42:06 -0800 (PST) MIME-Version: 1.0 References: <87ima8ylfv.fsf@gnus.org> <87y2irb7pj.fsf@gnus.org> <87im956g4a.fsf@gnus.org> In-Reply-To: <87im956g4a.fsf@gnus.org> From: Philipp Stephani Date: Sun, 13 Dec 2020 17:41:55 +0100 Message-ID: Subject: Re: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44631-done Cc: 44631-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am So., 13. Dez. 2020 um 13:32 Uhr schrieb Lars Ingebrigtsen : > > Philipp Stephani writes: > > > I guess it also depends on what the semantics are that > > byte-compile-file guarantees. If it attempts to guarantee atomicity, > > then only a intra-filesystem rename (or similar alternatives such as > > O_TMPFILE + linkat) are acceptable, and technically, not even the > > current fallback on EXDEV (which makes rename-file nonatomic) is OK. > > If atomic writes are best-effort, then we could always fall back to > > copy-file + delete-file on any file-error. > > It's definitely best-effort, so altering byte-compile-file to try > copy-file + delete-file sounds like the best solution to me. I've now pushed a slightly different fix to master (commit fe50a8b9ba79b4ac14a3a352d8bf84eaee4f2122). From unknown Sat Jun 21 10:28:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Jan 2021 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator