Re: Recipe for creating unlink deadlocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 08, 2015 at 11:32:07AM +0100, Filipe David Manana wrote:
> On Thu, May 7, 2015 at 11:20 PM, Zygo Blaxell
> <ce3g8jdj@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > This is the simplest repro recipe for this that I have found so far.
> > It takes only a few minutes for the rm processes to get stuck here:
> >
> > # cat /proc/28396/stack                                                                                                                                       Thu May  7 18:13:05 2015
> >
> > [<ffffffff813c8a2d>] lock_extent_bits+0x1ad/0x200
> > [<ffffffff813b5dfa>] btrfs_evict_inode+0x17a/0x5e0
> > [<ffffffff8123fc68>] evict+0xb8/0x1b0
> > [<ffffffff81240813>] iput+0x1f3/0x260
> > [<ffffffff81233c68>] do_unlinkat+0x1d8/0x360
> > [<ffffffff812346db>] SyS_unlinkat+0x1b/0x40
> > [<ffffffff8190024d>] system_call_fastpath+0x16/0x1b
> > [<ffffffffffffffff>] 0xffffffffffffffff
> >
> >
> > Run these three scripts in a directory that is the top of a subvol:
> >
> >         # Script #1:  randomly create or delete snapshots
> >         while sleep 1; do
> >                 if [ $[RANDOM%2] = 0 ]; then
> >                         btrfs sub snap . snaps-$RANDOM
> >                 else
> >                         for x in snaps-*; do
> >                                 btrfs sub del $x
> >                                 break
> >                         done
> >                         btrfs sub sync .
> >                 fi
> >         done
> >
> >         # Script #2:  create a bunch of files of random sizes
> >         while true; do
> >                 d=$[RANDOM%9]/$[RANDOM%9]/$[RANDOM%9]/$[RANDOM%9]
> >                 mkdir -p ${d%/*}
> >                 head -c $[RANDOM%1024]k /usr/share/doc/chromium/copyright > $d
> >         done
> >
> >         # Script #3:  read and immediately delete all the files
> >         while date; do
> >                 sleep 1
> >                 find -type f -exec cat {} \; -exec rm -fv {} \; > /dev/null
> >         done
> 
> Tried that for over 3 hours, on a 4.1-rc2 kernel with a few patches
> from the list, with several combinations of mount options (compress,
> autodefrag, nodatacow, etc) and didn't got any issue.
> 
> What kernel version are you testing? Any specific combination of mount options?

I've seen it on the field on versions from v3.15 to v4.0.1.  The test I did
yesterday was v4.0.1.

Mount options are rw,relatime,compress-force=zlib,space_cache.

> >
> 
> 
> 
> -- 
> Filipe David Manana,
> 
> "Reasonable men adapt themselves to the world.
>  Unreasonable men adapt the world to themselves.
>  That's why all progress depends on unreasonable men."
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux