From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Mon, 27 Dec 2021 12:59:12 +0100 Message-ID: <87o852cl7z.fsf@gnus.org> References: <87tufmjyai.fsf@gnus.org> <83sfuqb5yo.fsf@gnu.org> <87fsqoyiao.fsf@gnus.org> <83v8zk96yh.fsf@gnu.org> <87zgowvmt5.fsf@gnus.org> <838rwg8z8i.fsf@gnu.org> <871r28vg4y.fsf@gnus.org> <834k748wez.fsf@gnu.org> <831r288vne.fsf@gnu.org> <83zgow7fpi.fsf@gnu.org> <83y24g7dui.fsf@gnu.org> <8735mnr5cb.fsf@gnus.org> <83bl19zwwy.fsf@gnu.org> <87bl18g7r3.fsf@gnus.org> <83ee64ych1.fsf@gnu.org> <83o853pydo.fsf@gnu.org> <875yrbzjc5.fsf@gnus.org> <8335mfpox7.fsf@gnu.org> <83pmpjo79j.fsf@gnu.org> <83ilvbo2ab.fsf@gnu.org> <83h7avo1l6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7008"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 27 13:00:06 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1ofe-0001dT-Id for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Dec 2021 13:00:06 +0100 Original-Received: from localhost ([::1]:45878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1ofc-0002Jj-Il for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Dec 2021 07:00:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1of0-0001e5-Bq for emacs-devel@gnu.org; Mon, 27 Dec 2021 06:59:26 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=58838 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1oey-000756-Sq; Mon, 27 Dec 2021 06:59:26 -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=lvQ411sLswgruisjWd6OINiPChGR6V9ZF5C6C7oxopE=; b=A42OHLLWjqlmmlR0qnPgpWzs2g sz2QgjbMzEQoDeJ6gnuBGqBKpILkj+DuwoIHDxmkLMiv2RY5D0/Se8AUYbD2dn/cM8diCsbkmX4UF rAIMRZQXYXbNISemdyCEaNsQ5aaph1/gkCHNEvv7KLbLBxviC7HcaGSYUIh5GCqovIPs=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1oer-0005Ew-IG; Mon, 27 Dec 2021 12:59:20 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEWWa1iulI2jbF2W WTz///9An9F3AAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UMGws3CrQyu8UAAAG2SURBVDjLZZQBssIw CESrJzD0ArJcwIb73+3vQlrr/I7TVp5hF0LcHmOMyKkbL2CM11bXGM4YvOL5wHAD3ngTDMuJUXGu NFcEEEB6RZ+ZH4UZabDnzvAnD6YrYHgWiAmG+Ngv8O5UNitBgukatPiIo8CeQZFHgUFglg1s+ToB BdqLaqRxXq8Cp5cG1u/2A6BMq5IGY4FYarwIMuaZqbp5B2rq2I+I1l5AX1mJJVNd8bbL9fBdXn+A hZro9h8gTQD6/IARfHFWZt8FAsOjavXq0R1wjVaAavNKtq2nWjpxk29g3CrD2Vy/gaAlDxYISuEG kGADxGOZXsBDAgIanTswdpa3qTmscpYrmMaUGzX22UtOoI9pO4Bf4D0ldD3LWbdEw9qzgAJKcNqV pM6HxG8ArKML54P9WsDMq0uhmxopydIwGcpKVb61BRtLda+RqsnVOmjHBKJsxQ3wx5vqGb0ZleoC 7c8qMuWqBpZnkEDnhl3PBY4vmDVcWbMaJ0BPokQisIA14DkvEUlT4tj1tsmChp8xKcCOOr/YTCLp F+jzK4Cqmo2rfunU1QRsNYBVmrA2mH8ROeMPKf2ChUdv/oIAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjEtMTItMjdUMTE6NTU6MTArMDA6MDA47whcAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTEyLTI3 VDExOjU1OjEwKzAwOjAwSbKw4AAAAABJRU5ErkJggg== X-Now-Playing: Jane Siberry's _Love Is Everything (2)_: "Barkis is Willin'" In-Reply-To: <83h7avo1l6.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Dec 2021 16:57:57 +0200") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283415 Archived-At: Eli Zaretskii writes: > + ;; On MS-Windows/MS-DOS, we could have race conditions whereby > + ;; the value file might not exist for short windows of > + ;; opportunity. So try reading the file on those systems if it > + ;; doesn't exist or looks outdated, as our reading method can > + ;; cope with some of those races. > + (if (or (and (file-exists-p file) > + (time-less-p (multisession--cached-sequence object) > + (file-attribute-modification-time > + (file-attributes file)))) > + (memq system-type '(windows-nt ms-dos))) > + (condition-case nil > + (multisession--read-file-value file object) > + (error (multisession--cached-value object))) I don't think this is quite correct -- this means that an older version of the file will be read (and overwrite a newer value) on Windows. But I don't understand the analysis here -- according to your other mail, the file always does exist in these tests. True, there might be a race condition here, but the file exists before the file-exists-p is called, and it exists wen the --read-file-value is called, so it's possible that there's a race condition. But doesn't it seem more likely that it's the `file-attributes' call here that returns outdated data on Windows? That would explain all the symptoms you're seeing, I think? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no