From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26788 invoked from network); 7 Aug 2021 11:47:36 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Aug 2021 11:47:36 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628336856; b=ffQ1DgScr+qR2rEMSPrMvsirEuGPh5UbEWbzmtyqqT4P/cUXhrxpHcNQtEXn68uZ4xvCfKPR34 l4e/8KFripfQmi+crmqPyL1bTEKtD4OEYjx5Awl7sJV4m5S/HWHTsKJKKreLOL/Tm7evwfg3ag 59cYrZOZWmVwo8wpRz/D9LwVwbO2gIN90fi6ZDqHSdbAyPF+yAxkXvw42f91KRnk5h/OC1yq0v f+QNWRBs66Ubz2YAFxP9PHSGk8FntwjoC6bMAY+oObF6lvMZVUUFkO4ABVTbheQfh7o01FXRTR RNHinDKepJbtAB0/8jhuqPV0rWtjimCQ6Hu+u4vCruhZqw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (pepin.polanet.pl) smtp.remote-ip=193.34.52.2; dmarc=none header.from=polanet.pl; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628336856; bh=knBc33xRbOS9mqJSJ8rQ2IWHmK9UxpAbBneYmEEwHIY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature; b=ToeIXt1NlpJct1ivMW5jPIGPkM600C3RMW1UZzlwvvsM+MTsInPBbig5R05lE7/DKUXiwg2EzU IKvCuQHEx98YFDn8GFrJyAROBd8B9AU7Lic1T9IVHTeptuy0M+dDazrsZeC1zPM6R0faVobd3m DXwkGAnMzDD6NZz/5UTj2IfQ71XJ3WZ4L9FO8smrz7Y5fsnT9mmUlWn8WhmXzkO8OtlioNuoOc 6n9UuZgJGzm8oWtmqOcY7dEGPmcDdqxJUZMSa7ZOkDck6LjToNMhUO5nhVeIfAs9YlsA+exGVJ 8NplS9hLKBv9VUnTAd7ArI+VkKwryVyV3QwVKGKUCVMbEQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=CLDnurFL86zrMaYgZ7knVjt3hzPLd7GB7IYeDQ0YpxU=; b=RouHogeuLOr0HncLdD6xK0DDul 2mUlQEwcLinsRpMArPS4mkWbPT5XFSq6CMArx97K3djBWTdhnhKsLZopYKC/zjpjuQ0gPP7TFWZ7E O73+6IUyb0Wyd5pmb1NnJnzYdU07RCeQmGp818fCUebEMI0Qs4try5Zpp4K6j31l4hapNFVQDC6Yz 5jb0nF65QgOe/x5VBWVrkQbzkiBR4FAFPDi/khF9EkUNujD6BlQZwa+YkKJgFDJdbIpUsgjZNi4kT MgeMlylruUeUCUyFaTlwBV1DxsuCCzGiKQieFAXd3BaCCQXMVQvLFdr/X5gE7yx0r516EcOhGVjiu HCTmFMvQ==; Received: from authenticated user by zero.zsh.org with local id 1mCKne-000NNJ-BX; Sat, 07 Aug 2021 11:47:34 +0000 Authentication-Results: zsh.org; iprev=pass (pepin.polanet.pl) smtp.remote-ip=193.34.52.2; dmarc=none header.from=polanet.pl; arc=none Received: from pepin.polanet.pl ([193.34.52.2]:57714) by zero.zsh.org with esmtps (TLS1:DHE-RSA-AES256-SHA:256) id 1mCKmn-000Mfb-Pk; Sat, 07 Aug 2021 11:46:42 +0000 Date: Sat, 7 Aug 2021 13:46:40 +0200 From: Tomasz Pala To: zsh-users@zsh.org Subject: zcompiled files not used Message-ID: <20210807114640.GA16427@polanet.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Seq: 26874 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Hello, I've stumbled upon a weird zsh behaviour regarding zwc files. There's a read-only root filesystem with overlayfs (just a regular boot with systemd.volatile=overlay). $ cat /etc/zshrc autoload -U compinit compinit $ strace -efile -f zsh -i -c exit 2>&1 | grep /etc/zshrc stat64("/etc/zshrc.zwc", {st_mode=S_IFREG|0444, st_size=312, ...}) = 0 stat64("/etc/zshrc", {st_mode=S_IFREG|0644, st_size=31, ...}) = 0 openat(AT_FDCWD, "/etc/zshrc.zwc", O_RDONLY|O_LARGEFILE) = 3 openat(AT_FDCWD, "/etc/zshrc.zwc", O_RDONLY|O_LARGEFILE) = 3 - this seems fine, but following doesn't: $ strace -efile -f zsh -i -c exit 2>&1 | grep _zip lstat64("/usr/share/zsh/5.8/functions/_zip.zwc", {st_mode=S_IFREG|0444, st_size=19312, ...}) = 0 lstat64("/usr/share/zsh/5.8/functions/_zip", {st_mode=S_IFREG|0644, st_size=9735, ...}) = 0 openat(AT_FDCWD, "/usr/share/zsh/5.8/functions/_zip", O_RDONLY|O_NOCTTY|O_LARGEFILE) = 3 /usr/share/zsh/5.8/functions$ stat _zip _zip.zwc File: _zip Size: 9735 Blocks: 24 IO Block: 4096 regular file Device: 2bh/43d Inode: 1226 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2021-08-07 13:06:04.699999998 +0200 Modify: 2020-02-19 00:48:26.000000000 +0100 Change: 2021-08-07 13:05:56.013333331 +0200 Birth: - File: _zip.zwc Size: 19312 Blocks: 40 IO Block: 4096 regular file Device: 2bh/43d Inode: 1284 Links: 1 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2021-08-07 13:17:19.136666661 +0200 Modify: 2021-08-07 13:17:05.169999992 +0200 Change: 2021-08-07 13:17:05.169999992 +0200 Birth: - /usr/share/zsh/5.8/functions$ zcompile -t _zip.zwc zwc file (mapped) for zsh-5.8 _zip The same happens with zcompiled -R -U -z -k. This is 32-bit image for HP thin client, this time run in 64-bit QEMU/KVM guest. However, when I chroot into this directly from the 64-bit host, the behavior seems fine - there's a bunch of lstat64() without openat() of _zip file (esp. when I create digest functions.zwc). My intention is to generate /usr/share/zsh/5.8/functions.zwc on boot: zcompile /usr/share/zsh/5.8/functions.zwc /usr/share/zsh/5.8/functions/* as the destination thin client has very slow CPU and flash drive (20 MB/s sequential read) and it takes over 1 second to read all the 7 MBs of completion files and spawn new shell each time. regards, -- Tomasz Pala