-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OOM Panic leading to unmountable zvol #14914
Comments
Note that I was just able to replicate this in FreeBSD 13.2 RELEASE (off a live-usb drive) as well. This issue appears to not be linux specific. |
That's not a zvol, that's a filesystem. zvols don't have mountpoints, they're block devices.
|
Whoops, I thought a zvol was the a mountable region in a pool.
|
Could you possibly post the output of |
Gosh, derp:
Note: the mountpoint has changed because I needed it to be somewhere writable when experimenting with FreeBSD off a thumbdrive. |
Getting it to be able to take a core dump when it, well, takes a dump might be informative. Something like this, I would think. My guess would be that since that single file definitely clears the size threshold for "throw it on the async destroy queue", something in that queue isn't limiting how much memory it uses well, and boom is going the dynamite. |
I spent some time trying to get kernel dumps working, but it turns out on proxmox you need to build your own kernel to get symbols (arrrrgh). Anyways, I dug out a server with 128 GB of ram, and it was able to mount the volume fine (it seems to have peaked at 36 GB of ram in the kernel somewhere). I need this system working more then I want to help fix this bug. The underlying issue is NOT FIXED, throwing more RAM at it is just a workaround. One thing of note is I think the issue might be the destroy queue itself, or something similar. Watching memory usage, the total consumed shot up to the max (~36GB), and then slowly ramped down over the next ~20-30 minutes. It sure looks like something dumped a HUGE list of something into a queue, which couldn't keep up so it bloated up and used lots of RAM. While the memory usage was ramping down, there was %100 disk utilization for the drives in the zpool. Annoyingly, wherever in the kernel the RAM is used, it doesn't show up in something like top, so I can't narrow down which kernel thread is the one actually using the RAM in question. |
System information
Describe the problem you're observing
I have a ~72.8 TB 8-disk Raid-Z2.
The zvol was about 80% full, and then I had a out-of-control process create a single 10+ TB file which ran the pool completely out of space.
I then attempted to delete the file, and the system hosting the zpool then OOMed and crashed.
Exploring the system, I can import the pool as long as I do not mount the zvol. If I do mount the dataset, some portion of the zfs kernel module consumes all the ram in the system in about 3 seconds (The host here has 32 GB of ram), and then the machine kernel panics due to OOM.
I cannot easily get better logs because the machine goes from working fine to completely hosed in about 3 seconds.
There are no snapshots or anything else in this pool. It's just a single pool with a single zvol that takes the entire pool's space. No L2ARC, etc...
Describe how to reproduce the problem
What I have tried to fix the issue:
Whatever is using the RAM, it cannot use swap.
/sys/module/zfs/parameters
to reduce anything which seemed to have high memory limits to a few GB, as well as setting limits on any parameters that were set to zero.No change in behaviour
zpool import --rewind-to-checkpoint <recent-checkpoint>
This caused the pool to need to scrub, which completed with some file corruption I can deal with. This was at the point where I was experimenting with any commands that seemed like they may help. This did cause the pool to change from being 100% full (0 bytes free) to 99% full (~500 GB free), but did not resolve the crash issue.
This is hard to reconstruct since the OOM death means I don't have
.bash_history
from the changes I made before each crash.Describe how to reproduce the problem
I'm not certain, but I think:
I cannot easily replicate the issue, since I do not have another system to experiment with. This is a personal machine, so I don't have a spare (or the ability to just nuke everything and restore from backup).
Misc:
I'm not sure where to go from here, I have no experience trying to debug this kind of zfs issue.
Would this constitute a security issue? It seems like any unprivileged user who can write a file to a ZFS pool can therefore brick the pool. I can't see how that wouldn't be a major concern.
Possibly related: #6783
The text was updated successfully, but these errors were encountered: