Repository navigation
PSPLinkUSB / pspsh stops responding after many hours of mostly idle USB connection #74
Description
Problem
On a real PSP running PSPLinkUSB over USB, pspsh / PSPLinkUSB can become unresponsive after many hours of connection, despite the PSP and host being idle for the majority of that time. The exact component that hangs is not yet identified: the PSP-side kernel USB transport, usbhostfs_pc on the host, or their interaction.
Environment
- Real Sony PSP connected by USB to a Mac running
usbhostfs_pcandpspsh. - PSPLinkUSB running on PSP; PSP-side USB HostFS kernel module.
- Workload: mostly idle for several hours, with occasional shell commands; high-volume transfers are not a prerequisite for the reported failure.
- Exact PSP model/firmware and exact time to failure not yet recorded.
Steps to reproduce (intermittent, long duration)
- Launch PSPLinkUSB on the PSP with its USB cable connected to the Mac.
- Start
usbhostfs_pcand connect usingpspsh. - Leave both running and connected for several hours, mostly idle.
- Attempt to use the existing shell or establish a new session. Try
pspsh -e 'echo ALIVE',pspsh -e 'ls ms0:/'andpspsh -e 'ls host0:/'.
Expected: The PSP shell and host file operations remain responsive; transient USB errors recover or produce an actionable failure.
Observed (user report): After many hours, pspsh / PSPLinkUSB no longer responds or accepts usable communication.
The original long-duration failure has not yet been reproduced in a controlled soak test. It is not known whether the PSP remains enumerated when this failure occurs or which recovery action is necessary.
Potential causes (hypotheses, not proven)
- Unbounded PSP waits in
usbhostfs/main.c: bulk read/write operations usesceKernelWaitEventFlag(..., NULL); command and async operations usesceKernelWaitSema(..., NULL). A lost USB completion or stalled host request may block a thread permanently. - Initial connection/attach handshake:
usb_thread()synchronously waits to read the host magic in the same thread handling USB events. A blocked read may prevent timely detach/reconnect handling. - Host USB-handle lifetime race: the asynchronous thread accesses global
usbhdrwhile the main thread may close/reassign it after a transfer error, without coordinated lifetime synchronization. - Async receive rearming: certain failed or zero-length completions previously disabled shell input reception until reconnect; partially addressed by PR Fix HostFS directory leaks, dangling symlinks and DREAD replies #72.
The PSP SDK libcglue code was investigated but appears less likely as the primary kernel USB transport cause; the relevant PRX links PSP kernel libraries rather than Newlib libcglue.
Important safety constraint: A timeout must not immediately reuse a static UsbdDeviceReq while the previous request might still be in flight. Cancellation and callback completion/endpoint quiescence must be handled first.
Related fixes and hardware validation
PR #72 addresses several adjacent confirmed issues: async receive rearming, failed transfer submissions, response validation, a HOSTFS_CMD_DREAD response-tag mismatch, successful scandir() allocation leaks, and dangling-symlink listings. It was validated on real PSP hardware with:
- 1,000/1,000 native-C shell/HostFS test commands passed, with no timeouts or reported failures.
- 3/3 physical USB cable disconnect/reconnect cycles recovered, without restarting the PSPLinkUSB application or the same host daemon.
- Controlled host-daemon restarts recovered communications without a PSP restart.
These tests do not establish a fix for the many-hour, mostly-idle hang. This issue should remain open independently of PR #72 until long-uptime validation confirms the problem is resolved.
Related: PR #72; PR #71 (previous host-side reconnect/busy-loop work); docs/USB_LONG_UPTIME_INVESTIGATION.md in PR #72.
Useful diagnostics at the next occurrence
Before restarting anything, capture:
- Whether the PSP is still enumerated as USB VID
054c/ PID01c9(macOS:ioreg -p IOUSB -l -w 0). - Whether
usbhostfs_pcis running and listening on localhost TCP ports10000–10007, and whether a freshpspshTCP connection succeeds but no shell prompt or response arrives. - Whether
echo,ls ms0:/andls host0:/behave differently (use a bounded per-command timeout to avoid leaving hung clients around). - Host daemon logs, USB transfer errors, and thread stacks where practical.
- Whether physical USB unplug/replug, host daemon restart, or PSPLinkUSB restart is required to recover, plus elapsed time until the hang.
A several-hour idle soak with occasional bounded native-C probes can help isolate the failure without placing continuous transfer load on the PSP.
Activity
fjtrujy commentedon Oct 24, 2026
Confirmed physical long-uptime reproduction — 2026-10-24, approximately 10:44 CEST
The original reporter left the PSP connected overnight with the USB HostFS daemon and PSPLinkUSB running. The next morning, new
pspshconnections stopped responding. No PSP reset, physical unplug, or host-daemon restart has been performed during the investigation.Live observations in the failed state
"PSP" Type B, with the interface exclusively owned by PID 89905. Current USBsessionID5459133570798, which differs from the one observed in the earlier successful tests.usb_hardware_smoke --iterations 3 --timeout 3failed on its first shell echo after timeout, no output. Repeated with a two-second timeout; same result.pspshbinary also timed out on its first echo. The recent unmatched-quotespspshfix is not responsible.samplecaptures of PID 89905: main thread instart_hostfs()->libusb_bulk_transfer()-> asynchronous USB bulk-IN read waiting inpoll(); host async thread waiting inselect(). These are host-side waiting states, not definitive proof of a deadlocked PSP-side kernel thread. No new data returned by the PSP to complete the shell echo.pmset -g logconfirms that the host entered system sleep at 03:57:24 CEST and underwent repeated maintenance DarkWake/sleep cycles overnight. USB device session also changed. Mac sleep/wake and PSP USB detach/attach recovery are now high-priority suspects, but temporal correlation does not prove they caused the original hang.Code areas to instrument next
usb_thread()processes USB attach/detach/async events, but duringUSB_EVENT_ATTACHcallsread_data(&magic, 4)synchronously. That function waits insceKernelWaitEventFlag(..., NULL)for completion. A stalled handshake can prevent the same thread from processing later detach events.sceKernelWaitSema(..., NULL)/sceKernelWaitEventFlag(..., NULL); a lost completion may retain the semaphore and stall shell/HostFS indefinitely.usbhdrlifetime across the main and async threads and whether USB sleep/wake reenumeration can leave a stale receive request or endpoint state.Important: Do not introduce a timeout which immediately resets/reuses an in-flight static
UsbdDeviceReq. Quiescence and cancellation completion must be verified before reuse.Preserved evidence
Local-only diagnostic snapshots (not uploaded because of machine-specific/private data):
~/Downloads/psplinkusb-issue74-reproduction-20261024/Contains host process and TCP snapshots, USB IORegistry snapshot, two 2-second host daemon thread samples, failure output for the C test with installed and original backed-up
pspsh. The original host daemon and PSP connection have not been reset yet; further non-disruptive physical observations and an isolated recovery test can follow.Status: Confirmed overnight failure; specific root cause still under investigation. The short-duration USB/reconnection fixes in PR #72 are insufficient to guarantee long-uptime stability. This issue should remain open.
fjtrujy commentedon Oct 24, 2026
Recovery experiment following the confirmed overnight hang (2026-10-24)
After saving thread samples, macOS USB descriptors, logs and two failing native-C shell probes, I stopped only the original Mac host daemon (PID 89905) via SIGTERM. I did not exit or reboot PSPLinkUSB on the PSP and did not physically unplug the cable.
Important interpretation: on shutdown, the host's
close_device()invokeslibusb_reset_device(). macOS consequently re-enumerated the PSP, giving it a new USB session ID5807329636962. The recovery therefore combines host daemon restart + USB device reset; it must not be described as proof that restarting only userspace fixes the hang.usb_hardware_smoke(native C) passed 3/3 commands, then 120/120 commands (shell echoes,ms0:/,host0:/), with zero failures; p95 53 ms, maximum 60 ms.~/Downloads/psplinkusb-issue74-reproduction-20261024/.This confirms an overnight communication hang recoverable by host restart plus USB reset. The leading next investigation is whether macOS sleep/wake or a lost PSP-side completion/async receive causes the stale transport. A controlled A/B soak with Mac system sleep disabled, then enabled, would help distinguish causes. Keep the issue open.
The HOME button is not an appropriate PSPLinkUSB responsiveness test because the application has never supported HOME-to-exit, including when functioning normally.
fjtrujy commentedon Oct 24, 2026
Fresh macOS reboot baseline — 2026-10-24, 12:05–12:09 CEST
The Mac was rebooted by the reporter after our overnight-failure capture and controlled host-daemon + USB-reset recovery.
usbhostfs_pcwas running immediately after reboot.ms0:/, andhost0:/commands passed in 36.52 seconds, p95 70 ms, maximum 90 ms. Host daemon resident memory was 7,440 KiB before and 7,536 KiB after (96 KiB change; not evidence of an unbounded leak).Interpretation: Current build passes both short command stress and host-startup recovery following an OS restart. It has not yet passed a controlled overnight idle test. To test the sleep/wake hypothesis, perform a future controlled long-idle A/B: macOS prevented from system sleeping (e.g. a time-bounded
caffeinatesession, with user consent) versus normal sleep enabled. Do not overinterpret overnight uptime whenpmset -g logconfirms repeated sleep cycles.Baseline diagnostic logs were saved at
~/Downloads/psplinkusb-issue74-reproduction-20261024/(host-after-macos-reboot.log,smoke-after-macos-reboot.txt,stress-after-macos-reboot.txt).fjtrujy commentedon Oct 24, 2026
Additional diagnostic instrument prepared (2026-10-24)
Built an opt-in host-only USB transport trace in branch
investigate/usb-sleep-wake-issue74(commit18ba8d0). This is deliberately not part of PR #72, and it does not change USB recovery logic.usbhostfs_pc -Tlogs timestamps, the outcome of TCP async channel USB submissions, bulk-IN errors, and every 30 seconds of idle read timeouts whether the originallibusb_device_handlerefers to an object still in the live enumerated libusb device list (1/0/-1).~/Downloads/psplinkusb-issue74-sleep-wake-diagnostics-20261024/directory.The traced binary is launched from the working repository, not installed over the toolchain's normal host binary. The GitHub PR #72 production patch remains unchanged.
fjtrujy commentedon Oct 24, 2026
Second confirmed real-hardware idle hang, captured with the
-Thost trace — October 24, 2026, 23:52 CESTThe reporter observed
pspshhanging again after the diagnostic host daemon had been running 10h 51m. No reboot, USB unplug, host daemon restart, or USB reset was done before capturing this evidence. This is a significant advance over the original reproduction because the trace identifies the direction and libusb status of a failed transfer.Frozen state:
usbhostfs_pc -T -vremained alive as PID 25415 (started at 13:01:23); resident memory approximately 7,520 KiB.054c:01c9; USB sessionID118627976632, with exclusive owner PID 25415. TCP shell port 10000 and other channels were listening.start_hostfs()waiting on a bulk-IN read (libusb_bulk_transfer, timeout/retry loop). The host async thread was inselect()between requests. Hostsamplefiles were captured both before and after the test.original device enumerated=1. This argues against a stale libusb device object as the primary explanation; the same live device was still listed.Decisive failure:
A bounded native-C test failed on the first
pspsh -e 'echo PSPLINK_USB_SMOKE_OK', timing out after 3 s with no response. The host subsequently logged:libusb
-7isLIBUSB_ERROR_TIMEOUT. The Mac daemon accepted the shell command and attempted to send its 14-byte async frame host -> PSP via USB bulk OUT endpoint 0x03, but the write did not complete within the host's 10-second USB transfer timeout. In parallel, the PSP -> host bulk-IN endpoint 0x81 continued producing the expected idle read timeouts, and the PSP remained USB-enumerated.Most recent successfully submitted shell writes were at 22:34:53 and 22:37:02 (14 bytes each, reported transferred=14). We do not yet know whether the PSP processed those commands; transfer success alone is not evidence of shell execution. The observed hard failure occurred on/after the attempted shell write at 23:52:55.
Leading diagnosis: the PSP is no longer accepting/scheduling receives on its async USB command endpoint (endpoint 3), or the endpoint/controller is stalled, despite the device remaining enumerated. This is consistent with
set_ayncreq()failing to arm a replacement request without retry scheduling, an in-flightg_async_reqlost across suspend/resume, or a blocked PSP-side connection thread. The precise PSP request state is not yet captured, so none of these individual mechanisms is proven. It is now less likely that either the local TCP socket or a generic stale host USB device handle is the primary fault.Evidence saved locally under
~/Downloads/psplinkusb-issue74-freeze2-20261024/: snapshots of the USB device, host process and sockets, thread samples before/after probe, copy of the trace before and after the failed write, native C failure output and macOS sleep/wake history.No unsafe timeout/reuse workaround: The PSP's static
UsbdDeviceReqcan still be owned by the USB driver after an apparent stall. A safe repair requires tracking in-flight ownership and cancellation/completion, and a way to rearm endpoint 3 after failures. Further experiments should isolate whether resetting only the USB interface (without restarting the PSP) restores normal operation, after preserving the frozen state.fjtrujy commentedon Oct 24, 2026
Major recovery discriminator: reconnect works without a USB device reset or re-enumeration (2026-10-24 ~23:56 CEST)
After preserving the second frozen-state trace and host process samples, we conducted a controlled test to distinguish a Mac userspace/USB interface rebind from a full USB device reset:
SIGKILLso the normalclose_device()cleanup and itslibusb_reset_device()call were not executed.118627976632unchanged, with no exclusive owner while the daemon was stopped.-Nflag that suppresseslibusb_reset_device()on close. The new daemon acquired the same enumerated PSP instance (sessionID 118627976632). PSPLinkUSB itself remained running on the console; there was no cable disconnect or PSP reboot.Conclusion: A full USB device reset or PSP reboot is not required to recover this reproduced hang. Releasing the old host process's libusb interface and opening/claiming the same PSP device through a fresh host process is sufficient. This strongly implicates host-side USB interface/pipe state or a host/PSP endpoint mismatch that can be cleared by re-claiming the interface. The OS/driver may still reset individual USB pipe state on release/claim; we have NOT proven this is purely a host-userspace defect, nor that the PSP endpoint was healthy throughout.
The original hang's decisive symptom was an endpoint 0x03 (Mac -> PSP async command) libusb write timeout
-7, while the host's endpoint 0x81 bulk-IN polling loop and USB device enumeration remained active. This suggests a targeted next host recovery approach: when endpoint 3 write fails, coordinate the host's async and main threads to quiesce transfers, safely release/close the interface, then reopen it without forcibly resetting the whole USB device. The current host uses an unsynchronized globalusbhdrin both threads; it must not close a handle while the other thread has a transfer in flight.Evidence stored locally under
~/Downloads/psplinkusb-issue74-freeze2-20261024/: before/after IORegistry snapshots, host logs, test output, host thread samples, power events. Host diagnostic branch has a local uncommitted-Nswitch; this experimental change is not included in PR #72.Recover stalled async USB commands with synchronized device reconnect
fjtrujy commentedon Oct 24, 2026
Candidate automatic recovery implemented and validated with fault injection (2026-10-25)
Investigative branch:
investigate/usb-sleep-wake-issue74, commit2187e26(not part of PR #72).Mechanism
0x03write fails or transfers fewer bytes than requested (the real hang reportedLIBUSB_ERROR_TIMEOUT,-7), the async thread requests recovery and stops admitting new writers.Critical experiment: why no-reset recovery was rejected
A special debug build injecting a one-shot endpoint-3
LIBUSB_ERROR_TIMEOUTwas run on a physical PSP. Attempting automatic interface release/reclaim without a reset produced a persistent HELLO/reconnection loop:pspshstill timed out. This differed from our earlier SIGKILL/new-process recovery, emphasizing that host process termination and graceful interface release are not equivalent at the USB-pipe level. A known-good installed host daemon restored the PSP connection without rebooting the console.With a coordinated USB device reset enabled for async failure, the same injected timeout was detected, a new PSP USB session was enumerated, the daemon reconnected automatically, and 120/120 subsequent real-PSP commands passed (6.35 seconds, p95 77 ms, max 85 ms). The originally injected command was lost, as expected.
The production (non-injected) branch binary was then launched (host PID 82343, launched from the local repository with
-T -v); the fault-injection code is compiled out. Baseline 12/12, followed by 1,000/1,000 real PSP shell/HostFS operations (36.99 s, p95 74 ms, max 96 ms) passed with zero failures. macOS still enumerates the connected PSP, and the daemon remains alive.make -C tests testalso passes, including the new plain-C multi-threaded recovery regression test.Status: automatic recovery from this particular endpoint 3 error is demonstrated; long-term prevention of the originating stall and recovery from a naturally occurring overnight failure are not yet proven. This is not ready to close #74. Leave the connected PSP and diagnostic host running through another normal idle/sleep period, then look for the error/reconnect trace and verify fresh shell and HostFS commands work without a manual restart.
Local diagnostic logs:
~/Downloads/psplinkusb-issue74-auto-recovery-20261025/(contains the failed no-reset test, successful injected-reset test and the 1,000-command normal build run). No machine-private logs uploaded.fjtrujy commentedon Oct 25, 2026
Third overnight reproduction: endpoint 3 write succeeds, but PSP shell is silent (2026-10-25, 13:28–13:30 CET)
This is a distinct failure mode from the earlier endpoint-3 USB write timeout, and explains why the automatic recovery candidate at
2187e26did not recover this session.pspshhanging after the Mac's overnight sleep/wake cycles. macOSpmsetlogs many sleep/DarkWake events and a human wake at 13:28:02 CET.transferred=14) at 13:28:20 CET. A second bounded C echo probe at 13:30:11 CET again showedtransferred=14but no response, timing out after 3 seconds.enumerated=1).select()waiting for local TCP activity.Implication: We need either PSP-side visibility into async endpoint-3 request-completion/rearm and shell dispatch, or a host-side liveness/after-sleep policy, not only an endpoint error trigger. The macOS sleep-causation hypothesis remains plausible but is not yet proven. Blindly replaying a command after a USB write reported success is unsafe (it might have been executed without a response).
Full diagnostic snapshots captured before any recovery locally at
~/Downloads/psplinkusb-issue74-freeze3-20261025/including USB IORegistry, daemon samples, power history, trace and bounded C failure. No daemon or PSP restart at time of this note.fjtrujy commentedon Oct 25, 2026
Candidate wake-triggered recovery after third confirmed overnight hang (2026-10-25)
Third natural failure: original daemon PID 82343 was running for 14h 13m after the previous endpoint-error-only fix.
pspshcould not obtain shell output, yet the Mac accepted the local TCP command and successfully transmitted a 14-byte frame over USB bulk OUT endpoint0x03(transferred=14) at 13:28:20 CET and on another bounded C probe at 13:30:11 CET. The PSP did not respond. Bulk-IN endpoint0x81continued its idle read timeout loop and the device remained enumerated under USB session719306001058. No short-write/error occurred, so the existing endpoint-error auto-recovery was never invoked.pmsetshows repeated sleep/DarkWake cycles immediately preceding the wake at 13:28:02 CET. Root cause still not proven.Preserved failure-state process/thread samples, USB IORegistry, log snapshots and power history before any reset in
~/Downloads/psplinkusb-issue74-freeze3-20261025/.New opt-in host recovery candidate: commit
f254e16on branchinvestigate/usb-sleep-wake-issue74adds macOS-W. It compares clocks that include and exclude time spent in system sleep. On waking from >5 seconds of sleep, the main thread quiesces async USB I/O and resets/reconnects the USB device even if endpoint-3 writes previously succeeded. This avoids guessing whether a command with a successful transfer actually executed, and does not auto-replay commands.-Wis mutually exclusive with-N(no device reset). The endpoint-error recovery remains in place.Validation: all 4 native-C offline tests pass (new sleep-gap unit test included). A build with test-only synthetic 120-second wake injection auto-reset/reconnected and passed 120/120 real-PSP commands (p95 76ms, max 91ms). The normal non-injected experimental build then passed 12/12 + 1,000/1,000 real-PSP commands (1000 operations: p95 77ms, max 91ms). PSPLinkUSB on the console was not rebooted.
Active test: non-injected host daemon PID 19673, running locally from the investigation branch with
-T -W -v. Do not confuse this with installation of a permanent toolchain binary or merging into PR #72; neither happened.Limits:
-Wis experimental. It also reacts to overnight DarkWake, so repeated reset/re-enumeration churn is possible; inspect the trace for frequency. Need a real macOS sleep/wake and follow-up shell/HostFS verification, then extended soak. Sleep causation and PSP endpoint callback/request state remain open. #74 must remain open until naturally occurring recovery is validated.fjtrujy commentedon Oct 25, 2026
First real macOS sleep/wake validation of experimental
-Wrecovery — 2026-10-25The reporter manually put macOS to sleep and woke it, leaving the PSP with PSPLinkUSB running and the cable untouched. The existing experimental host daemon continued running as PID 19673 (
usbhostfs_pc -T -W -v); it was not manually restarted.macOS power logs confirm software sleep and subsequent wake at approximately 13:51–13:52 CET. The host logged:
The
9.2svalue is the delta observed by the continuous-vs-awake clock comparison; it is not necessarily the full wall-clock interval that the machine spent in sleep/DarkWake.Physical PSP post-wake results:
wake-triggered reconnectwas logged in this session so far. No repeated reset loop, async transfer errors or manual PSP restart during validation.Interpretation:
-Wnow has successful real sleep/wake validation in addition to the injected-wake and endpoint-timeout tests. This is a promising workaround, but still not evidence that sleep causes every observed hang or that the PSP async endpoint issue has been corrected. Extended unattended sleep/DarkWake soak and fresh post-idle shell tests remain necessary. Issue #74 should remain open.Branch:
investigate/usb-sleep-wake-issue74@f254e16. Private diagnostic snapshots saved locally under~/Downloads/psplinkusb-issue74-wake-recovery-20261025/real-sleep-20261025/.fjtrujy commentedon Oct 26, 2026
First successful overnight soak with the opt-in macOS
-Wworkaround (2026-10-26, 07:53 CET)The reporter left a real PSP running PSPLinkUSB and the non-injected experimental
usbhostfs_pc -T -W -vdaemon overnight.pspshremained connected and responsive the next morning. I independently confirmed:bulk-IN error=-1 (LIBUSB_ERROR_IO)events that reconnected successfully. Zero async endpoint-3 write failures and no repeated reconnect loops in this period.Assessment: This is the first successful real overnight result for our workaround, strengthening the case for sleep-related USB session state as a contributing factor. It still does not prove the root cause or that the connection would otherwise have failed during the same overnight period.
Production concern: 28 full USB resets over approximately 18 hours is too eager; most were on maintenance DarkWake, when no user interaction was required. The next refinement should avoid unnecessary resets, e.g. distinguish interactive wake from maintenance wake or add an explicit safe liveness handshake with the PSP before resetting. Please do not close issue #74 or enable
-Wby default yet.Documentation committed to investigation branch as
9a0534a; private snapshots on the reporter's Mac under~/Downloads/psplinkusb-issue74-wake-recovery-20261025/overnight-20261026/. PSP session is currently left running with-Wunchanged for observation.fjtrujy commentedon Oct 27, 2026
Second consecutive overnight: responsive after 43h 32m without host/PSP restart (2026-10-27, 09:11 CET)
The reporter again confirmed
pspshremained connected following an overnight sleep period. Independently verified on physical hardware:usbhostfs_pc -T -W -vPID 19673, started 2026-10-25 at 13:40 CET, has now run 43h 32m without process restart. The connected Sony PSP USB device is still enumerated, exclusively owned by this daemon; RSS around 7.4 MiB.bulk-INLIBUSB_ERROR_IOread errors that the host reconnected after; 0 endpoint-3 async write failures. The bulk-IN errors warrant attention but did not make the link unavailable. macOS power logs corroborate repeated overnight maintenance DarkWake events, with a wake-triggered reset at 07:54 CET on October 27.This is two consecutive overnight stability successes for the opt-in
-Whost workaround, but it is not evidence that the originating failure is prevented or its precise root cause is identified. 50 full USB resets over ~43h is excessively aggressive for default behavior. A conservative follow-up should reduce maintenance DarkWake resets by checking application-level PSP liveness before resetting, taking care not to replay commands that may already have executed.Updated investigation docs in commit
ede1228on branchinvestigate/usb-sleep-wake-issue74; captured private logs and state under~/Downloads/psplinkusb-issue74-wake-recovery-20261025/overnight-20261027/. Issue remains open pending a less intrusive reliable recovery design.fjtrujy commentedon Oct 30, 2026
Fourth physical hang reproduced — installed host WITHOUT
-W(2026-10-30)The reporter noticed
pspshhanging again. I captured the live frozen state before any reset:usbhostfs_pcPID 6771 had run for 22h 16m since October 29, 12:36 CET. Unlike the preceding successful overnight trials, it was the installed PSP toolchain binary (.../pspdev/bin/usbhostfs_pc) built October 23, launched without-Wand without diagnostic-T. The installed binary has neither option. This was not the experimental wake-recovery daemon.pspshecho with no output. Host thread samples before and after the test show the main thread polling libusb bulk-IN and async thread waiting inselect. As the installed binary lacks-T, endpoint-3 transfer status was not observable in this reproduction.~/Downloads/psplinkusb-issue74-freeze4-20261030/before stopping the host.Restoration: gracefully stopped PID 6771, rebuilt and launched the non-fault-injected experimental branch daemon as PID 19610, with
-T -W -v, without overwriting the installed toolchain binary or rebooting/unplugging the PSP. USB re-enumerated under session 3738831471722, and the native PSP hardware test passed 12/12 then 120/120 commands (120 commands in 3.00s, p95 55ms, max 56ms). PID 19610 remains running for soak.Interpretation: This is a further reproduction of the long-idle failure without the wake workaround, not a failure of that workaround. The PSP-side async PR #76 is still open and was not deployed, so this occurrence does not test it. The actual USB-level root cause remains unresolved; recovery by reconnect is confirmed. The high rate of wake-triggered resets remains a concern for production. Investigation branch documentation updated in
4241fb2. Keep #74 open.fjtrujy commentedon Oct 30, 2026
Fifth incident — PSP disappears from macOS USB while
-T -Wrecovery host is running (2026-10-30)At 23:38 CET, the reporter found
pspshunresponsive again. Captured the failure before any cable, PSP or host restart.usbhostfs_pc -T -W -vis still PID 19610, ~12h 44m uptime since 10:54. Its TCP shell sockets are listening, but Sony PSP is completely absent from IOUSB/IORegistry (not merely inaccessible). No USB exclusive owner is listed for the PSP. Native C shell/HostFS probe fails the first command.LIBUSB_ERROR_IObulk-IN failures at 10:55:44 and 12:34:26. A third at 13:12:52 was fatal to the host's USB session:Connected to deviceafter the third failure, nowake-triggered reconnect, and no async endpoint-3 transfer failures logged for this session. Mac sleep/DarkWake events around 22:23 onward happened many hours after USB disappeared.wait_for_device()(not deadlocked), async TCP server thread inselect.-Wonly runs the wake detector while attached; it cannot recover an absent physical USB device.close_device()path callslibusb_reset_device(). It is not established whether that host reset left PSP USB unenumerated, the PSP firmware/USB driver stopped, or a power/cable/port event occurred. We need to inspect the powered-on PSP and USB cable status before concluding cause.No restart performed. Diagnostic IORegistry, full host trace, process thread samples and bounded smoke result are at
~/Downloads/psplinkusb-issue74-freeze5-20261030/. Investigation docs committed/pushed as5863217. Keep issue open; next experiment is observe PSP screen/USB physical status, then controlled cable or driver reconnect while leaving the host waiting for device. We should also recordlibusb_reset_devicereturn values/USB enumeration transitions in future builds.fjtrujy commentedon Oct 31, 2026
Correction to the October 31 "again hanging" report
The reporter has clarified that PSPLinkUSB was not connected at the time of the October 31 check. Therefore, the October 31 observation that macOS could not enumerate the PSP, and that the host daemon was waiting in
wait_for_device(), was expected and must not be counted as a new confirmed long-idle hang.No USB or daemon reset was performed during that check. The trace still contains the October 30 13:12:52
LIBUSB_ERROR_IOand subsequent lack of enumeration, but because the precise connection/disconnection timing has not been established, that earlier event cannot be confidently attributed to a software hang or to host-triggered USB reset. Keep the saved diagnostics as historical observations, but treat the cause of that earlier disappearance as unconfirmed until reproduced while PSPLinkUSB is definitely running and physically connected.For further validation, ensure the PSP is running PSPLinkUSB and the cable is attached, and verify successful
pspshcommands before beginning any long-idle soak.