Skip to content
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

VNOP_FSYNC: mutex_enter: locking against myself!"@spl-mutex.c:108 #34

Closed
lundman opened this issue Jun 19, 2013 · 1 comment
Closed
Labels

Comments

@lundman
Copy link
Contributor

lundman commented Jun 19, 2013

Large rsync (Copying "/" to ZFS) produced:

panic(cpu 0 caller 0xffffff7f86bdf4a8): "mutex_enter: locking against myself!"@spl-mutex.c:108
Backtrace (CPU 0), Frame : Return Address
0xffffff804ab13360 : 0xffffff800541d626 mach_kernel : _panic + 0xc6
0xffffff804ab133d0 : 0xffffff7f86bdf4a8 net.lundman.spl : _spl_mutex_enter + 0x78
0xffffff804ab133f0 : 0xffffff7f86cc4614 net.lundman.zfs : _zfs_zget + 0x74
0xffffff804ab13490 : 0xffffff7f86caf1ed net.lundman.zfs : _zfs_get_data + 0x7d
0xffffff804ab13540 : 0xffffff7f86ccc0a6 net.lundman.zfs : _zil_lwb_commit + 0x356
0xffffff804ab135d0 : 0xffffff7f86cca128 net.lundman.zfs : _zil_commit_writer + 0x128
0xffffff804ab13620 : 0xffffff7f86cc9f87 net.lundman.zfs : _zil_commit + 0x137
0xffffff804ab13650 : 0xffffff7f86cb2ae0 net.lundman.zfs : _zfs_fsync + 0x110
0xffffff804ab136a0 : 0xffffff7f86cb9dfe net.lundman.zfs : _zfs_vnop_fsync + 0x6e
0xffffff804ab136e0 : 0xffffff8005511f3f mach_kernel : _VNOP_FSYNC + 0x2f
0xffffff804ab13710 : 0xffffff80054f1583 mach_kernel : _vflush + 0x673
0xffffff804ab13760 : 0xffffff80054f0cd1 mach_kernel : _vnode_rele_ext + 0x351
0xffffff804ab137a0 : 0xffffff80054f7ac6 mach_kernel : _vfs_addtrigger + 0x2a6
0xffffff804ab137d0 : 0xffffff80054efa5e mach_kernel : _vnode_create + 0x15e
0xffffff804ab13890 : 0xffffff7f86cbce9c net.lundman.zfs : _zfs_znode_getvnode + 0x20c
0xffffff804ab13930 : 0xffffff7f86cc3260 net.lundman.zfs : _zfs_znode_alloc + 0x760
0xffffff804ab13b20 : 0xffffff7f86cc4849 net.lundman.zfs : _zfs_zget + 0x2a9
0xffffff804ab13bc0 : 0xffffff7f86cbb780 net.lundman.zfs : _zfs_vnop_readdirattr + 0x5f0
0xffffff804ab13e00 : 0xffffff8005513246 mach_kernel : _VNOP_READDIRATTR + 0x56
0xffffff804ab13e60 : 0xffffff8005501f1a mach_kernel : _getdirentriesattr + 0x2da
0xffffff804ab13f50 : 0xffffff80057e16aa mach_kernel : _unix_syscall64 + 0x20a
0xffffff804ab13fb0 : 0xffffff80054ce9c3 mach_kernel : _hndl_unix_scall64 + 0x13

Pretty clear that we call zget which allocates a new vnode which trigger a vflush which triggers a zil_commit which has to call zget.

Quite similar to the reclaim issue, and can be solved the same. This explains why MacZFS has logic to test for this case finally.

@lundman
Copy link
Contributor Author

lundman commented Jun 19, 2013

fc7b82d

Test if we are already locked in zget.

This takes a different approach to MacZFS, who passes a value from zfs_get_data to avoid locks.

@lundman lundman closed this as completed Jun 19, 2013
lundman pushed a commit that referenced this issue Nov 12, 2015
…eviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com>

Closes #34
rottegift pushed a commit to rottegift/zfs that referenced this issue Nov 13, 2015
…eviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com>

Closes openzfsonosx#34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant