Eddie Horng:
> Many thanks you fixed the issue. May I consult you the theory of your
> fixing? Does au_wkq_wait() put vfs_read to an interrupt free stat so that
> read can complete without interrupt error? Just curious.

Many thanx to you for your repeated tests.
The workqueue is a kernel thread, and aufs often passes the workqueue a
certain operaion and wait for its completion, sometimes doesn't wait.
No one should send SIGKILL to the workqueue, so the workqueue always be
able to read the XINO file without being bothered fatal_signal_pending()
test in do_generic_file_read().

FYI, here is a commit log for the patch.
----------------------------------------------------------------------
aufs: for v4.10, XINO(read) handles EINTR from the dying process

The commit in linux-v4.10-rc7
        5abf186 2017-02-03 mm, fs: check for fatal signals in 
do_generic_file_read()
will make aufs hung-up under a certain condition.
The condition is (roughly)
- linux-v4.10-rc7 and later.
- aufs has many files (over 32K inode-numbers are assigned).
- the process is killed by SIGKILL.
- the dying process held a unliked file whose inode-number is cold.
  here "cold" means out of aufs internal XINO bitmap cache. so aufs has
  to read XINO bitmap from a disk in order to maintain the bitmap.
- the fs where XINO files are placed calls do_generic_file_read() to
  imprelent its ->read().

In linux-v4.3, the was a very similar situation by the commit
        296291c 2015-10-23 mm: make sendfile(2) killable
but it was "write to XINO" instead of "read from XINO" case.
And it was fixed by the commit
        5e439ff 2016-01-05 aufs: for 4.3, XINO handles EINTR from the dying 
process
which made aufs4.3 retries "write to XINO" in another context after
EINTR.

Here the same approach is applied to the case of "read from XINO."

Reported-by: Eddie Horng <eddiehorng...@gmail.com>
Tested-by: Eddie Horng <eddiehorng...@gmail.com>
----------------------------------------------------------------------


J. R. Okajima

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

Reply via email to