From nobody Sun Feb 06 19:02:19 2022 X-Original-To: freebsd-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 2DA0919A6E33 for ; Sun, 6 Feb 2022 19:02:22 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4JsJYT0YlCz4dbb for ; Sun, 6 Feb 2022 19:02:21 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.1.14] (c-98-249-71-218.hsd1.nm.comcast.net [98.249.71.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 410761AF4F8; Sun, 6 Feb 2022 19:02:20 +0000 (UTC) Message-ID: <60ebd011-c2b8-3524-1476-123f11128ffe@freebsd.org> Date: Sun, 6 Feb 2022 12:02:19 -0700 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: USB Disk Stalls on -current Content-Language: en-US To: Warner Losh Cc: freebsd-current References: <7e8459e4-d708-7750-402c-cda2adf6199f@freebsd.org> From: Sean Bruno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4JsJYT0YlCz4dbb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 199.102.79.106 is neither permitted nor denied by domain of sbruno@freebsd.org) smtp.mailfrom=sbruno@freebsd.org X-Spamd-Result: default: False [-0.78 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[sbruno]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.63)[-0.631]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.992]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_SHORT(0.94)[0.943]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-current]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36236, ipnet:199.102.76.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[98.249.71.218:received] X-ThisMailContainsUnwantedMimeParts: N > > > So there's some tools you can use. For usb, there's usbdump that can > get you the USB transactions. I've not used it enough to give more details > here. This will let you know what's going on, and when, on the USB endpoint. > > You can also enable the CAM_IOSCHED stuff. This will allow you to get > latency > measurements for 'requests in the sim' which basically will tell you > what your > latency spread is for the drives. This will tell you if things are > getting caught > up in the USB layer, or after CAM's da driver completes the I/O request > (granted, that's almost certainly not happening, but it will help you > figure out > what's going on and put numbers to the oddities you are seeing). > > Also, make sure you have good cables. I've had lots of hicupsĀ over the > years from dodgy USB cables. Also make sure you have good, high quality > enclosures. Many from the USB2 time-period are sketchy at best and I > went through several at one point trying to find a good one. I'd be > tempted to > get USB 3 enclosures. I've had better luck with USB3 gear than USB2 gear > here, but you need a USB-3 controller to get USB-3 speeds which might not > be compatible with the NUC's built-in stuff (though my NUC has one USB3 > port, there's lots of different models). > > Usually, though, I see weirdness associated with dmesg messages from > usb, cam, etc when the hardware is on the sketch end. > > Warner I'm assuming that I have a fairly dodgy USB device, as the pauses seem to correspond to this from CAM being emitted: Feb 6 11:56:43 alice kernel: (da0:umass-sim1:1:0:0): READ(10). CDB: 28 00 36 69 02 6e 00 00 80 00 Feb 6 11:56:43 alice kernel: (da0:umass-sim1:1:0:0): CAM status: CCB request completed with an error Feb 6 11:56:43 alice kernel: (da0:umass-sim1:1:0:0): Retrying command, 2 more tries remain Things resume after this is emitted, but there is a substantial (multiple minutes) pause here. I would assume that timeouts would fire much quicker. sean