Date: Thu, 21 May 2020 13:01:18 +0000 From: Wei Hu <weh@microsoft.com> To: Peter Holm <pho@freebsd.org>, Wei Hu <whu@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: RE: svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock dev/hyperv/include dev/hyperv/vmbus modules/hyperv modules/hyperv/hvsock sys Message-ID: <SG2P153MB03776DF533391E201A75B1F1BBB70@SG2P153MB0377.APCP153.PROD.OUTLOOK.COM> In-Reply-To: <20200521122422.GA65523@x8.osted.lan> References: <202005201103.04KB3xTp013965@repo.freebsd.org> <20200521122422.GA65523@x8.osted.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: Peter Holm <pho@freebsd.org> > Sent: Thursday, May 21, 2020 8:24 PM > To: Wei Hu <whu@freebsd.org> > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock > dev/hyperv/include dev/hyperv/vmbus modules/hyperv > modules/hyperv/hvsock sys >=20 > On Wed, May 20, 2020 at 11:03:59AM +0000, Wei Hu wrote: > > Author: whu > > Date: Wed May 20 11:03:59 2020 > > New Revision: 361275 > > URL: > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fsvnwe= b > .freebsd.org%2Fchangeset%2Fbase%2F361275&data=3D02%7C01%7Cweh% > 40microsoft.com%7C61c524b5022b47b2c4e108d7fd81e75f%7C72f988bf86f14 > 1af91ab2d7cd011db47%7C1%7C0%7C637256606689750658&sdata=3Dmw > 4IXP3DnxICnK4U%2F8MzLbvMAzCuxih2f0waDyMSCTE%3D&reserved=3D0 > > > > Log: > > HyperV socket implementation for FreeBSD > > > > This change adds Hyper-V socket feature in FreeBSD. New socket addres= s > > family AF_HYPERV and its kernel support are added. > > >=20 > Found this with a syscall fuzz test: >=20 > panic: page fault > cpuid =3D 2 > time =3D 1590050529 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfffffe033d21d530 > vpanic() at vpanic+0x182/frame 0xfffffe033d21d580 > panic() at panic+0x43/frame 0xfffffe033d21d5e0 > trap_fatal() at trap_fatal+0x387/frame 0xfffffe033d21d640 > trap_pfault() at trap_pfault+0x99/frame 0xfffffe033d21d6a0 > trap() at trap+0x2a5/frame 0xfffffe033d21d7b0 > calltrap() at calltrap+0x8/frame 0xfffffe033d21d7b0 > --- trap 0xc, rip =3D 0xffffffff80bcd3ba, rsp =3D 0xfffffe033d21d880, rbp= =3D > 0xfffffe033d21d910 --- > _sx_xlock_hard() at _sx_xlock_hard+0x17a/frame 0xfffffe033d21d910 > _sx_xlock() at _sx_xlock+0xba/frame 0xfffffe033d21d950 > hvs_trans_close() at hvs_trans_close+0x42/frame 0xfffffe033d21d970 > soclose() at soclose+0x161/frame 0xfffffe033d21d9e0 > _fdrop() at _fdrop+0x1a/frame 0xfffffe033d21da00 > closef() at closef+0x1db/frame 0xfffffe033d21da90 > closefp() at closefp+0x96/frame 0xfffffe033d21dad0 > amd64_syscall() at amd64_syscall+0x159/frame 0xfffffe033d21dbf0 > fast_syscall_common() at fast_syscall_common+0x101/frame > 0xfffffe033d21dbf0 > --- syscall (6, FreeBSD ELF64, sys_close), rip =3D 0x8004283ca, rsp =3D 0= x7fffffffe328, > rbp =3D 0x7fffffffe460 --- >=20 > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps:%2F%2Fpeople.= free > bsd.org%2F~pho%2Fstress%2Flog%2Fsetsockopt2- > 2.txt&data=3D02%7C01%7Cweh%40microsoft.com%7C61c524b5022b47b2c > 4e108d7fd81e75f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63 > 7256606689750658&sdata=3DRuBmWrBv7lGnhF2IHZ5NOP2rmV0c%2BJXuk > RZl260KSIw%3D&reserved=3D0 >=20 > Could this be yours? Yes. Looks the lock was not initialized. The lock only gets initialized whe= n it is running on HyperV. This type of socket only works on HyperV.=20 How to reproduce it? Was it on HyperV? I am not sure how it can enter this = state. Wei
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SG2P153MB03776DF533391E201A75B1F1BBB70>