-
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
Three-way deadlock between z_iput, sync(), and fsync() #7964
Comments
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
This issue is still present in the latest 0.8.4 release. I ran into this on a production workload just a few weeks ago. |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
I think this is a deadlock issue between inode writeback issued from sync and inode evict. |
If inode eviction and sync writeback happen on the same inode at the same time, inode eviction will set I_FREEING and wait for sync writeback, and sync writeback may eventually calls zfs_get_data and loop in zfs_zget forever because igrab cannot succeed with I_FREEING, thus causing deadlock. To fix this, in zfs_get_data we call a variant of zfs_zget where we bailout on loop if I_SYNC flag is set, and force the caller to wait for txg sync. Signed-off-by: Chunwei Chen <david.chen@nutanix.com> Fixes openzfs#7964 Fixes openzfs#9430
System information
Describe the problem you're observing
Three-way deadlock between z_iput, sync(), and fsync()
Describe how to reproduce the problem
Not sure - it just happens after a few weeks on an AFS fileserver with 4-spindle raidz
I previously had to disable swap due to #7734
There are no hardware errors logged and nothing apparently wrong with the disks. I can continue to use the pool but certain operations will hang in uninterruptible sleep until the system is rebooted.
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: