From nobody Sun Aug 27 13:47:57 2023 X-Original-To: bugs@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 4RYZl16jrkz4r0Tc for ; Sun, 27 Aug 2023 13:47:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYZl13Ydlz3Zq6 for ; Sun, 27 Aug 2023 13:47:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693144077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HQABgVKqRER2ZJ7RSnO7f5ywTyRdnMzdqBMhLFMeHj0=; b=rnbYQvKJcwE8EyNM6ccHYtmQh6sRifG5S+9AXkwUOb14JpErQgWey/Tq4NgG18n+fflbwR Z17/2468ZikmHXlzJNvZad3p9BWBgDQ88jckEHdmiEBE+U3XUvqT692eJ38xEIP87bobZm oYjQ3RpW3ZKlDlq6X1jP2dSbk9saRl0s5Zw8uU8M/5eGAlt8mXhUzOzncdcilfV11lBATw RzP6mH0hZ1bmQfpVW1SBsFpmow3R/uJazNIhA3bzfDIisI2OV5RZMqKgZLt6GETnDVjusA WbJxnTfJcdRJVFojIwIKqxJ7AFtqGpwk1mKSguSvH3mFTLFok9u04nb5L9a5fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693144077; a=rsa-sha256; cv=none; b=q1J9ymfvDTFy7Tqn7tebsdJGyMRHsujGnsqalBHbcyxFXPbVAS5Wo3M/E6sBtvGuMxMFC4 PUA553yg+ujk9aJd3yhZS9OblmXvkA/CEWAJ9sazEj6Sv+scV1AyhHw/8PVnG8+WEfjm88 PVp44cFywTZHtHWAYbUkl15aw3tj35hDhTjIO257au11CVVO0nziDNOp1HlZH16fo0KgiX aDYAI1KqHkfiInSoMZwSvQhpQ5sf352gj8gJI87kuvJrPmGPLcS4Wrr4rqev8IJsrik6zQ D9Tmp4/brxG0Qag2O3jBkbA2n275maxK1F8yiY/XNsE1tWw28mEVsv/X+FphEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RYZl12MhyzTZ0 for ; Sun, 27 Aug 2023 13:47:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 37RDlv6O092496 for ; Sun, 27 Aug 2023 13:47:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 37RDlvOV092495 for bugs@FreeBSD.org; Sun, 27 Aug 2023 13:47:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 273289] smartpqi: fix panic on removal of SAS drive Date: Sun, 27 Aug 2023 13:47:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jfc@mit.edu X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273289 --- Comment #8 from John F. Carr --- Created attachment 244386 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D244386&action= =3Dedit move free out of spinlock (new driver) Because pqisrc_free_device has changed in the new driver a new patch is nee= ded. I tested this by copying the new driver to 13.2-CURRENT, the version I am running on my HPE server. The new driver is very chatty, see below. Inste= ad of a compile-time constant the variable logging_level in smartpqi_defines.h should be a tunable and the default value should not include PQISRC_FLAGS_N= OTE. The driver appears to be trying to delete the drive twice. See the "Invalid device" note. The following is the dmesg output triggered by removing and replacing a dri= ve, which would have caused a panic with the unpatched old driver. [NOTE]:[ pqisrc_display_device_info ] [ 274 ]removed scsi BTL 0:8:0: SEAGA= TE=20 XS960SE70004 Physical SSDSmartPathCap- En- Exp+ qd=3D65535 [NOTE]:[ pqisrc_remove_device ] [ 1443 ]vendor: SEAGATE XS960SE70004 mo= del: XS960SE70004 bus:0 target:8 lun:0 is_physical_device:0x1 expose_device:= 0x1 volume_offline 0x0 volume_status 0x0=20 [WARN]:[67:655.0][0,8,0][CPU 0][pqisrc_wait_for_device_commands_to_complete][430]:Device Outstanding IO count =3D 0 [NOTE]:[ pqisrc_free_device ] [ 1643 ]Giving back target 8=20 [NOTE]:[ pqisrc_delete_softs_entry ] [ 363 ]Invalid device, either it was already removed or never added [NOTE]:[ pqisrc_free_device ] [ 1673 ]Removed memory for device : B 0: T 8:= L 0 da7 at smartpqi0 bus 0 scbus0 target 8 lun 0 da7: s/n HLJ03TL80000822150Z3 detached (da7:smartpqi0:0:8:0): Periph destroyed [NOTE]:[ pqisrc_add_softs_entry ] [ 288 ]Added device [7 of 10]: B 0: T 8: = L 0 [NOTE]:[ pqisrc_add_device ] [ 1420 ]vendor: SEAGATE XS960SE70004 model: XS960SE70004 bus:0 target:8 lun:0 is_physical_device:0x1 expose_device:= 0x1 volume_offline 0x0 volume_status 0x0=20 [NOTE]:[ pqisrc_display_device_info ] [ 274 ]added scsi BTL 0:8:0: SEAGATE= =20 XS960SE70004 Physical SSDSmartPathCap- En- Exp+ qd=3D65535 ses0: da7,pass8 in 'ArrayElement0007', SAS Slot: 1 phys at slot 8 ses0: phy 0: SAS device type 1 phy 7 Target ( SSP ) ses0: phy 0: parent 51402ec013d6a5b4 addr 5000c5003e85f2bd da7 at smartpqi0 bus 0 scbus0 target 8 lun 0 da7: Fixed Direct Access SPC-5 SCSI device --=20 You are receiving this mail because: You are the assignee for the bug.=