From owner-svn-src-head@freebsd.org Thu May 21 13:01:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FDD32CEDFB; Thu, 21 May 2020 13:01:25 +0000 (UTC) (envelope-from weh@microsoft.com) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sg2apc01on0718.outbound.protection.outlook.com [IPv6:2a01:111:f400:febd::718]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49SV9w5LFNz3Sbf; Thu, 21 May 2020 13:01:24 +0000 (UTC) (envelope-from weh@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I2XL207ig6As3puYOhP2jmDBLF1N+WG8yi+GPf/tJDdF05X4A/oh3jf9jMTekAz6Sg73CM18J1bz8feO+LF1KQSROf8LPlzgSrj2urnPOHkR+nWzWKSeqW7wN7ZNQXK1HsooMpSyLSoCf2yXV646W2hfZBe/CoJeDDz9doQeq+HhsZJcq88QQET+KBr5gHkzL+NNIA5v/cbwZ7BUmdjrmF6WENjV8sE6oqIeLk+TbcuNH3BdYECk08XaKyfFhFLuU9y1tIAoBwn+UiVCKcmnZ1wYGrKDO7ZjRUfUC7TliQbgK45nCPBtZsp20UKSi9xiJg34w1Ctk6AXpqC7wNLlPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KI0v1sWm4JR1QHEBzZwAPuIy0lI0aj5iJOQ2nVSlhEY=; b=DIvlH0wLDQrTAct1Co2WZDMN2Fy0rIdzXJiyFyf7xZciSYcnKmZsGdTxExjLxh9YyXv2iNfR3VIf6UMETMHF6crf4ek7h2uPkj1uX6NVtDKb8HmgvRdgxn+W7jMVGKZ9MJLftkPbxnCO3Rbpwji8iZWxk6kFTV9MsgO3ZAdLXrhShj+qwSsb/sbl5JOCgNFtZMH0e4hkULiXr1Prr8lEWoJaPSQriEJUeMwN9MVt8MW7hyAjFtf9SGJmVplpqBlwQKHBKWbWSdUjltBWY82//VIRUM2yFPS8nep5FJb09SMuepEOJ+yIcmh5gY++LBrfzXDeJ0RlaD5/rUSCH/O/PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none Received: from SG2P153MB0377.APCP153.PROD.OUTLOOK.COM (2603:1096:0:1::15) by SG2P153MB0255.APCP153.PROD.OUTLOOK.COM (2603:1096:4:ae::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.7; Thu, 21 May 2020 13:01:19 +0000 Received: from SG2P153MB0377.APCP153.PROD.OUTLOOK.COM ([fe80::798e:2eb8:f18e:7a0]) by SG2P153MB0377.APCP153.PROD.OUTLOOK.COM ([fe80::798e:2eb8:f18e:7a0%7]) with mapi id 15.20.3045.005; Thu, 21 May 2020 13:01:19 +0000 From: Wei Hu To: Peter Holm , Wei Hu 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 Thread-Topic: svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock dev/hyperv/include dev/hyperv/vmbus modules/hyperv modules/hyperv/hvsock sys Thread-Index: AQHWLpZljJNzTG7+okeOAs3l3mz20qiyeFYAgAAJc+A= Date: Thu, 21 May 2020 13:01:18 +0000 Message-ID: References: <202005201103.04KB3xTp013965@repo.freebsd.org> <20200521122422.GA65523@x8.osted.lan> In-Reply-To: <20200521122422.GA65523@x8.osted.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-05-21T13:01:17Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=9a22f5a9-5911-4d80-9d5f-05d7c2283187; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0 x-originating-ip: [2404:f801:9000:18:6fed::496b] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: c6041649-9aaf-44f4-c52e-08d7fd870dfc x-ms-traffictypediagnostic: SG2P153MB0255: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:277; x-forefront-prvs: 041032FF37 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YRsPjxi17o6umhxzl6JRYLSfs+d5PptaB/kCrlSIMoeIdo2dP+hkpQaVrxW5MwhK+nvPFjaoQOOFcoj9+x1EkmQqw+f7ajVgCxuA/jtCQNkARZulxyW1A8Hd7K7GQ1vLPvCyw+jWYOFdK8jb0j04AIQpY62KNCM1dmcGq1eC0GpGiSfhIMbi6tpG0KchrD5KBqG5Jx2f0S7u4f+iXh4AMk8TJvHyFVYlvgVY9Pi8MUA8AKmes5vAzsijPs4SFe2pFtc6oC5/giXskQYlCGy9RH+bDZWIak3KhRiNHyeNQzHAd6QWu06JyhWKy7bnNnAc49q/gL29EB0cUDcUSSK6OH7B9LXGfjQZivNx+nXrpl2yeO6i/sTArIBEo40h5zOXiUUhSRBPOpMRwmJ3qm2XY+YJNVpvInfiwBpHS7EcuoZEP3dAA+ZliDBSr6f21AipLkehGhsg+mqqbaN3E15b6QJSJT9+V/bnjO3qsWvqXQEnhvMXwF6wGKj504r1+xI3 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SG2P153MB0377.APCP153.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(396003)(39860400002)(136003)(376002)(366004)(86362001)(2906002)(71200400001)(83080400001)(450100002)(4326008)(82950400001)(82960400001)(66446008)(66556008)(66476007)(66946007)(64756008)(53546011)(6506007)(478600001)(33656002)(966005)(110136005)(52536014)(8936002)(76116006)(8676002)(5660300002)(316002)(54906003)(7696005)(9686003)(10290500003)(8990500004)(186003)(55016002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: j1S+IsB3WK3t5VKs+Oij3zzUfMwdbO+8jSN0jTAMP7npbcqtrwLoZ0zp8Zk5ZBPCwYIgV//I3WUn5ngTJKcQItQPBbREND8W6LtHxJUkL05hEr4ig0mKRRSkPegNXK1+C+OjTDxjgBVIdMsVafNcyqbA9KNzeOGRhbbLdCalMZ87PUiQPGw31FN2f3frYEBUBTrXHXGWwqAJuPwiBwBtiMS1FqX7hsdB8JrkgkL+rdTfWIvxEgSLq1mjQEEICOvZ4SgIdQoqCh1XKJY4JD+RRtOHBuMOGqp1rEtB7+mQrxBEKFrllnYbJwBKd07xZZRNXN8UbkDymPp5/F3jgczbK1wOiWShNx1v1nYArFb9R27e5/4ChysTKDWP5ISbjzXNubgurO0/wJrs6973R6Wg0GAC3ITW9BnTLotzU55cCCxlBmOF20IX0qOinHBzAMCUY8w0Iu+TraWo+nuDtHduLhCU37Gd/c2fK6TV9xmHoM8FLQ9J0rJxxWawYj1/M/Pk/K7imep5ZcCmVt1oYOSuog== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6041649-9aaf-44f4-c52e-08d7fd870dfc X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2020 13:01:18.8208 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cUbauwh9UXqGv4UNmvD1jR2B1NPREphk8nTcMsuCNmbjfyX5POeNIJJVeeu9LPwzcmeBilhSlxokYBRkEkCvmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2P153MB0255 X-Rspamd-Queue-Id: 49SV9w5LFNz3Sbf X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2020 13:01:25 -0000 > -----Original Message----- > From: Peter Holm > Sent: Thursday, May 21, 2020 8:24 PM > To: Wei Hu > 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