1
0
mirror of https://git.proxmox.com/git/mirror_zfs.git synced 2025-04-06 17:49:11 +03:00
mirror_zfs/tests/zfs-tests/cmd/mmapwrite
ilbsmart 98bb45e27a deadlock between mm_sem and tx assign in zfs_write() and page fault
The bug time sequence:
1. thread , `zfs_write` assign a txg "n".
2. In a same process, thread , mmap page fault (which means the
   `mm_sem` is hold) occurred, `zfs_dirty_inode` open a txg failed,
   and wait previous txg "n" completed.
3. thread  call `uiomove` to write, however page fault is occurred
   in `uiomove`, which means it need `mm_sem`, but `mm_sem` is hold by
   thread , so it stuck and can't complete,  then txg "n" will
   not complete.

So thread  and thread  are deadlocked.

Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Grady Wong <grady.w@xtaotech.com>
Closes 
2019-02-22 09:47:34 -08:00
..
.gitignore Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
Makefile.am Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
mmapwrite.c deadlock between mm_sem and tx assign in zfs_write() and page fault 2019-02-22 09:47:34 -08:00