From owner-freebsd-arm@freebsd.org Fri Jun 26 00:52:18 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D3C83495E8 for ; Fri, 26 Jun 2020 00:52:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49tJJ0612Nz3ZPF for ; Fri, 26 Jun 2020 00:52:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: f4QMioQVM1nji5jAfVXTU_J0i14E0Ng6xtM6aHuJExDnlFeIhEKtvX4mxLovO7C sQzPJHIgE3fBS22chKhsrq_3qBiXI0osFmAS805gjuKUjVbVkStIxdVcW.2eMvjVR6TmG7Del.G4 kLelLZe8FjO6oorQGEadPabY2Xpicr3aMWRUrjFaz9v5mHm5pu2jeWft3RsOHz5e5mg8QS5W1J3T f0GkeH_RF8kezu5VyuNCL.zbvxRXyeDSwTtHjflsuX_Fu3MW1WHBVfbkY9y_l0QNMSPCt9rOD3Mh q8pF3Ug9.vERnHJiPw9wYX1zJaRNIZSC3MOgH0dvm27p.S_JOQQamR_dsa.S6hWspEUj3YpaExGQ nD2ZJ17tgtm7JzsvQMpdZNkChH5g3D0i34FByXin4ZCm32dOEL5Oj8I1l8qMpynwrL2R7F3Oc4rj HJNECdP3lBkJNofqrrpivPCj75LsMi2QG9ZkJHCd5KP7YjvIM7.KtMtKKBilg1ge7BFW4dTMZxV0 PCiMpoPiy_N6HJFGF7_yX4HtgPYKEfP7IWJz3ySURn0xa2RA._DpzaUGvUISmSSSHTnHTz9COqSi h7qcLe3iZ5KG2aWWxAcC3HG1sOCRaPeljPIhP4R_4jSxmELqPjdqEb_yV6juZ77b6fSFhyAD5A1M YMKrCXjUDRlsf0F6emXNWSMmQpTiYdfIYGQPbVRhLS1TfkizZMZ9TXRce7U4A_usNg7PtkuZ3bNa zGtIq69.gaXnBw2kjJuTPH0oIegV_iftdP7bp9xy7DpQzh3iCfw3CeQwUxYP7GLeNirvFvKOu_9. n.LQGfmjmMhpdW42A.prMCLzkRORNFkG_N13GEfkJruQIr6VYDOZ6eQlKywMvZa8tIis1aql3xxx reYT4sUZmYrAW6K.5BR7WdZr3ZeMNS70_bUBiuAoIqi02zXoOoEpgHOwwBPJxNO5fhHodtSy7_Us mKYEy3nOe49RqGjYg11nPlnuoAJX3DUxHoRTcnuobUEpWXno8.uQj7aAxrHy6kdaeN8rDJvKC7wh IELJXzYUsjQp504wxvOjNxc.bZdZBYFyfLfaeju7.GUOjr6kTxYoFd3oQghvU8e1.T8z8onID_D4 at8Eyi9rxRmbZMrt8yhXGJQ5IQUoA4YuQEWPN1TwwBoCrcVlSo5Fut7V5bnbWlrNlYQDxGXZ4RiU eMmlj6BEnQZcIosjeB86pPrtz90Ccsxpg7SYV_13Qf3mVqwFOtcDCajdnoeA0MXR80WpS3YLGqoA hx8OROSjEoex9Hy7R6P3QnJGcJe1ZuHdX6xlHDEKfw3Y76t9gNWznCHVcLW8Uvd5IQBk4HBm2Gvm s1ffJHNGMfTnyxo36Hh5xDJEr3m_EB1JrDpgSnkOxdWFiurg3pqztWMAZ6LWlHeEM5Hu7ohs0l.b bub4kR5.q7YPWA4lP_UegTzvhMw1gC925hdcyzz9Vo9s7OijMrgSEajcdDcS3 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Fri, 26 Jun 2020 00:52:14 +0000 Received: by smtp420.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID e0e0c96bbac81e50cb94c24927f7d6e9; Fri, 26 Jun 2020 00:52:13 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: USB [USB3 and USB2] problems when using UEFi v1.16 to boot RPi4: Still produces inaccurate file copies From: Mark Millard In-Reply-To: Date: Thu, 25 Jun 2020 17:52:12 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <476DD0F0-2286-4B2C-8E44-4404AF17F5A8@yahoo.com> To: =?utf-8?Q?Klaus_K=C3=BCchemann?= X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49tJJ0612Nz3ZPF X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.40 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.86)[-0.863]; FREEMAIL_TO(0.00)[googlemail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.03)[-1.031]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.01)[-1.008]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.147:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.147:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 00:52:18 -0000 On 2020-Jun-25, at 15:40, Klaus K=C3=BCchemann wrote: > Am 25.06.2020 um 21:29 schrieb Mark Millard via freebsd-arm = : >> =E2=80=A6 >> . >> The test still failed to produce an accurate file copy >> but the kernel did not report anything either. I'm >> Unsure how get evidence of the context for the bad 4K >> chunks. >>=20 > No clue if it has effects but maybe : dd if=3Dxxx of=3Dxxx bs=3D4k ? Something interesting does result from dd testing, even though doing file copies that way still gets the problem. In fact a couple of interesting points show up. Using dd to copy large files still gets corrupted copies. (Large files are only because the corruptions are not frequent in the files but a sufficiently large file seems to always have some corruption.) Interestingly, dd if=3D/dev/zero based large file generation has produced good files from what I can tell. (Generate separate files and diff them after a reboot.) The problem was originally discovered copying from another machine to a RPi4. But the Ethernet use involved USB in providing data (but not a local USB drive) --while /dev/zero does not involve USB as a data source and copies of data in memory via file content buffering. So the contrasting dd if=3D/dev/zero results may be indicating something. Another interesting point is that the following sequence seems repeatable for step (E)'s resultant property below: A) first do a couple of large dd if=3D/dev/zero file generations B) then do a (non-zero) large file copy (dd based or cp based) C) reboot D) diff the 2 files generated in (A): no differences E) diff the original large file and the temporary copy from (B): there are differences and the temporary copy has zero in every byte that is different. (E) suggests that the bad file copies via cp or via dd are picking up data from the wrong memory pages sometimes, (A) just made large numbers of pages zero, making it more likely a zero page would be used if the wrong page was referenced. An example of checking for (E) was: # diff clang-cortexA53-installworld-poud.tar mmjnk.other=20 Binary files clang-cortexA53-installworld-poud.tar and mmjnk.other = differ # cmp -l clang-cortexA53-installworld-poud.tar mmjnk.other | grep -v " = 0$" | more --More--(END) Note about my example "large file" sizes: -rw-r--r-- 1 root wheel 4011026432 Apr 25 21:04:42 2020 = clang-cortexA53-installworld-poud.tar and I've been mostly using 4 GiByte for the resultant size of large files generated via dd. I have not tried to find a minimum size for reliably getting corrupted file copies. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)