From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.web.de (mout.web.de [212.227.17.11]) by sourceware.org (Postfix) with ESMTPS id 4BAAA385802B for ; Sun, 14 Feb 2021 18:58:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4BAAA385802B X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.2.103] ([84.143.151.159]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MbTL1-1liEVv0qFN-00bv0l; Sun, 14 Feb 2021 19:58:50 +0100 Subject: Re: (stat(...) == -1 || faccessat(...) == -1) && errno == EINTR ?!?? To: Konstantin Kharlamov , libc-help@sourceware.org References: <55281a90e0fd3171fc4ba4b895ddf5650722bc41.camel@yandex.ru> From: Tobias Bading Message-ID: <955dbfba-b6aa-fa00-9823-0b025baac931@web.de> Date: Sun, 14 Feb 2021 19:58:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <55281a90e0fd3171fc4ba4b895ddf5650722bc41.camel@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:dtRiigEQITfn0Zwi//fxHcziO1R/UVn3S6X9jLkSAoAqUE+1GPs 99DcB2JS5ZPklIdhypkb5Uva1zE7K/BYhPkdtPKyqd2aF84JKRyRVfuIk6h8DTWfos+Ewvz yQws8BW+eWxxo4ktECHWIftZ0Tp/3B4DLHereq/LWO/xDYL/vmUjMJ/bk0In+n7bw31fe5K uSyJomuVVqJaW22sBTXMw== X-UI-Out-Filterresults: notjunk:1;V03:K0:++YCTcCsaMM=:xHZwJ5khgPTBEGoyvRuHPZ cM8ZlBDTyEw9lMvEkec4o6ebGOcpGEnTvipG2gDaQAYmrT66/o7eUT8fVPTTDOtW78VCQRNlI S+1m/AN3lUCHeGiOPfwBtmXObG7ZwBFxxthhWAFPaFCJczzeNr5/sZwDuEIN1TQlAKdtFQqZT RS0182fE2VZ12vHZ4ZpLG6qth8PZeSU+VNGQqp6HOaOLf97n+lbEnpQfhu7JXdxOfZrZPN0oN znQqRc9Fe50zWazy1sKtdHsf8nRS7QPQmlI3CNBYWGVlz01v7INpb7dTbA+bzsRhEfq+4deIN bQHk4HpEdGt4ksUwQkWlKDYfkKBPKXL0OjzgSY4b4bXY5R+v685buauPMDbW3V0jWjX5EFROi tpPz8AC/USBo7hNnNXry/KEDfkrpmnUdbmYYBh2Yuj9yqLidwWFaDxS+VLkxKhbn1U8VP4VLD Vxz0+GtKhicyoc7s9VkHn7lNhEIhx5tfC8Qk7Nf9Qmb/ZPXtejSo3+Yw1aP0725f9M2OdWlCW 8lSFTYv6YysN/ZrQgzOX9RZwbmwVLrvQIs39dYGHhsLx8JFzC0ItWXHBoH/uRC6XeZoab45Nk 7grXU8F8C9HGOTqIiRV5YO9l+yMARWWBbyhreAYJlIZi/lLN9pXREGlyNHuFKuCk9BoafFpeO uSlGRSuVxG0QHDEP4FlHj+a2suJp02Vx2VHc8jaPTNHLLoFCTPr9Awvptrn8iq0oITqlMyB7F XGxx9G9H9MQqXM8Qx3z/Hyiqb3ShyGo/FBTOAgaBbzf7vG3BttDLSBNpAezT9qHOZra4UjbJ6 fRu3czg5fRH+mA+6HfsDJb0uicDqcmj9b0fcwFbNVDtMkAmEfIdVQoMDJ3wpXemmrgaDIqJiU 2XX08UXi6TzKb7llMTxg== X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, PLING_QUERY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2021 18:58:54 -0000 Hello Konstantin, thanks for trying to reproduce the problem. Could you please try void handler (int signum) { } and timer.it_value.tv_usec =3D timer.it_interval.tv_usec =3D 1000000 / 10000; to increase the rate of SIGALRMs to 10000 (or even higher) per second? For me this reproduces the error also on shares that looked like they weren't affected when only 50 signals per second were created. There seems to be only a very short time window in which some piece of (probably CIFS-related) kernel code can be thrown of the rails by a signal, and the length of that time window probably depends on the performance of client and server, the network connection and whatnot. Since you're using a local share, your time window to produce the error is probably much smaller than mine. Tobias =2D-- On 14.02.21 18:56, Konstantin Kharlamov wrote: > On Sun, 2021-02-14 at 13:18 +0100, Tobias Bading via Libc-help wrote: >> Hello again. >> >> I've been able to reproduce the problem with the attached program. With >> SIGALRMs firing 10 times per second, I get maybe a dozen "handler >> called" lines before stat() or faccessat() fails with errno EINTR. When >> I increase the rate to 50 SIGALRMs per second, the very first stat() >> fails in every test run. >> >> Specifying SA_RESTART in sigaction() has no effect. >> >> Unfortunately, I don't have any other network shares available at the >> moment to test whether only CIFS through VPN is affected, or the proble= m >> would occur with e.g. NFS or CIFS without a VPN as well. > Hello! So, I tried to reproduce this by creating a samba share, then mou= nting it with at `/tmp/mnt` by using a command: > > sudo mount -t cifs -o username=3Dguest,rw,exec,auto //127.0.0.1/exp= ort_bds mnt > > then I took your example, and modified the `path` variable to point to `= /tmp/mnt`. > > Afterwards, it's been running for a minute I think, and I only ever seen= `handler called` lines. > > So given other emails mentioned you may have stumbled upon a kernel bug,= it apparently was fixed later. My kernel is 5.10.15, on Archlinux. > >