From nobody Sun May 11 14:49:15 2025 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZwQcS1nsDz5w05Z; Sun, 11 May 2025 14:49:28 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwQcR4hVVz3QXM; Sun, 11 May 2025 14:49:27 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; none Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id B583FA64805; Sun, 11 May 2025 14:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1746974957; bh=qPuh7t3lWSaT0CSg0aisS8aIqHgWaJ8G4yFY5QCJx88=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=D55RjH9qX//AWd0DBlU1c/yolFvesvSUVc1o4AnmuOJ9e2dAuo4ZgPCf04GlwsQsf LPkLHFqr25cYpjvlEAnSDkfogLjvD5cPuKF81DoWVrZTj2K8OYEgpSvPbvIs3VD7c9 Ta0EOtS+IrO1i7GsMfgHJJuMmbvU7ZS+LEpNuoEuaKJfBnhr+76Et1PXrFoXSJ8mWG 7T7D51eomsE72zDgPNC5pkvIlhvHNAMKJI7XCsG+zmz/lCabfwFcqAc1lxnGV1VO4x hO9SY6JuiB63fSfzt9nPwdcU2OgRJQm9fGplU1cfoZDsW/1RFECXG56PE8DiMZ2IwU OCRdAHUYY8jc8dJMUouyqK6b7sQ9b3HYT0wTm2xU0KII/Jkm6ABZ+z+CYguI0lG6gz OyFQ55ArkYsj4kqUY/xeQ7kLFam0zZftczs+HuH/E1vw32rE++/IlXshuv19I64LXs ks9R2yFCDdOtMFKUmGza4w5+nctRZ09sdVdpblHgJpnCx3P6l+rW68fMwF2XL2bc3E C1lz/bvxclnSnr0LXNAjiE8nVUW30YVeFpMx/ybca3CQW+zgisi9IoEjwaXj4DMNHs XBRS+C9b89vRjl6Phu1n/hXorEqL+0NgQaKWkMercpY3k84ua/5Xy9abW5sb7OzGKr W/9Gerwq+kyk72eMbaEPBgbk= Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 6B2432D029E0; Sun, 11 May 2025 14:49:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id AeYF9dz3_B17; Sun, 11 May 2025 14:49:17 +0000 (UTC) Received: from strong-rtwn0.sbone.de (strong-rtwn0.sbone.de [IPv6:fde9:577b:c1a9:4902:3e64:cfff:fe55:bc80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4F0E52D029D8; Sun, 11 May 2025 14:49:16 +0000 (UTC) Date: Sun, 11 May 2025 14:49:15 +0000 (UTC) From: "Bjoern A. Zeeb" To: Warner Losh cc: usb@freebsd.org, current@freebsd.org Subject: Re: panic in usb_detach_device / device_printf In-Reply-To: Message-ID: <49292416-982q-388o-304r-46p050pns429@yvfgf.mnoonqbm.arg> References: <9p19rsns-ro3r-so94-14p1-2s9p61377q73@yvfgf.mnoonqbm.arg> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 4ZwQcR4hVVz3QXM X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE] X-Spamd-Bar: ---- On Sat, 10 May 2025, Warner Losh wrote: > OK. Sorry for the top post. > > I need to recreate this because this data is already freed and corrupted. > > So is this panic in bhyve? What's the bhyve configuration you are using? > You say this happens as you move the xhci pass through device back to > the host. Does the same thing happen if you instead devctl detach the xhciX > the device instead? It looks like you have a da0 device on the usb bus, any > others? "Seems xhci -> ppt" So this is on the base system moving the XHCI to ppt to be used in bhyve, otherwise it wouldn't detach all the USB devices but create them. I booted a non-FreeBSD guest. The da0 is created by a blank adapter in the ugen0.7: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (200mA) at scbus1 target 0 lun 0 (da0,pass1) There's no card there. But it's been like this for years; even before the reader was supported and I've done this regularly. > I need a way to reproduce it, and I kinda get what you're doing, but step > by step instructions would be way better... And it may be a week before > I get to it: my daughter is graduating next Friday, so my whole routine and > schedule is off. # pciconf -l pci0:0:20:0 xhci0@pci0:0:20:0: class=0x0c0330 rev=0x21 hdr=0x00 vendor=0x8086 device=0x9d2f subvendor=0x17aa subdevice=0x225d I cannot reproduce it anymore. history is gone sadly. I do not know what I typed anymore. My bhyve.sh has these as comments so I likely just pasted them when bhyve refused to start because of no ppt0 not being there already. # devctl detach pci0:0:20:0 || true # devctl set driver pci0:0:20:0 ppt || true /bz -- Bjoern A. Zeeb r15:7