From owner-freebsd-arm@FreeBSD.ORG Fri Oct 25 20:37:13 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 870CE7A8 for ; Fri, 25 Oct 2013 20:37:13 +0000 (UTC) (envelope-from ssl.qlt@gmail.com) Received: from mail-ea0-x242.google.com (mail-ea0-x242.google.com [IPv6:2a00:1450:4013:c01::242]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 22F812F7D for ; Fri, 25 Oct 2013 20:37:12 +0000 (UTC) Received: by mail-ea0-f194.google.com with SMTP id q16so314068ead.5 for ; Fri, 25 Oct 2013 13:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=kK563GcOCZ6V+D5oMuL7yS8e2cMSWzGZMSu8c9zJ4qQ=; b=VLv56gmKKWm+gQYJrGE5OhCx84d2COuRN3fUhPZ0rS01NrLdHEjfDs1ugYZhvaKKCw p6mHHl4wwIcK6qUkX9USA4fLMooMZoHT/OcMJ1GXofiholA24x+9vR9/Ft16zmCb0L3r yHmOrET84sCoLT8Cgb0Qyxyw9ukEG0tGm4vwzY3M40hNx4dr0ZK990qJrhEWePwIl5lm Ib4ag7YnaaKC0iRS0SJmJuX0dRteH/K1g0sPPQcl5ZajnELX/y1anINfJX2D3fL1uFad Fu0CsP/n82JhYalpeOsWZzQi6Y3idGGRUQRQSdwAwunUoyB/GAt2RGx0hvZ08MDeJezS ygtA== MIME-Version: 1.0 X-Received: by 10.204.247.71 with SMTP id mb7mr3673003bkb.7.1382733431387; Fri, 25 Oct 2013 13:37:11 -0700 (PDT) Received: by 10.204.231.209 with HTTP; Fri, 25 Oct 2013 13:37:11 -0700 (PDT) Date: Fri, 25 Oct 2013 13:37:11 -0700 Message-ID: Subject: Dreamplug stable/10 usb - sd file transfer corruption error - cache related? From: Steven Lee To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 20:37:13 -0000 Hello, In the process of upgrading my Dreamplug from the stable/9 branch to the stable/10 branch, I have run into a fairly significant file corruption problem. The steps that create this problem are as follows: 1. Cross-compile the kernel and buildworld from the stable/10 branch on a separate host. 2. Install the kernel and installworld on a usb stick drive 3. Boot the Dreamplug from the usb drive There are no problems that show up to this point, the Dreamplug boots with no errors. 4. Copy the kernel from the usb drive to the internal sd card 5. Copy the root filesystem from the usb drive to the internal sd card using (dump | restore) It is at step 5 that the error manifests itself, as I found that approximately 20 shell scripts in the /etc/rc.d directory had been randomly corrupted with strings of null characters (in groups of 32). I assume that the rest of the file system was compromised in a similar fashion. The bug is repeatable, however the corruption is somewhat random, so each time different files are corrupted in different places. When I followed the exact same steps from the stable/9 branch, the problem did not occur, so there is clearly some type of regression error between the 9 and 10 branches. After searching through the arm mailing list, I attempted to work around the problem by: - mounting the file systems with -o noclusterr -o noclusterrw - mounting the file systems with -o sync - as per comments on bug arm/158950, attempted to modify the pmap.c functions to change the cache from write-back mode to write-through mode but all of these attempts were ineffective. Given that I am relatively new to FreeBSD, I was hoping to get any insights as to any next steps that might make sense in terms of either working around the problem, narrowing down the bug, or any obvious rookie mistakes I am making before I give up and revert back to the 9 branch. Thanks for your help! Regards, Steve