Bug 142872 - [zfs] ZFS ZVOL Lockmgr Deadlock
Summary: [zfs] ZFS ZVOL Lockmgr Deadlock
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Jakub Dawidek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-15 21:50 UTC by ports
Modified: 2017-09-05 19:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ports 2010-01-15 21:50:00 UTC
ZFS's zvols appear to not be very robust at handling a large stream of data coming into them.  I was attempting test one that was exported via ggated but continued to have odd lockups with it.  Tracing it back down it appears to be a general problem with storing data to zvols that happens even on the local system.

When running the repeatable steps you will eventually notice that dd is no longer returning data back.  If you check your other console window you will notice that iostat reports climbing system cpu usage.  The system will not panic and you may be able to still do some things that do not require disk access but as soon as you do your console will lock.

The locking will occur immediately in the GENERIC kernel.  After you enable debugging options such as WITNESS and the like it will be much harder to do but still occur after a handful of times running the dd loop.

The issue does not occur if you run the dd loop directly against a zfs file system under zroot.

I have tried this on 8.0-Release with zfs v13 and 8.0-Stable with zfs v14.  The issue occurs on both.  I would attach ddb debug output but the file is over 100k and will not attach.  Email me for it.

I should note that I am running a ZFS on root setup so the whole system is ZFS only.  It is also a fresh load so no tuning at all has been done.

How-To-Repeat: Open two consoles.

Console 1: Run 'ioscan 1'.

Console 2: Create a zvol and then base a zpool on it.  Give yourself enough space to play around with.

# zfs create -V 25g zroot/test
# zpool create ztest /dev/zvol/zroot/test 
# rm /ztest/*; size=0; for i in 0 1 2 3 4 5 6 7 8 9; do size=$(($size + 250)); dd if=/dev/random of=/ztest/file$i bs=1m count=$size; done
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-01-16 10:01:32 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 ports 2010-01-16 12:17:19 UTC
Debug output posted at below url.

https://docs.google.com/Doc?docid=0ASw5sDNUQTGfZHpnanZ2bl8zZnE2cmNtaGc&hl=en
Comment 3 ports 2010-01-16 20:12:25 UTC
This also occurs on 9.0-CURRENT though it takes a few runs through the
loop and waiting a bit between the runs.
Comment 4 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2010-03-19 22:59:56 UTC
Responsible Changed
From-To: freebsd-fs->pjd

I'll take this one.
Comment 5 Alan Somers freebsd_committer freebsd_triage 2017-09-05 19:14:39 UTC
Cannot reproduce on FreeBSD 12.  Most likely somebody fixed it in the meantime.