From owner-freebsd-hackers@freebsd.org Sat Aug 25 20:45:03 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 043271095F18 for ; Sat, 25 Aug 2018 20:45:03 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D89281AFB for ; Sat, 25 Aug 2018 20:45:02 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w7PKir1e017756 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 25 Aug 2018 22:44:53 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: dcrosstech@gmail.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w7PKimRf051560 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 26 Aug 2018 03:44:48 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: Weird USB DA behavior To: David Cross , FreeBSD Hackers References: <20180825010023.GD45503@funkthat.com> <20180825052330.GE45503@funkthat.com> From: Eugene Grosbein Message-ID: <83388164-39c8-14e7-d0e7-304cbfdcb796@grosbein.net> Date: Sun, 26 Aug 2018 03:44:43 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM,SPF_PASS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -0.0 SPF_PASS SPF: sender matches SPF record * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2018 20:45:03 -0000 26.08.2018 3:22, David Cross wrote: > I turned debugging ALL the way up on geli (3) and noticed the hangs always > happened when geli handed off a 20480 length read to the layer below (in > this case mirror).. I used the rebugging output to create a dummy program > called 'pread' to try to simulate these failures, and I was quite > successful. Attached is 'pread.c' which takes on stdin a offset and a > length to read. In that version I overwrote it to always ask for 32k., and > that works every time. If I eliminate that line and let the input data > control it, on some of the 20480 (and a different set each time) it hangs, > after the hang the pread returns _0_ (and obviously no errno), no kernel > logs. "pread" is run directly against /dev/da0, so no mirror or geli > layers at this point. The lists strips non-textual attachments, so requestdata.txt get passed but pread.c was stripped from the message. You need to re-send it changing name to something like pread.c.txt