Date: Tue, 29 Nov 2016 08:17:19 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 214923] kqueue hangs with busy loop Message-ID: <bug-214923-6@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214923 Bug ID: 214923 Summary: kqueue hangs with busy loop Product: Base System Version: 11.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: yjh0502@gmail.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org I used watchman[1] for monitoring file changes, and watchman process hangs = on infinite loop occasionally. Here's dtrace trace for hanging process. --- root@hostname:~ # dtrace -n 'profile-997 /pid =3D=3D 85473/ { @[stack()] = =3D count() }' dtrace: description 'profile-997 ' matched 1 probe ^C kernel`kqueue_kevent+0x369 kernel`0xffffffff80f8442b 4 kernel`kqueue_kevent+0x37b kernel`0xffffffff80f8442b 8 kernel`kqueue_kevent+0x3b5 kernel`0xffffffff80f8442b 14 kernel`kqueue_kevent+0xda1 kernel`0xffffffff80f8442b 25 kernel`kqueue_kevent+0xdc9 kernel`0xffffffff80f8442b 29 kernel`kqueue_kevent+0x44b kernel`0xffffffff80f8442b 31 kernel`kqueue_kevent+0x3c7 kernel`0xffffffff80f8442b 45 kernel`kqueue_kevent+0x43c kernel`0xffffffff80f8442b 49 kernel`kqueue_kevent+0x38c kernel`0xffffffff80f8442b 52 kernel`kqueue_kevent+0x453 kernel`0xffffffff80f8442b 54 kernel`kqueue_kevent+0x2f0 kernel`0xffffffff80f8442b 57 kernel`kqueue_kevent+0xda3 kernel`0xffffffff80f8442b 58 kernel`kqueue_kevent+0xdaa kernel`0xffffffff80f8442b 58 kernel`kqueue_kevent+0x3b8 kernel`0xffffffff80f8442b 58 kernel`kqueue_kevent+0x3bd kernel`0xffffffff80f8442b 59 kernel`kqueue_kevent+0x444 kernel`0xffffffff80f8442b 65 kernel`kqueue_kevent+0xdd7 kernel`0xffffffff80f8442b 67 kernel`kqueue_kevent+0x3cb kernel`0xffffffff80f8442b 83 kernel`kqueue_kevent+0x34f kernel`0xffffffff80f8442b 91 kernel`kqueue_kevent+0x440 kernel`0xffffffff80f8442b 94 kernel`kqueue_kevent+0x348 kernel`0xffffffff80f8442b 97 kernel`kqueue_kevent+0xd93 kernel`0xffffffff80f8442b 109 kernel`kqueue_kevent+0x2f5 kernel`0xffffffff80f8442b 113 kernel`kqueue_kevent+0x393 kernel`0xffffffff80f8442b 122 kernel`kqueue_kevent+0x37f kernel`0xffffffff80f8442b 126 kernel`kqueue_kevent+0x3cf kernel`0xffffffff80f8442b 126 kernel`kqueue_kevent+0x356 kernel`0xffffffff80f8442b 168 kernel`kqueue_kevent+0xdd0 kernel`0xffffffff80f8442b 266 kernel`kqueue_kevent+0x382 kernel`0xffffffff80f8442b 399 kernel`kqueue_kevent+0x36d kernel`0xffffffff80f8442b 437 kernel`kqueue_kevent+0x39a kernel`0xffffffff80f8442b 465 kernel`kqueue_kevent+0x365 kernel`0xffffffff80f8442b 969 kernel`kqueue_kevent+0x3a4 kernel`0xffffffff80f8442b 1243 kernel`kqueue_kevent+0x3a0 kernel`0xffffffff80f8442b 3513 kernel`kqueue_kevent+0x385 kernel`0xffffffff80f8442b 3713 kernel`kqueue_kevent+0xdde kernel`0xffffffff80f8442b 3751 kernel`kqueue_kevent+0x371 kernel`0xffffffff80f8442b 3752 kernel`kqueue_kevent+0x3c2 kernel`0xffffffff80f8442b 3866 kernel`kqueue_kevent+0x438 kernel`0xffffffff80f8442b 3890 kernel`kqueue_kevent+0x35d kernel`0xffffffff80f8442b 3891 kernel`kqueue_kevent+0x3ab kernel`0xffffffff80f8442b 3934 kernel`kqueue_kevent+0xd9a kernel`0xffffffff80f8442b 4046 kernel`kqueue_kevent+0x3ba kernel`0xffffffff80f8442b 4067 kernel`kqueue_kevent+0x3ae kernel`0xffffffff80f8442b 4109 kernel`kqueue_kevent+0xdc2 kernel`0xffffffff80f8442b 4115 kernel`kqueue_kevent+0x341 kernel`0xffffffff80f8442b 4125 kernel`kqueue_kevent+0x447 kernel`0xffffffff80f8442b 9275 kernel`kqueue_kevent+0x374 kernel`0xffffffff80f8442b 11043 kernel`kqueue_kevent+0x3a8 kernel`0xffffffff80f8442b 17816 --- Here's ps output --- root 85473 100.0 0.2 47424 3760 - L 19Oct16 13:10.30 /usr/local/bin/watchman -p -j --server-encoding=3Djson --output-encoding=3D= bser --- `top` shows that watchman process spins on kqueue call --- PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMM= AND 85473 root 4 20 0 47424K 3760K *kqueu 2 13:32 97.82% watc= hman --- The host uses zfs filesystem on root. In this case problem arises on 11.0-RELEASE-p3, but I faced the problem from 10.3 releases. The host runs = on top of KVM hypervisor. `dmesg` does not show any logs from kernel. Please l= et me know if I'm missing some information. [1] https://facebook.github.io/watchman/ --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214923-6>