GNU bug report logs -
#70415
30.0.50; [Cygwin] `lock-file' creates a symlink with funny name
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Tue, 16 Apr 2024 12:34:04 UTC
Severity: normal
Found in version 30.0.50
Done: Ken Brown <kbrown <at> cornell.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 4/22/2024 12:15 PM, Ken Brown wrote:
> On 4/17/2024 8:21 AM, Eli Zaretskii wrote:
>>> Date: Wed, 17 Apr 2024 08:58:42 +0900
>>> From: Katsumi Yamaoka <yamaoka <at> jpl.org>
>>> Cc: 70415 <at> debbugs.gnu.org
>>>
>>> On Tue, 16 Apr 2024 16:32:17 +0300, Eli Zaretskii wrote:
>>>>> .#FILE -> username <at> hostname.1234:-11644473599
>>>>> For that case `(unlock-file "FILE")' issues this warning:
>>>>> Warning (unlock-file): Unlocking file: Invalid argument, FILE, ignored
>>>
>>>> The part after the colon is the system boot time, and is used on all
>>>> Posix hosts.
>>>
>>> Oh, I had never seen it until recently. Thanks.
>>
>> The question is: why it started appearing only recently? The code in
>> filelock.c hasn't changed since last December, if not earlier, so if
>> this started happening recently, it could only be because Gnulib's
>> get_boot_time or its Cygwin implementation changed, such that it was
>> previously returning zero whereas now it returns non-zero (which
>> triggers the addition of the ":BOOT_TIME" part to the file name).
>>
>>>>> | commit 393f58c85aeb78f814866ccaad9ae7efd3fa6766
>>>>> | Author: Adam Porter <adam <at> alphapapa.net>
>>>>> | Date: Fri Mar 8 23:43:14 2024 -0600
>>>
>>>> This is extremely unlikely to have caused the problem. It is more
>>>> likely that some change in Cygwin and/or in the Gnulib's boot-time
>>>> module causes this now.
>>>
>>> Indeed. But the fact is that Emacs built with that revno adds
>>> a colon and a negative number to a link name and the one built
>>> with just before it does not. No problem on 29.3.50 and earlier,
>>> either (i.e., not add a colon and numbers).
>>
>> Then please step with a debugger through the relevant code in
>> filelock.c, before and after that change, and see why they are
>> different. I cannot explain that, even after doing "git log -L" on
>> all of filelock.c: the most recent change of the related code was in
>> Aug 2023, AFAICT, which is a very far cry from Mar 2024.
>>
>> And even if we understand why you now get the ":BOOT_TIME" part,
>> there's still the question why it cannot be unlinked, if Cygwin
>> supports file names with a colon. Maybe it's because Emacs creates a
>> symlink, and symlinks with such names are not supported by Cygwin?
>
> I'm still traveling for another week and won't have time to try to
> reproduce and debug this until I return. But I did do one quick test in
> a Cygwin shell. I created a symlink
>
> .#FILE -> username <at> hostname.1234:-11644473599
>
> and deleted it with rm. So symlinks like this are indeed supported by
> Cygwin.
>
> To be continued...
I finally had a chance to look at this, and I can't reproduce the
problem. The autosave file does not have the ":BOOT_TIME" part, and it
gets deleted properly when the file is saved. I'm running the latest
stable release of Cygwin (3.5.3) on Windows 11 (version 23H2, build
22631.3447).
Ken
This bug report was last modified 1 year and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.