Bug 272360 - System crash when drive goes idle
Summary: System crash when drive goes idle
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 13.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-usb (Nobody)
URL:
Keywords: crash, needs-qa
Depends on:
Blocks:
 
Reported: 2023-07-04 04:33 UTC by Hitch
Modified: 2023-07-05 23:56 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hitch 2023-07-04 04:33:09 UTC
I'm running 13.2 STABLE and Gnome desktop.  Although I have disabled screensaver, lockscreen, and hibernation, I still have a problem when the external drive goes idle, the system crashes.  The only way to resolve is to reboot the system.  I am running on a Lenovo ThinkPad P15 Gen 1.
Comment 1 Mina Galić freebsd_triage 2023-07-04 07:17:25 UTC
what type of hardware is the external USB drive?
how is it connected?
how is it accessed?
what does the crash look like?
what does the crashdump look like? https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/#kerneldebug-obtain
Comment 2 Tomoaki AOKI 2023-07-04 08:57:23 UTC
Just a annoying possibility, but if you attach ThunderBolt-only (or possibly ThunderBolt-capable) external drive to ThunderBolt-capable Type-C port ON BOOT, it may be recognized as PCIe-attached controller and attached drive.

This case, if the drive goes sleep WITH ITS CONTROLLER, it means that PCIe-attached controller suddernly disappear from FreeBSD side.
It surely causes hang, unless the port and controller are considered as pluggable.

For me, if I attach TB3-only SSD to TB3-capable Type-C port on my ThinkPad P52,
  *attaching BEFORE powering on: Recognized as ada drive.
  *attaching AFTER boot: Not at all recognized. Nothing happenes.

On-developing hps@'s USB4/TB3 driver [1] doesn't recognize the drive on both cases.
It would be because ntel Titan Ridge Thunderbolt 3 USB controller on my P52 is noto yet supported enough.
nhi_wmi0: <Thunderbolt WMI Endpoint> on acpi_wmi0 appears on dmesg, but that's all.
Always treated as xchi1.

[1] https://github.com/hselasky/usb4