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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20691 invoked from network); 19 Mar 2023 21:53:49 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Mar 2023 21:53:49 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1679262829; b=SlSypmXYHHV0HI5p/XeRJs24ostfabcGQaSEhmi1Kh82BYOe09fCpkyRuFZQ/sEdSR/W8ryvz7 26KJX1OcjMY2husQhiKn/91C8msodUgaF5rrD86qS2CLy35W64Waxm0nWRuRl7F5sk9MlcWi31 WcZhbT/foNfX5R3keVWGmxleqMDzADtVVXw3ffYiOF+6R6fN7Wy5pYv3kIu6kqv3lCbY7y/ttP oRpOUBvA3H3Y7oMfsijy2MnOPz/j9cYJ/be9Qiv+fJCV3mO5IHRfmrnp3Dyo3iRzDXGSMPvpdH oU1I1u5tOga3AezpWA4OsNNwIo+/5R0zEGZfoFq4MAAzwQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-40131.protonmail.ch) smtp.remote-ip=185.70.40.131; dkim=pass header.d=protonmail.ch header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=protonmail.ch; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1679262829; bh=NVv51eH13PK02WQU6R8UF2v+EYDqZobBmBPAVnSuodA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Subject:Cc:From:To:DKIM-Signature:Date: DKIM-Signature; b=REYYLTRzmYeK16gTC6H0ZGzuLxtoaT+/3a9ndSXhPsHcyznfwX6ERrF9UG8FYva2uDpu4PsHql PybZML1BsgJZlNu51pjAQANbWlZ6eTpv6mogdpw6Je/mv30yB3Z09AoK2o5qD9vMjrFsYAs3UO +vWct+dMkFMnvdZSK2vomtUE1b7qeEYOi1prZG+LEQckzgYb61tukbXZ2jThvzhL2D031Egajp ZKwFjipxo1cwMNHp2VFjjeGNzXngrZ2B59MsFU7ziELvuvGut1uUX8Gd394Dch1F6RstxRVWP0 cqFXOyw9AlU2WCU1CBqCszJrUVV+XPFCZrnzdHcOO2+1zg==; 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-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:From: To:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=sBAieUatmet2mFEBycq5fD1TWtNUjs6gBQqwVFPI4Z8=; b=WO+rgcYRRKPTrA+5xyT51DdFTk aIfmCA+pumVg75bn1XTIERfh9RszNcQYQ7YTRKacIPDnT18D7JNzs0/7ooHREcLP+Lnc4RtnwmvRI BNHYE6TNME8m/MjjTzoyLLmZTW+Xnokl+JOgDn9vCwPPH+3GE6d+Y31q4xDpsjZubtQfQkB6sAxMM F1rM2aThvYe/E0a3MWWfvCfhr9vc2zk+Tli++9ENdrubMi5no4G0Ld6TH9sb3zWKXyzvp1OIpd5GN VpA/M3qetaiQNJ/uW1qI0uv4lxI4Oz0sngmh8VOzvR+HqFKUu1vOc9KynDmyxI06NYBT19QuJs7wY 60zwCEmA==; Received: by zero.zsh.org with local id 1pe0yL-000Cuj-EU; Sun, 19 Mar 2023 21:53:49 +0000 Authentication-Results: zsh.org; iprev=pass (mail-40131.protonmail.ch) smtp.remote-ip=185.70.40.131; dkim=pass header.d=protonmail.ch header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=protonmail.ch; arc=none Received: from mail-40131.protonmail.ch ([185.70.40.131]:26853) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pe0xl-000CD5-Fm; Sun, 19 Mar 2023 21:53:15 +0000 Date: Sun, 19 Mar 2023 21:53:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=protonmail3; t=1679262792; x=1679521992; bh=sBAieUatmet2mFEBycq5fD1TWtNUjs6gBQqwVFPI4Z8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=APB9yzvHgLRaaLF0m0BofB4Dzi+NfpmkzhuQxBNrmrW/ZVsm7n9U8yDXHu9XUpSFY JzeFn0a5649yC+Ja+LS9kfbPVm72y6cHJDJLpWVgtX9TC2B+yHOaLGa1zKNj459pyC TwdptGBzl8YVDPcO0FQpLXTzvaCtmqE8YqMXDd8m+UshIsfNBVMUnxx8mpG6Dk/Z9A RWuUOc9OQmaQEPUElYsqYq4fiMaT43Amrd1VLhH24LnkLrAhUTGqouU99UGOpeovzg ejDQvjamBJtnf5QQjCiABPySKsvtcl7QIRVarzbFUOVFCzp1KlZTrP318N6E/WTpVs bDl19o0NHZ1qw== To: Bart Schaefer From: Piotr Karbowski Cc: zsh-users@zsh.org Subject: Re: The HIST_EXPIRE_DUPS_FIRST might corrupt and wipe partially history file if many shells exit at the same time Message-ID: In-Reply-To: References: <33a75d10-d765-3d79-a179-943c57659111@protonmail.ch> Feedback-ID: 7579861:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 28978 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: Hi, On 19/03/2023 22.34, Bart Schaefer wrote: > On Sun, Mar 19, 2023 at 2:17=E2=80=AFPM Piotr Karbowski > wrote: >> Anything else I could provide to help norrowing it down? > Did you try my suggestion of timestamps from .zlogout? > > If the shell is being killed from a controlling app or by the OS, > there's not a lot we can do. If that's not what's happening, it would > be helpful to know. Added to .zlogout, will report back the findings when I can reproduce it again. However looking at code, it does write data to new file then does rename. The rename is guaranteed to be atomic so in case of killing zsh instances I would expect at worst to lost the new history entires, not loosing the end-part of the history file, this looks like something bad has happened and it still renamed the partial(?) file into .zsh_history at the end. -- Piotr.