Bug 122888 - [zfs] zfs hang w/ prefetch on, zil off while running transmission-daemon
Summary: [zfs] zfs hang w/ prefetch on, zil off while running transmission-daemon
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-18 14:30 UTC by James Snyder
Modified: 2023-02-17 12:57 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 James Snyder 2008-04-18 14:30:01 UTC
Start and run transmission-daemon with a torrent active for somewhere between a few hours and a day.  transmission-daemon will eventually hang in zfs:lo state (not sure if the state name is longer, I've just had top running when the hangs take place).  I've had this happen both on zfs on root, and with zfs just providing /usr.

It seems to only happen when the zil is disabled and prefetch is left enabled.

loader.conf:
zfs_load="YES"
vfs.root.mountfrom="zfs:tank/root"
vm.kmem_size_max="1073741824"
vm.kmem_size="1073741824"
vfs.zfs.zil_disable=1

Fix: 

Workaround seems to be to disable prefetch.
How-To-Repeat: loader.conf:
zfs_load="YES"
vfs.root.mountfrom="zfs:tank/root"
vm.kmem_size_max="1073741824"
vm.kmem_size="1073741824"
vfs.zfs.zil_disable=1

- install transmission-daemon from ports, run transmission-daemon (it will daemonize, automatically backgrounding. I ran it as a regular user.)
- grab a torrent, such as KNOPPIX (http://torrent.unix-ag.uni-kl.de/)
- transmission-remote -a <torrentfile> (add the torrent)
- transmission-remote -s all  (start all the torrents)

wait hours to a day or so with whatever you want logging things running and active since anything that hits disk after the hang will get hung as well
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-05-05 02:39:18 UTC
Responsible Changed
From-To: freebsd-amd64->freebsd-fs

Reclassify.
Comment 2 Samuel Boivie 2009-09-07 20:12:29 UTC
I'm seeing the same behavior using ktorrent on 8.0 beta3 
amd64 without tuning. Workaround is good.
Comment 3 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:46:58 UTC
State Changed
From-To: open->feedback

How much RAM do you systems have? 
PS. zfs:lo comes from zfs:lowmem, it means that process is stuck in ZFS trying 
to free memory, but if it is stuck for good, it means that ZFS cannot reclaim 
any memory. 


Comment 4 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:46:58 UTC
Responsible Changed
From-To: freebsd-fs->pjd

I'll take this one.
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:59 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 6 Dries Michiels freebsd_committer freebsd_triage 2023-02-17 12:57:41 UTC
If this is still relevant, please open a new PR or reopen with updated info.
During the time of reporting and closing a lot has changed to ZFS, transition to OpenZFS, etc.