From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#70415: 30.0.50; [Cygwin] `lock-file' creates a symlink with funny name Date: Sat, 4 May 2024 13:46:33 -0400 Message-ID: References: <861q75juvy.fsf@gnu.org> <86zftsgoxt.fsf@gnu.org> <86frv3r32m.fsf@gnu.org> <3a7eea72-d4ab-4fde-bdad-71b5e8f5bb7f@cornell.edu> <86le4uq0tj.fsf@gnu.org> <26ab8055-1da6-4b3e-a65c-68c598cb7660@cornell.edu> <86zft8n37z.fsf@gnu.org> <618931e0-ad26-4d07-b9c6-8563831a9fb8@cornell.edu> <867cg9fpzv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8205"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 19:48:02 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 1s3JUP-0001sn-8d for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 19:48:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3JU7-00061v-BL; Sat, 04 May 2024 13:47:44 -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 1s3JU4-00061f-7L for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 13:47:40 -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 1s3JU3-000371-8D for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 13:47:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3JUQ-0006bl-16 for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 13:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2024 17:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70415 X-GNU-PR-Package: emacs Original-Received: via spool by 70415-submit@debbugs.gnu.org id=B70415.171484483125376 (code B ref 70415); Sat, 04 May 2024 17:48:01 +0000 Original-Received: (at 70415) by debbugs.gnu.org; 4 May 2024 17:47:11 +0000 Original-Received: from localhost ([127.0.0.1]:54917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3JTb-0006bE-35 for submit@debbugs.gnu.org; Sat, 04 May 2024 13:47:11 -0400 Original-Received: from mail-dm6nam11on2093.outbound.protection.outlook.com ([40.107.223.93]:37089 helo=NAM11-DM6-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3JTY-0006b6-8U for 70415@debbugs.gnu.org; Sat, 04 May 2024 13:47:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/LVUN6kVfyi4oGkznEATRrkzAqz8XHDWr/7NtERVoLqKFhl3XP+/tB054QxhKDultx1zV6gb4+MKDK/mqhKHWB5r66nF4oY+3l0I6RJPHo3Fmh1HYzpoQaIPNmT/DRT3kmtUn7eLe3q1XObhLvYMp9ivkhPyPoNyTwcuBVRfya4Xl85t7h3pNw7d4dPNvYm/sLtu8etBNIUgcPmUOyuPDQ5MlGlieMeghkjRjd+tOf+wN5gYwUEi6MzzOrU8QTs0eG+dnLS9uFdAOuvqp1zruRBJpB/SO0EAdk1NABMhaQB5D4Aus2mrapeI3FDgagYOY0kezolN99bGDWu2LkHDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=82J3LdrNIsNWp5G7kYDIbRQFiSEJ3iRUcRs+1zJVwlU=; b=EmMW/9Krubv7/bhd8W3H6CKTwA8L2AzEIFOl4nLN+NEF5AyPvgIABsGRPl+QBQFNqV47UMifF/Hx0VJriWm5lyXDi62MQrN8wPPzY1j+Bfx3f7vwaZWyWtoNnhJShX/xDhydRta8/yoBzNF/qc0i6RnrmOOp6YgXbavH+zn6BngipGzCwIxaKpZTPM7pbDOUgGg2z/N3Fdu6yq6qPjjRxeY927CPMk9TulAEf+0bWUsdVxI0YHKzUTZe5Bh/FlFtwqR20USQ0nO6cSgyVlxcvGJXQjX0SNubtEyRXvh66SZ5ypOJKzCDNX21gVM2YSNjsNnUkdfkh4lWhUqk60sQQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=82J3LdrNIsNWp5G7kYDIbRQFiSEJ3iRUcRs+1zJVwlU=; b=DXNC/RlERffAtkWCJ0MmoM6O5QqSuIos9uEdOskbC1ZVhMF/5O71eO8tWxfn024sUM3Ypv0nU2PrXiS/FmTHXPYAnBlqqGF4bhpDbNyZMzrkFyIvx1omI68Vh29BcxNGGE8+zTN1Z2bINOs161PE1Iju8+xegwqiFNFGZnqV5D4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cornell.edu; Original-Received: from SN6PR04MB5151.namprd04.prod.outlook.com (2603:10b6:805:90::25) by SA3PR04MB8715.namprd04.prod.outlook.com (2603:10b6:806:302::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Sat, 4 May 2024 17:46:38 +0000 Original-Received: from SN6PR04MB5151.namprd04.prod.outlook.com ([fe80::cb0b:ff0d:6a2a:9ffe]) by SN6PR04MB5151.namprd04.prod.outlook.com ([fe80::cb0b:ff0d:6a2a:9ffe%4]) with mapi id 15.20.7544.029; Sat, 4 May 2024 17:46:38 +0000 Content-Language: en-US In-Reply-To: <867cg9fpzv.fsf@gnu.org> X-ClientProxiedBy: BL1PR13CA0023.namprd13.prod.outlook.com (2603:10b6:208:256::28) To SN6PR04MB5151.namprd04.prod.outlook.com (2603:10b6:805:90::25) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR04MB5151:EE_|SA3PR04MB8715:EE_ X-MS-Office365-Filtering-Correlation-Id: a07efdac-79a3-4b5e-7510-08dc6c622631 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: DdqRo9voVxPXB6+lCYiS5z8276TDUsvPSukk6gI3Yo2V6TIL9i3PsEhcpRVuCLFHNHFnhpDz9b6KeorNY7IcNn4BUduUMd23X/vozVDfOUYatX8Qtsuh3p/jpkssd+PUWVpaERU0vQYP6pDzsTyFfQuiO98pzCf2eusAs05dWanXWqcoTErm+gsgzskNOpVOWgbMNne/GBbQRdoqElAlqKJGDKBohdWeKFfurbgdpIsBWsULrP2fToEpYL1YjN9NGJhbDvikCphpckTN0f8zQZmCaJ5n9lNqV2y7SBDSl1R2dS7fEXyUiCK2beva2zO6TYm7RXZat5jTaBSMD5rVHPE2oTxUCSRp3zEbGjUMZg3Sr39m/nxX5QDHMBZ5WGMathVAoDjVHWmdPBXrh6Q27qO+LwXe2AZ4GftkGK+iSckzmAfiYpDL8RdMG78OtC5CZ2mWnn8dWwo9HzqVzH2MqFbzREabWRg1KkhNt+dk+WlPD7yf8CL+iq/3NQZUM7RejV7tHyThXx9sJW9COUvbcDd9nFa/PqDzMlPmaAZDXVeXt/2ksPbAQgW2VLcFvjitRRUkZzL+bfCFPR4JedVlaiP+rKkkgrr+oRSzffQE6BU4dIc/pO3DV+4b3q1K84KCi2H5/afZdVaQeU94AYIDnqDlXAoKFq5b97CT1Yq6OsIzUnDqMRpL/AuyZBExJDGOdHqpy3I+V/TeNN4l3SEtdN9/DsygffK7aX7PC8QMJ/CG/tuOXxEaWv6ZjM5s8 Yvw/hXhiLiGqOmRXZ2xQgb2xi3rRHjBWD71LsaUfi0TPRsRuAVLALG+kGY3HiLScFRY0aUHEeFH552jqZ2uxXIeWLJqoeYkIwf X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR04MB5151.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZB6c0BpW9l5fDI86mw3jIEym6F8IKUKUMO8w+bayJBJ9cUx5hFtDLg2BI5geV5cUHRKyZ3jfud1hPBLrg78Ujr+n35AR7gqhxLHqx37P73KBPCRnY/Nhh/qTqmFn/KLNFAdDxVH9hBrnXh0h4Q4S2GkcbmrH3YgX3BcBwlp8lN0z7SnCt7B3ZVxFDu4MELBEupy3zMzduKtPpOx3ErTSz2CT+jdL+uXN23Cs7oI76gFKgOInM+KQc46X5/VrIOt1tyvtiH54J5eKN9njZl8wKYvJIFeWP1WVL4sSrOKSMDd3aanIS4DQaEYHsDjfo28scS5BSEHl1XWgSKJ3YkxWG+9VWZItoHmlQnhid+wupb2+RQGngTgp2bkTRlY+UGcOfO9lGVnCGujUYLACBXMkMNor/7YNMCtZ4P2pAsN0q6sYU6kJ/7VBy70EY81b0+bPZv7weblGD2NuN7UJ9qyX7YzE4MDO99MyX/BL7ItY6qLjRHfE48qGWs9GQKfZBIlH5trmS1dgFarPsRbcAvlXIV+IiYGZoTwE/BERS+LhmUu3vbQFm8GxcXX7rrykJysSFRTKqMbYx9+neZqoB1pjRyGy7eDijS1Ra7YoAbBh26BpzQ2V4eVp+u8aUosvweMiYf8uneYUmVCi3D7B1R6FyyKKSeHH2dR4rBzI1n0azOYtICpF7qU3mR5m7eJIXCPGqRbpsTEj80L7ktEFZKlVgy5wysZV4+sgBwcPrcCFIW34eqciAgsgrdgl86 +EYJ4+wcCJQryrFpd0YY/4+qTQDfNZVM+DWh8En7vs1rJ19LOko76p6lnxm55+sRxLs7ID2iRyF+X9vbmln7vc1TzCf8dkxgFc X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: a07efdac-79a3-4b5e-7510-08dc6c622631 X-MS-Exchange-CrossTenant-AuthSource: SN6PR04MB5151.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 17:46:38.4092 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: M0r8P4G7L4T0I48HMfd2H0K6w9XozXKvEaTeeVJxdWecD/SboiV3mmGyE+c2PDaJSzVlMpuO32bv5x/jfFtAwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR04MB8715 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:284453 Archived-At: On 5/4/2024 1:26 PM, Eli Zaretskii wrote: >> Date: Sat, 4 May 2024 13:15:19 -0400 >> From: Ken Brown >> Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org >> >> On 5/2/2024 10:26 AM, Ken Brown wrote: >>> On 5/2/2024 2:21 AM, Eli Zaretskii wrote: >>>>> Date: Wed, 1 May 2024 17:20:20 -0400 >>>>> Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org >>>>> From: Ken Brown >>>>> >>>>>>       char const *lock_info_fmt = (boot >>>>>>                  ? "%s@%s.%"PRIdMAX":%"PRIdMAX >>>>>>                  : "%s@%s.%"PRIdMAX); >>>>>>       int len = snprintf (lock_info_str, sizeof lock_info_str, >>>>>>             lock_info_fmt, user_name, host_name, pid, boot); >>>>>> >>>>>> get_boot_sec calls get_boot_time, which is a Gnulib function (see >>>>>> lib/boot-time.c).  So I guess the key to unlock this puzzle is >>>>>> somewhere there. >>>>> >>>>> I took a quick look at get_boot_time and found a bug, which may explain >>>>> why some Cygwin systems behave differently from others.  I've reported >>>>> it here: >>>>> >>>>>     https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00008.html >>>> >>>> Thanks.  This probably explains why the ":-NNNN" part sometimes >>>> appears and sometimes doesn't appear in Cygwin builds of Emacs, but >>>> AFAIU it does NOT explain why unlinking the symlink (when the file is >>>> unlocked) fails when the lock file name includes the ":-NNNN" part. >>>> Right? >>> >>> Yes, that's right.  I still need to look into that. >> >> It turns out that there was a Cygwin bug (already fixed in the Cygwin >> development sources) that affected only version 3.5.3, and Bruno added a >> workaround to Gnulib. I now see the ":NNNN" part on my system, without >> a minus sign, and the lock file is deleted properly. > > Would you mind explaining for posterity (and for my personal > curiosity) how what Bruno changed affects the deletion of the lock > file? Is that because the ":-NNNN" suffix had the dash (because the > system's page file was deemed to eb a directory)? If so, how did the > presence of the dash cause the failure to delete the file? Not only was the system's page file deemed to be a directory, but it was deemed to have a negative modification time. I think that's where the dash came from. But I don't know why that prevented the lock file from being deleted. I fully expected to have to debug that problem after applying Bruno's patches, and it seemed like a miracle that I didn't have to. I might still have to debug further if Katsumi reports that the problem isn't fixed for him. Ken