[Bug 219224] sync hanging in _cv_wait zil_commit zfs_sync sys_sync
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri May 12 10:57:09 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219224
--- Comment #1 from Tino Reinhardt <t at sdf.org> ---
I seem to be able to reproduce this on a similar system,
having cfengine running and run a loop in a shell like
"while :; do sync; done":
tools-2-b# ps ax | grep sync
27 - DL 1:27.96 [syncer]
3667 1 R+ 1017:57.50 sync
tools-2-b# procstat -kk 3667
PID TID COMM TDNAME KSTACK
3667 102488 sync - dbuf_read+0x155
dnode_hold_impl+0x188 dmu_bonus_hold+0x1d zfs_zget+0xc5 zfs_get_data+0x40
zil_commit+0x6a1 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce
Xfast_syscall+0xfb
tools-2-b# procstat -kk 3667
PID TID COMM TDNAME KSTACK
3667 102488 sync - dnode_hold_impl+0x409
dmu_bonus_hold+0x1d zfs_zget+0xc5 zfs_get_data+0x40 zil_commit+0x6a1
zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce Xfast_syscall+0xfb
tools-2-b# procstat -kk 3667
PID TID COMM TDNAME KSTACK
3667 102488 sync - dmu_zfetch+0x7b dbuf_read+0x155
dnode_hold_impl+0x188 dmu_bonus_hold+0x1d zfs_zget+0xc5 zfs_get_data+0x40
zil_commit+0x6a1 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce
Xfast_syscall+0xfb
tools-2-b# ps ax | awk '$3~"D"' | tail
22 - DL 0:00.00 [vmdaemon]
23 - DL 0:00.01 [pagezero]
24 - DL 0:02.13 [bufspacedaemon]
25 - DL 0:02.06 [bufdaemon]
26 - DL 0:02.31 [vnlru]
27 - DL 1:26.84 [syncer]
643 - DL 1:03.87 [pf purge]
3650 - DsJ 0:00.05 /var/cfengine/bin/cf-agent -f failsafe.cf
11495 - DJ 0:00.01 /var/cfengine/bin/cf-agent -f failsafe.cf
96409 - DL 0:15.85 [ftcleanup]
tools-2-b# procstat -k 3650
PID TID COMM TDNAME KSTACK
3650 102929 cf-agent - mi_switch sleepq_wait _cv_wait
zil_commit zfs_freebsd_putpages VOP_PUTPAGES_APV vnode_pager_putpages
vm_pageout_flush vm_object_page_collect_flush vm_object_page_clean
vm_object_terminate zfs_freebsd_reclaim VOP_RECLAIM_APV vgonel vrecycle
zfs_freebsd_inactive VOP_INACTIVE_APV vinactive
The shell loop is running in a screen and this indicates
it took around 5 minutes for a sync(8) to stay hanging around:
tools-2-b# ps ax | grep sync
27 - DL 1:27.96 [syncer]
3667 1 R+ 1017:57.50 sync
tools-2-b# ps olstart 3667
STARTED
Thu May 11 19:50:28 2017
This is the hanging cf-agent process:
tools-2-b# ps olstart 3650
STARTED
Thu May 11 19:50:28 2017
>From this on, other calls to sync(2) are hanging:
tools-2-b# printf '#include<unistd.h>\n int main(){sync();}' | cc -x c -o sync
-
tools-2-b# ./sync &
[1] 67191
tools-2-b# procstat -kk 67191
PID TID COMM TDNAME KSTACK
67191 103195 sync - mi_switch+0xd2 sleepq_wait+0x3a
_cv_wait+0x194 zil_commit+0x85 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce
Xfast_syscall+0xfb
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list