From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#72641: 31.0.50; "Unlocking file: Invalid argument" when deleting lock file on network file system Date: Thu, 15 Aug 2024 14:43:21 -0700 Organization: UCLA Computer Science Department Message-ID: References: <867cfujge6.fsf@gnu.org> <86fruhiwt0.fsf@gnu.org> <868r09ivqn.fsf@gnu.org> <867cftiprt.fsf@gnu.org> <86msoph6wt.fsf@gnu.org> <2+lcnmedng9le3pwfn0gc79m@mina86.com> <86a5hd7o4t.fsf@gnu.org> <+b8wcnteufggsda3gtf7ioja@mina86.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------0HVNskQYAeXg0LiC31TPustc" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22314"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 72641@debbugs.gnu.org To: Michal Nazarewicz , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 15 23:44:55 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 1seiH8-0005dS-QD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Aug 2024 23:44:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seiGh-0004OS-SI; Thu, 15 Aug 2024 17:44:27 -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 1seiGg-0004O6-1m for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 17:44:26 -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 1seiGf-0003b8-O3 for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 17:44:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=7iaZYzexNRu9P+Hj5HT8jUhotkHl34AjKlAvsOapmTc=; b=Xnt2VE4dvgQiz57ekw22LaA7ufhsmRschqYj61dhgKcIdSJvumsNCwQV+eBgtUxU1z9QeWKqHcaU06/P+OMnkDtNyjV8vw1ELU91NHnsLaNHAltv3XlJUqUWEHHApf3d//oFlbNeB4jPSd0SEHdYzBwckKQ4U5lQnbGYnlDNEFSsLUBpn1LaRUEyc/asyxLFCZlAgracRiv3+7w1IQ5fmXSExFVc3dKoP36VtZJ7ejIhtu2s8NAxlyvhJJz9CkfoCPcPu5mb0+v9JdYsR/Cf2xTsuEd3V99W2vvRKy7aDfW9zjoOLMrOUwUUlxw1Pra0aE+zBNx1JQgFo0ilfMLhkQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1seiHG-0002fU-B7 for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 17:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2024 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72641 X-GNU-PR-Package: emacs Original-Received: via spool by 72641-submit@debbugs.gnu.org id=B72641.172375824910180 (code B ref 72641); Thu, 15 Aug 2024 21:45:02 +0000 Original-Received: (at 72641) by debbugs.gnu.org; 15 Aug 2024 21:44:09 +0000 Original-Received: from localhost ([127.0.0.1]:49846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seiGO-0002e7-0o for submit@debbugs.gnu.org; Thu, 15 Aug 2024 17:44:08 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:51950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seiGK-0002dW-Pe for 72641@debbugs.gnu.org; Thu, 15 Aug 2024 17:44:05 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 7C4CA3C0140A0; Thu, 15 Aug 2024 14:43:22 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id S4zVTuBMp3ir; Thu, 15 Aug 2024 14:43:21 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A733B3C0140A4; Thu, 15 Aug 2024 14:43:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A733B3C0140A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1723758201; bh=7iaZYzexNRu9P+Hj5HT8jUhotkHl34AjKlAvsOapmTc=; h=Message-ID:Date:MIME-Version:To:From; b=Jcnr2bu9k4sIfQR9HmTjzzX16gmOW/St7EPUUtxdJhHj3k0VGUcCzTM0C94/J1gAg fsGa5tl7a9Nr4rsFcD83jq0CQtLDHz0DAjBQK5sM9jmKoZf7VYiKSoro8kiDJ6LbM2 O4XmuuDKcVdbqRTX8a/I9xIn4/IV7irnA1au2rrw5v+gjeQIfw+TfNZs8/8WxWTCgW ocZWM2deQNQ7nIOLsgVsKhluD82JF/p3EcnYxhJZUif4x5rGiNg3LM7mqSnmQXNoHg ucFZu24yJ/brH5guKEj4EMP1rH5KQNB5S1OcsyuTE27jt472RunVF/lQP+cTygZ+le wMUgBT91ZERqQ== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id Mm3KA6uWNABE; Thu, 15 Aug 2024 14:43:21 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 7CD673C0140A0; Thu, 15 Aug 2024 14:43:21 -0700 (PDT) Content-Language: en-US In-Reply-To: <+b8wcnteufggsda3gtf7ioja@mina86.com> 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:290187 Archived-At: This is a multi-part message in MIME format. --------------0HVNskQYAeXg0LiC31TPustc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2024-08-15 10:44, Michal Nazarewicz wrote: > The*Warnings* buffer constantly popping up is annoying so I=E2=80=99d l= ove this > to be addressed though to be honest I=E2=80=99m not sure what would be = a good > solution. Though I guess you can also argue this is CIFS bug. It's definitely a file system bug. The symlink syscall should never=20 create a regular file. I suggest reporting the bug to whoever maintains=20 your file system code. I don't see any good way to prevent Emacs from creating these=20 zero-length files on buggy file systems. That being said, I think Emacs can ignore and remove bad lock files=20 without introducing more races. I installed the attached into the master=20 branch and it works for me on your test case (which I introduced=20 artificially on GNU/Linux). Please give it a try. The first patches in this series are just setup. The last patch is the=20 real workaround. --------------0HVNskQYAeXg0LiC31TPustc Content-Type: text/x-patch; charset=UTF-8; name="0001-Fix-unlikely-lock-file-integer-overflow.patch" Content-Disposition: attachment; filename="0001-Fix-unlikely-lock-file-integer-overflow.patch" Content-Transfer-Encoding: base64 RnJvbSBjYmFjZGNhOWUzZjZkY2Y5Yjg4NzA0MzkxZjA2ZGFmNzMwMTYwOGIwIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUaHUsIDE1IEF1ZyAyMDI0IDExOjI5OjE2IC0wNzAwClN1YmplY3Q6IFtQQVRD SCAxLzRdIEZpeCB1bmxpa2VseSBsb2NrIGZpbGUgaW50ZWdlciBvdmVyZmxvdwoKKiBzcmMv ZmlsZWxvY2suYyAod2l0aGluX29uZV9zZWNvbmQpOiBBY2NlcHQgaW50bWF4X3QgZmlyc3Qg YXJnLgpBdm9pZCB1bmRlZmluZWQgYmVoYXZpb3Igb24gaW50ZWdlciBvdmVyZmxvdy4KKGN1 cnJlbnRfbG9ja19vd25lcik6IFNpbXBsaWZ5IGJhc2VkIG9uIHdpdGhpbl9vbmVfc2Vjb25k IGNoYW5nZS4KLS0tCiBzcmMvZmlsZWxvY2suYyB8IDggKysrKy0tLS0KIDEgZmlsZSBjaGFu Z2VkLCA0IGluc2VydGlvbnMoKyksIDQgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvc3Jj L2ZpbGVsb2NrLmMgYi9zcmMvZmlsZWxvY2suYwppbmRleCA2OWJkMDMyMmQ0Yy4uNTVhYjE1 ZmViOGQgMTAwNjQ0Ci0tLSBhL3NyYy9maWxlbG9jay5jCisrKyBiL3NyYy9maWxlbG9jay5j CkBAIC0yOTgsOSArMjk4LDEwIEBAIGxvY2tfZmlsZV8xIChMaXNwX09iamVjdCBsZm5hbWUs IGJvb2wgZm9yY2UpCiAvKiBSZXR1cm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CBzbyB0cnkgdG8K ICAgICAgICAgIHphcCB0aGUgbG9ja2ZpbGUuICAqLwotLSAKMi40My4wCgo= --------------0HVNskQYAeXg0LiC31TPustc Content-Type: text/x-patch; charset=UTF-8; name="0002-Avoid-some-GC-when-locking-unlocking-files.patch" Content-Disposition: attachment; filename="0002-Avoid-some-GC-when-locking-unlocking-files.patch" Content-Transfer-Encoding: base64 RnJvbSA0YjZiOWE3YWNkYzRmN2QwNTk0Y2FhYWEzODJlMmU2MzNmOGYxMjI1IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUaHUsIDE1IEF1ZyAyMDI0IDEyOjU4OjE5IC0wNzAwClN1YmplY3Q6IFtQQVRD SCAyLzRdIEF2b2lkIHNvbWUgR0Mgd2hlbiBsb2NraW5nL3VubG9ja2luZyBmaWxlcwpNSU1F LVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgK Q29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogOGJpdAoKKiBzcmMvZmlsZWxvY2suYyAobG9j a19maWxlXzEsIGN1cnJlbnRfbG9ja19vd25lcik6CkRvbuKAmXQgcG9zc2libHkgaW52b2tl IHRoZSBnYXJiYWdlIGNvbGxlY3RvciB3aGVuCmNvbXBhcmluZyBsb2NrIGZpbGUgY29udGVu dHMgdG8gaG9zdCBuYW1lcy4KLS0tCiBzcmMvZmlsZWxvY2suYyB8IDYyICsrKysrKysrKysr KysrKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0tLS0tCiAxIGZpbGUgY2hhbmdl ZCwgMzcgaW5zZXJ0aW9ucygrKSwgMjUgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvc3Jj L2ZpbGVsb2NrLmMgYi9zcmMvZmlsZWxvY2suYwppbmRleCA1NWFiMTVmZWI4ZC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b25fY3VycmVudF9ob3N0ID0gZmFsc2U7CisJCWJyZWFrOworCSAgICAgIH0KKwl9 CisgICAgfQorICBpZiAob25fY3VycmVudF9ob3N0KQogICAgIHsKICAgICAgIGlmIChwaWQg PT0gZ2V0cGlkICgpKQogICAgICAgICByZXR1cm4gSV9PV05fSVQ7Ci0tIAoyLjQzLjAKCg== --------------0HVNskQYAeXg0LiC31TPustc Content-Type: text/x-patch; charset=UTF-8; name="0003-Refactor-current_lock_owner.patch" Content-Disposition: attachment; filename="0003-Refactor-current_lock_owner.patch" Content-Transfer-Encoding: base64 RnJvbSA3NzVmYTg0NDNmYWEzZDdmNWNlN2Y3ZDBhYTZlNmZiNTMzMjE3MTVhIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUaHUsIDE1IEF1ZyAyMDI0IDEzOjE3OjI0IC0wNzAwClN1YmplY3Q6IFtQQVRD SCAzLzRdIFJlZmFjdG9yIGN1cnJlbnRfbG9ja19vd25lcgoKKiBzcmMvZmlsZWxvY2suYyAo Y3VycmVudF9sb2NrX293bmVyKTogUmVmYWN0b3IgdG8gbWFrZSBmdXJ0aGVyCmNoYW5nZXMg ZWFzaWVyLiAgVGhpcyBzaG91bGQgbm90IGFmZmVjdCBiZWhhdmlvci4KLS0tCiBzcmMvZmls ZWxvY2suYyB8IDE4NSArKysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tCiAxIGZpbGUgY2hhbmdlZCwgOTUgaW5zZXJ0aW9ucygrKSwgOTAgZGVsZXRp b25zKC0pCgpkaWZmIC0tZ2l0IGEvc3JjL2ZpbGVsb2NrLmMgYi9zcmMvZmlsZWxvY2suYwpp bmRleCBjZGY5ZTZmMGZmYy4uYzY4YWFjYzQ2ZmIgMTAwNjQ0Ci0tLSBhL3NyYy9maWxlbG9j ay5jCisrKyBiL3N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mluZm9fZW5kID0gb3duZXItPmNvbG9u OwotICAgICAgYnJlYWs7CisgICAgICBpZiAoTUFYX0xGSU5GTyA8IGxmaW5mb2xlbikKKwly ZXR1cm4gRU5BTUVUT09MT05HOworICAgICAgb3duZXItPnVzZXJbbGZpbmZvbGVuXSA9IDA7 CiAKLSAgICBjYXNlICdcMzU3JzoKLSAgICAgIC8qIFRyZWF0ICJcMzU3XDIwMFwyNDIiIChV K0YwMjIgaW4gVVRGLTgpIGFzIGlmIGl0IHdlcmUgIjoiIChCdWcjMjQ2NTYpLgotCSBUaGlz IHdvcmtzIGFyb3VuZCBhIGJ1ZyBpbiB0aGUgTGludXggQ0lGUyBrZXJuZWwgY2xpZW50LCB3 aGljaCBjYW4KLQkgbWlzdGFrZW5seSB0cmFuc2xpdGVyYXRlICc6JyB0byBVK0YwMjIgaW4g c3ltbGluayBjb250ZW50cy4KLQkgU2VlIDxodHRwczovL2J1Z3ppbGxhLnJlZGhhdC5jb20v c2hvd19idWcuY2dpP2lkPTEzODQxNTM+LiAgKi8KLSAgICAgIGlmICghIChib290WzBdID09 ICdcMjAwJyAmJiBib290WzFdID09ICdcMjQyJykpCisgICAgICAvKiBQYXJzZSBVU0VSQEhP U1QuUElEOkJPT1RfVElNRS4gIElmIGNhbid0IHBhcnNlLCByZXR1cm4gRUlOVkFMLiAgKi8K KyAgICAgIC8qIFRoZSBVU0VSIGlzIGV2ZXJ5dGhpbmcgYmVmb3JlIHRoZSBsYXN0IEAuICAq LworICAgICAgY2hhciAqYXQgPSBtZW1yY2hyIChvd25lci0+dXNlciwgJ0AnLCBsZmluZm9s ZW4pOworICAgICAgaWYgKCFhdCkKIAlyZXR1cm4gRUlOVkFMOwotICAgICAgYm9vdCArPSAy OwotICAgICAgRkFMTFRIUk9VR0g7Ci0gICAgY2FzZSAnOic6Ci0gICAgICBpZiAoISBpbnRl Z2VyX3ByZWZpeGVkIChib290KSkKKyAgICAgIG93bmVyLT5hdCA9IGF0OworICAgICAgY2hh ciA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oZSBsYXN0ICcuJyB0byB0aGUgJzonIG9yIGVxdWl2YWxlbnQuICAqLworICAg ICAgaWYgKCEgaW50ZWdlcl9wcmVmaXhlZCAoZG90ICsgMSkpCisJcmV0dXJuIEVJTlZBTDsK KyAgICAgIGVycm5vID0gMDsKKyAgICAgIGludG1heF90IHBpZCA9IHN0cnRvaW1heCAoZG90 ICsgMSwgJm93bmVyLT5jb2xvbiwgMTApOworICAgICAgaWYgKGVycm5vID09IEVSQU5HRSkK KwlwaWQgPSAtMTsKKworICAgICAgLyogQWZ0ZXIgdGhlICc6JyBvciBlcXVpdmFsZW50LCBp ZiB0aGVyZSBpcyBvbmUsIGNvbWVzIHRoZSBib290IHRpbWUuICAqLworICAgICAgaW50bWF4 X3QgYm9vdF90aW1lOworICAgICAgY2hhciAqYm9vdCA9IG93bmVyLT5jb2xvbiArIDEsICps ZmluZm9fZW5kOworICAgICAgc3dpdGNoIChvd25lci0+Y29sb25bMF0pCiAJewotCSAgLyog UHJvdGVjdCBhZ2FpbnN0IHRoZSBleHRyZW1lbHkgdW5saWtlbHkgY2FzZSBvZiB0aGUgaG9z dAotCSAgICAgbmFtZSBjb250YWluaW5nICdAJy4gICovCi0JICBjaGFyICpzeXNuYW1lID0g U1NEQVRBIChzeXN0ZW1fbmFtZSk7Ci0JICBmb3IgKHB0cmRpZmZfdCBpID0gMDsgaSA8IGxp bmtob3N0bGVuOyBpKyspCi0JICAgIGlmIChsaW5raG9zdFtpXSAhPSAoc3lzbmFtZVtpXSA9 PSAnQCcgPyAnLScgOiBzeXNuYW1lW2ldKSkKLQkgICAgICB7Ci0JCW9uX2N1cnJlbnRfaG9z dCA9IGZhbHNlOwotCQlicmVhazsKLQkgICAgICB9CisJY2FzZSAwOgorCSAgYm9vdF90aW1l ID0gMDsKKwkgIGxmaW5mb19lbmQgPSBvd25lci0+Y29sb247CisJICBicmVhazsKKworCWNh c2UgJ1wzNTcnOgorCSAgLyogVHJlYXQgIlwzNTdcMjAwXDI0MiIgKF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ldHVybiBBTk9USEVSX09XTlNfSVQ7CisJeworCSAgb25fY3VycmVudF9ob3N0ID0g bGlua2hvc3RsZW4gPT0gU0JZVEVTIChzeXN0ZW1fbmFtZSk7CisJICBpZiAob25fY3VycmVu dF9ob3N0KQorCSAgICB7CisJICAgICAgLyogUHJvdGVjdCBhZ2FpbnN0IHRoZSBleHRyZW1l bHkgdW5saWtlbHkgY2FzZSBvZiB0aGUgaG9zdAorCQkgbmFtZSBjb250YWluaW5nICdAJy4g ICovCisJICAgICAgY2hhciAqc3lzbmFtZSA9IFNTREFUQSAoc3lzdGVtX25hbWUpOworCSAg ICAgIGZvciAocHRyZGlmZl90IGkgPSAwOyBpIDwgbGlua2hvc3RsZW47IGkrKykKKwkJaWYg KGxpbmtob3N0W2ldICE9IChzeXNuYW1lW2ldID09ICdAJyA/ICctJyA6IHN5c25hbWVbaV0p KQorCQkgIHsKKwkJICAgIG9uX2N1cnJlbnRfaG9zdCA9IGZhbHNlOworCQkgICAgYnJlYWs7 CisJCSAgfQorCSAgICB9CisJfQorICAgICAgaWYgKCFvbl9jdXJyZW50X2hvc3QpCisJewor CSAgLyogTm90IG9uIGN1cnJlbnQgaG9zdC4gIElmIHdlIHdhbnRlZCB0byBzdXBwb3J0IHRo ZSBjaGVjayBmb3IKKwkgICAgIHN0YWxlIGxvY2tzIG9uIHJlbW90ZSBtYWNoaW5lcywgaGVy ZSdzIHdoZXJlIHdlJ2QgZG8gaXQuICAqLworCSAgcmV0dXJuIEFOT1RIRVJfT1dOU19JVDsK Kwl9CisKKyAgICAgIGlmIChwaWQgPT0gZ2V0cGlkICgpKQorCXJldHVybiBJX09XTl9JVDsK KworICAgICAgaWYgKFZBTElEX1BST0NFU1NfSUQgKHBpZCkKKwkgICYmICEgKGtpbGwgKHBp ZCwgMCkgPCAwICYmIGVycm5vICE9IEVQRVJNKQorCSAgJiYgKGJvb3RfdGltZSA9PSAwCisJ ICAgICAgfHwgd2l0aGluX29uZV9zZWNvbmQgKGJvb3RfdGltZSwgZ2V0X2Jvb3Rfc2VjICgp KSkpCisJcmV0dXJuIEFOT1RIRVJfT1dOU19JVDsKICAgICB9CisKKyAgLyogVGhlIG93bmVy IHByb2Nlc3MgaXMgZGVhZCBvciBoYXMgYSBzdHJhbmdlIHBpZC4KKyAgICAgVHJ5IHRvIHph cCB0aGUgbG9ja2ZpbGUuICAqLworICByZXR1cm4gZW1hY3NfdW5saW5rIChTU0RBVEEgKGxm bmFtZSkpIDwgMCA/IGVycm5vIDogMDsKIH0KIAogDAotLSAKMi40My4wCgo= --------------0HVNskQYAeXg0LiC31TPustc Content-Type: text/x-patch; charset=UTF-8; name="0004-Remove-empty-invalid-lock-files.patch" Content-Disposition: attachment; filename="0004-Remove-empty-invalid-lock-files.patch" Content-Transfer-Encoding: base64 RnJvbSA4YjM2YmZjNTUzYjk3Y2Y0MzViZGZlMWI4NGFiZTIxYzNhNjA1YjlmIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUaHUsIDE1IEF1ZyAyMDI0IDEzOjMwOjIzIC0wNzAwClN1YmplY3Q6IFtQQVRD SCA0LzRdIFJlbW92ZSBlbXB0eSAoJiBpbnZhbGlkKSBsb2NrIGZpbGVzCgoqIHNyYy9maWxl bG9jay5jIChjdXJyZW50X2xvY2tfb3duZXIpOgpSZW1vdmUgZW1wdHkgbG9jayBmaWxlcywg YXMgdGhleSBhcmUgbmVjZXNzYXJpbHkgaW52YWxpZAphbmQgY2FuIGJlIGNhdXNlZCBieSBi dWdneSBmaWxlIHN5c3RlbXMuClByb2JsZW0gcmVwb3J0ZWQgYnkgTWljaGFsIE5hemFyZXdp Y3ogKGJ1ZyM3MjY0MSkuCi0tLQogc3JjL2ZpbGVsb2NrLmMgfCAxMSArKysrKysrLS0tLQog MSBmaWxlIGNoYW5nZWQsIDcgaW5zZXJ0aW9ucygrKSwgNCBkZWxldGl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