linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varad Gautam <varad.gautam@suse.com>
To: linux-rt-users@vger.kernel.org
Subject: inotify watch not triggered with PREEMPT_RT=y on KVM
Date: Tue, 20 Apr 2021 13:35:43 +0200	[thread overview]
Message-ID: <186e6d50-36ae-ba6d-bb81-d90fb0152fcb@suse.com> (raw)

Hi,

I'm building coreutils on linux-rt-devel v5.12-rc3-rt3 e164cb00df1 [1]
running on KVM, and I see a consistent failure in one of the coreutils
`tail` testcases [2]:

FAIL tests/tail-2/assert.sh (exit status: 1)

I see that on deleting a file, the inode gets dropped, but the inotify
watch that tail registered on it sometimes does not get notified. This
is unexpected for tail without --retry.

# touch foo; tail --follow=name foo & pid=$!

# cat /proc/$pid/fdinfo/4 | grep inotify
inotify wd:2 ino:123a2 sdev:fe00000 mask:c06 ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:a22301004fb29f63
inotify wd:1 ino:1239f sdev:fe00000 mask:784 ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:9f23010072246970

# ls -i
74658 foo

# find . -inum 74658
./foo

# rm foo

# find . -inum 74658

# cat /proc/$pid/fdinfo/4 | grep inotify
inotify wd:2 ino:123a2 sdev:fe00000 mask:c06 ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:a22301004fb29f63
inotify wd:1 ino:1239f sdev:fe00000 mask:784 ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:9f23010072246970

I can also reproduce this on linux-stable-rt v5.4-rt-rebase (0dc167c2b2) [3]
running as a KVM guest. Non-PREEMPT_RT builds work fine, and so does PREEMPT_RT
when running on bare-metal.

Any suggestions on what might be happening here?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=e164cb00df1c
[2] https://github.com/coreutils/coreutils/blob/master/tests/tail-2/assert.sh
[3] https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v5.4-rt-rebase&id=0dc167c2b2

Regards,
Varad

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany

HRB 36809, AG Nürnberg
Geschäftsführer: Felix Imendörffer


                 reply	other threads:[~2021-04-20 11:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=186e6d50-36ae-ba6d-bb81-d90fb0152fcb@suse.com \
    --to=varad.gautam@suse.com \
    --cc=linux-rt-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).