(stat(...) == -1 || faccessat(...) == -1) && errno == EINTR ?!??

Konstantin Kharlamov hi-angel@yandex.ru
Sun Feb 14 17:56:15 GMT 2021


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 problem
> 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 mounting it with at `/tmp/mnt` by using a command:

    sudo mount -t cifs -o username=guest,rw,exec,auto //127.0.0.1/export_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.




More information about the Libc-help mailing list