From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70973: 29.1; "Unlocking file: Invalid argument" Warning saving via a softlink with stale file lock Date: Thu, 16 May 2024 21:18:46 +0300 Message-ID: <867cftiprt.fsf@gnu.org> References: <867cfujge6.fsf@gnu.org> <86fruhiwt0.fsf@gnu.org> <868r09ivqn.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70973@debbugs.gnu.org To: Duncan Greatwood Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 16 20:20:35 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1s7fiV-0002lM-GL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 May 2024 20:20:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7fiB-0008Nf-K9; Thu, 16 May 2024 14:20:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7fhw-0008LS-D3 for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:20:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7fhv-0006Bw-Ua for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:20:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7fhy-0001w1-91 for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2024 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70973 X-GNU-PR-Package: emacs Original-Received: via spool by 70973-submit@debbugs.gnu.org id=B70973.17158835487388 (code B ref 70973); Thu, 16 May 2024 18:20:02 +0000 Original-Received: (at 70973) by debbugs.gnu.org; 16 May 2024 18:19:08 +0000 Original-Received: from localhost ([127.0.0.1]:50189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7fh4-0001v6-Ub for submit@debbugs.gnu.org; Thu, 16 May 2024 14:19:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7fgx-0001ua-4s for 70973@debbugs.gnu.org; Thu, 16 May 2024 14:19:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7fgo-000647-GC; Thu, 16 May 2024 14:18:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xM3j4wXpuLLsFdybrOf89qyYgUU7Ssar7k7QPy+aXYA=; b=N8zWFeO1/Grh 9RHGvuXmITNB0Z6hXKcz9Cfq6eSzdU7ENnYOEVTWmCZiYKpHwLiG2oo5EgihrWV8Rx4oUBqkW2KfG pTGJhk3m5nG0XdKe5jn8nkT1D/anyIjZjR41k0nb48jU+uqEXunrzKvTbwB8ZoleheiBQC5FiUY4y +QghGll+QtJ8YCr1AS9wr8J/GA5t7Jr6JgtMzOPfJ2f9vnciTzySCTFTPScvyX5wfB6BaWYrnlH/I SbePt2n2scm60uuTAOiR2wR+JTcTMMSNX8/QJMafpQdObcOznaA4OZ0DvfA33L8LVEL8ioQlKi5dt aVREqmYe5IktXINEkQSGyg==; In-Reply-To: (message from Duncan Greatwood on Thu, 16 May 2024 09:20:46 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285181 Archived-At: > From: Duncan Greatwood > Date: Thu, 16 May 2024 09:20:46 -0700 > Cc: 70973@debbugs.gnu.org > > AFAIK, there is nothing about the symlink that is macOS or DropBox specific. > > Again, ~/.emacs is a symlink to the file in the subfolder of ~/Dropbox. > > The lock file is not a symlink. > > Emacs does not create lock files that are symlinks AFAIK. That is not true. lock files are normally dangling symlinks, i.e. their target does not exist. On a few systems where lock files are not symlinks (I knew about only one: MS-Windows), lock files are regular files, but then they are not empty. And your reports indicate that it is a regular and empty file: > As follows: > $ ls -l ~/Dropbox/Documents/Projects/emacs/.#dotemacs > -rw-r--r--@ 1 username staff 0 May 16 07:13 /Users/username/Dropbox/Documents/Projects/emacs/.#dotemacs This is unusual, because it means the information that a lock file should record: the user and the process ID that locked the file -- is not recorded anywhere. It is usually recorded either in the name of the symlink's target or (if the lock file is a regular file) in the file's contents. So something here is not "normal". If indeed on macOS lock files are not symlinks, they should be regular files which are not empty. If you could step with a debugger through the code of the C function create_lock_file and see what happens there when Emacs locks a file you edit, we could make some progress in investigating this bug.