Skip to content

host_stop() wedges after a UAC device was attached but never opened (S3 host, P4 sound card) #29

Description

@bdbarnett

2026-09-23, S3 Touch on 61ba01c hosting the P4 wearing cdc+uac. A probe started the host with classes=("uac",), listed uac_audio.audio_devices() (one device, one stream, never opened) and called stop():

usbif_host: teardown starting (new devices now declined)
usbif_host: closing cdc / hid / midi / msc / uac
usbif_host: device_close
usbif_host: device_close returned
usbif_host: pre-deregister drain done
usbif_host: deregister -> 0x0
usbif_host: device_free_all -> 0x10c
usbif_host_stop: task DID NOT EXIT -- timed out (marked wedged) after 200 tick(s) (2000 ms)
usbif_host_stop: calling usb_phy_otg_device_mode()
usbif_host_stop: calling tusb_init()

The next host.start() in the same session then fails with OSError: [Errno 5] EIO; a hard reset clears it. device_free_all -> 0x10c is ESP_ERR_NOT_FINISHED: the library still held the device when we asked it to free everything, so the host task never reached its exit. The README's 8-of-8 clean stops were measured with devices that had been opened and closed through a class driver; this is the other path, a device that was only enumerated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions