From owner-freebsd-arm@freebsd.org Mon Feb 20 23:09:37 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDC38CE60FF for ; Mon, 20 Feb 2017 23:09:37 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98C9DB18 for ; Mon, 20 Feb 2017 23:09:37 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-it0-x233.google.com with SMTP id 203so26405452ith.0 for ; Mon, 20 Feb 2017 15:09:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oqPsKj3yPJiUhYbYe8YxmIH64xar2Mx891ycKsUN0g0=; b=sgwROD/M8DMIWGS9W7hhDKVEQy5H5aDonx6J2w4azHCHPb2XSPPCDGOp0MrTFzG8Ja Hf/m90uBIMDPkNAzByGbHVCcOVxMhug1YG77h3BfgVB8+d1ii7lP4EkAmQVhAYWump2Z SzzPtFeQAeWACvRgJWqaLEqKYl7InEMzJlQif6/CCvzefXcZPuDpipOdDs4EZcyz0/kR tngs0ihuhUeFkPC77YpSe5wYpoPmDfRxWmBjXKpWbGtWzaIGeycut+tMNQ2v+KbV3zsN 9Zz4EU51vJorL7/UdFYFnAU8y3E3IsgLfcLj8TOzESxhTFAI4Aumz88AYVzV3pRrF03D RXRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oqPsKj3yPJiUhYbYe8YxmIH64xar2Mx891ycKsUN0g0=; b=oA1LMDTNd+Drl4oOQwPsoWoxgls5bK0agbswkNIUXao0966kSI61qevkcsyTYyD+jp rp6Suqch+YlFnQVonbg91GCrRedfp/QfsULwwRzxsWjTPugKptyTYm9SdPY4yScuqifr BWpUKKznNXl4bYekwhkrVoUHd2SdQ2Gt9njP85QSaWlNyV3sAQdpSQ8gix0swgOH2oco j2Q9d2E92rye5ZciM5AaMIqFFyOXcY3Bja28+8d+AC9ptW0cXtQVHf/XTA0j9WkOxJ7S bxf+IiAX27/pUQ9Et7XdK85SkI5L20G/X6wbEFDDRxQT98wiCeQqtQnbXq6WzuQ1+B8r O+fQ== X-Gm-Message-State: AMke39nnpzvydV/xPhlEAYw2PAJPClyuycZNCDBPPgoRbyOX7sneTjMRDl7UMn2SOsTWOskrR2M+BCprP/5/OQ== X-Received: by 10.36.70.145 with SMTP id j139mr11308670itb.111.1487632176748; Mon, 20 Feb 2017 15:09:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Mon, 20 Feb 2017 15:09:36 -0800 (PST) In-Reply-To: <155401d28ba9$ccdc28c0$66947a40$@tndh.net> References: <155401d28ba9$ccdc28c0$66947a40$@tndh.net> From: Svatopluk Kraus Date: Tue, 21 Feb 2017 00:09:36 +0100 Message-ID: Subject: Re: Fatal kernel abort (was: r313878M builds mmcsd0s2 as read-only & /etc/fstab is missing) To: Tony Hain Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2017 23:09:37 -0000 Recently, there is some work on locking functions on current. It looks that there were corrupted between r313855 and r313996 for arm. And you are running r313878. Svata On Mon, Feb 20, 2017 at 7:47 PM, Tony Hain wrote: > Update: >> >> FreeBSD 12.0-CURRENT #0 r313878M: Fri Feb 17 11:26:27 PST 2017 >> >> >> U-Boot SPL 2017.01-rc3 (Jan 31 2017 - 08:26:19) Trying to boot from >> MMC1MMC partition switch failed >> *** Warning - MMC partition switch failed, using default environment >> >> reading u-boot.img >> reading u-boot.img >> >> >> U-Boot 2017.01-rc3 (Jan 31 2017 - 08:26:19 +0000) >> >> CPU : AM335X-GP rev 2.1 >> I2C: ready >> DRAM: 512 MiB >> MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 >> *** Warning - bad CRC, using default environment >> >> not set. Validating first E-fuse MAC >> Net: cpsw, usb_ether >> Press SPACE to abort autoboot in 2 seconds switch to partitions #0, OK >> mmc0 is current device >> SD/MMC found on device 0 >> reading boot.scr >> ** Unable to read file boot.scr ** >> reading uEnv.txt >> 0 bytes read in 3 ms (0 Bytes/s) >> Loaded env from uEnv.txt >> Importing environment from mmc0 ... >> switch to partitions #0, OK >> mmc0 is current device >> Scanning mmc 0:1... >> Found FreeBSD U-Boot Loader (bin) >> reading ubldr.bin >> 231544 bytes read in 20 ms (11 MiB/s) >> ## Starting application at 0x82000000 ... >> Consoles: U-Boot console >> Compatible U-Boot API signature found @0x9df30c58 >> >> FreeBSD/armv6 U-Boot loader, Revision 1.2 (Fri Feb 17 11:26:35 PST 2017 >> tony@) >> >> DRAM: 512MB >> Number of U-Boot devices: 3 >> U-Boot env: loaderdev not set, will probe all devices. >> Found U-Boot device: disk >> Probing all disk devices... >> Checking unit=0 slice= partition=... good. >> Booting from disk0s2a: >> /boot/kernel/kernel data=0x6097e8+0x1a2818 >> syms=[0x4+0x89ba0+0x4+0x9e2fb] >> >> Hit [Enter] to boot immediately, or any other key for command prompt. >> Booting [/boot/kernel/kernel]... >> /boot/dtb/am335x-bonegreen.dtb size=0x8219 Loaded DTB from file >> 'am335x-bonegreen.dtb'. >> Kernel entry at 0x82200100... >> Kernel args: (null) >> ARM Debug Architecture not supported >> KDB: debugger backends: ddb >> KDB: current backend: ddb >> Copyright (c) 1992-2017 The FreeBSD Project. >> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 >> The Regents of the University of California. All rights reserved. >> FreeBSD is a registered trademark of The FreeBSD Foundation. >> FreeBSD 12.0-CURRENT #0 r313878M: Fri Feb 17 11:26:27 PST 2017 ... >> Trying to mount root from ufs:mmcsd0s2 []... >> warning: no time-of-day clock registered, system time will not be set >> accurately Growing root partition to fill device >> GEOM_PART: mmcsd0s2 was automatically resized. >> Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` to >> revert them. >> gpart: Read-only file system >> growfs: /dev/mmcsd0s2: Operation not permitted >> /etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, >> generating a new one Setting hostuuid: 696c1f73-f547-11e6-91d8- >> 884aeaf5a20e. >> Setting hostid: 0xfd5e4d57. >> eval: cannot open /etc/fstab: No such file or directory No suitable dump >> device was found. >> eval: cannot open /etc/fstab: No such file or directory >> fstab: /etc/fstab:0: No such file or directory Warning! No /etc/fstab: > skipping >> disk checks. >> fstab: /etc/fstab:0: No such file or directory >> mount: mmcsd0s2: Operation not permitted Mounting root filesystem rw >> failed, startup aborted >> ERROR: ABORTING BOOT (sending SIGTERM to parent)! >> Feb 17 19:29:34 init: /bin/sh on /etc/rc terminated abnormally, going to > single >> user mode Enter full pathname of shell or RETURN for /bin/sh: >> # random: unblocking device. >> # mount >> mmcsd0s2 on / (ufs, local, read-only, nfsv4acls) devfs on /dev (devfs, > local) # >> # df >> Filesystem 512-blocks Used Avail Capacity Mounted on >> mmcsd0s2 1826232 1726488 -46352 103% / >> devfs 2 2 0 100% /dev >> # gpart list mmcsd0 >> Geom name: mmcsd0 >> modified: false >> state: OK >> fwheads: 255 >> fwsectors: 63 >> last: 62333951 >> first: 63 >> entries: 4 >> scheme: MBR >> Providers: >> 1. Name: mmcsd0s1 >> Mediasize: 33546240 (32M) >> Sectorsize: 512 >> Stripesize: 4194304 >> Stripeoffset: 32256 >> Mode: r0w0e0 >> attrib: active >> rawtype: 12 >> length: 33546240 >> offset: 32256 >> type: !12 >> index: 1 >> end: 65582 >> start: 63 >> 2. Name: mmcsd0s2 >> Mediasize: 31880380416 (30G) >> Sectorsize: 512 >> Stripesize: 4194304 >> Stripeoffset: 524288 >> Mode: r2w1e1 >> rawtype: 165 >> length: 31880380416 >> offset: 34078720 >> type: freebsd >> index: 2 >> end: 62332927 >> start: 66560 >> Consumers: >> 1. Name: mmcsd0 >> Mediasize: 31914983424 (30G) >> Sectorsize: 512 >> Stripesize: 4194304 >> Stripeoffset: 0 >> Mode: r2w1e2 >> >> # >> >> > > After adding fstab manually, mounting mmcsd0s1 caused a kernel fault: > ... > Starting file system checks: > /dev/mmcsd0s2: NO WRITE ACCESS > /dev/mmcsd0s2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. > Automatic file system check failed; help! > ERROR: ABORTING BOOT (sending SIGTERM to parent)! > Feb 18 07:16:52 init: /bin/sh on /etc/rc terminated abnormally, going to > single user mode > Enter full pathname of shell or RETURN for /bin/sh: random: unblocking > device. > # > # mount > mmcsd0s2 on / (ufs, local, read-only, nfsv4acls) > devfs on /dev (devfs, local) > # cat /etc/fstab > # Custom /etc/fstab for FreeBSD embedded images > /dev/ufs/rootfs / ufs rw 1 1 > > # mount -t msdosfs /dev/mmcsd0s1 /boot/msdos > g_vfs_done():mmcsd0s1[WRITE(offset=512, length=4096)]error = 30 > g_vfs_done():mmcsd0s1[WRITE(offset=512, length=4096)]error = 30 > g_vfs_done():mmcsd0s1[WRITE(offset=512, length=4096)]error = 30 > fsync: giving up on dirty 0xc305c7e0: tag devfs, type VCHR > usecount 1, writecount 0, refcount 7 mountedhere 0xc2f72a00 > flags (VI_ACTIVE) > v_object 0xc3026780 ref 0 pages 5 cleanbuf 4 dirtybuf 1 > lock type devfs: UNLOCKED > dev mmcsd0s1 > mount_msdosfs: /dev/mmcsd0s1: Read-only file system > # ls /boot/msdos > # Fatal kernel mode data abort: 'Translation Fault (L1)' on read > trapframe: 0xdce54c30 > FSR=00000005, FAR=2e776f7c, spsr=60000013 > r0 =00000004, r1 =00000000, r2 =c06e4aa1, r3 =000000ad > r4 =2e776f6c, r5 =c06e4aa1, r6 =2e776f7c, r7 =00000000 > r8 =000000ad, r9 =c06fe8a2, r10=2e776f7c, r11=dce54ce8 > r12=c0950ab8, ssp=dce54cc0, slr=c033ffb0, pc =c0398e50 > > [ thread pid 21 tid 100057 ] > Stopped at __mtx_lock_flags+0x44: ldr r0, [r10] > db> > db> show geom > class: DISK (0xc07d3f48) > geom: mmcsd1 (0xc2a81d00), rank=1 > provider: mmcsd1 (0xc2a81c80), access=r0w0e0, flags= (0x0020) > consumer: 0xc2f8e340 (mmcsd1), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8e380 (mmcsd1), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8e440 (mmcsd1), access=r0w0e0, flags=0x0030 > geom: mmcsd0 (0xc2a7f680), rank=1 > provider: mmcsd0 (0xc2a7f700), access=r2w1e2, flags= (0x0020) > consumer: 0xc2f8f1c0 (mmcsd0), access=r0w0e0, flags=0x0030 > consumer: 0xc2710080 (mmcsd0), access=r2w1e2, flags=0x0030 > > class: PART (0xc07d4f28) > geom: diskid/DISK-01CCEE1C (0xc2a81b00), rank=3 > provider: diskid/DISK-01CCEE1Cs1 (0xc2a81700), access=r0w0e0, flags= > (0x0030) > consumer: 0xc2f8e080 (diskid/DISK-01CCEE1Cs1), access=r0w0e0, > flags=0x0030 > consumer: 0xc2f8e240 (diskid/DISK-01CCEE1C), access=r0w0e0, flags=0x0030 > geom: mmcsd1 (0xc2cb9680), rank=2 > provider: mmcsd1s1 (0xc2a81b80), access=r0w0e0, flags= (0x0030) > consumer: 0xc2f8e280 (mmcsd1s1), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8e2c0 (mmcsd1s1), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8e440 (mmcsd1), access=r0w0e0, flags=0x0030 > geom: mmcsd0s2 (0xc2a7f880), rank=3 > provider: mmcsd0s2a (0xc2cba080), access=r0w0e0, flags= (0x0030) > consumer: 0xc2f8ecc0 (mmcsd0s2a), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8f0c0 (mmcsd0s2), access=r1w1e1, flags=0x0030 > geom: mmcsd0 (0xc2a7f580), rank=2 > provider: mmcsd0s2 (0xc2a7f900), access=r2w1e1, flags= (0x0030) > consumer: 0xc2f8e040 (mmcsd0s2), access=r1w0e0, flags=0x0030 > consumer: 0xc2f8ef00 (mmcsd0s2), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8f0c0 (mmcsd0s2), access=r1w1e1, flags=0x0030 > provider: mmcsd0s1 (0xc2a7f800), access=r0w0e0, flags= (0x0030) > consumer: 0xc2f8ed40 (mmcsd0s1), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8f100 (mmcsd0s1), access=r0w0e0, flags=0x0030 > consumer: 0xc2710080 (mmcsd0), access=r2w1e2, flags=0x0030 > > class: LABEL (0xc07d4638) > geom: mmcsd0s1 (0xc303ed80), rank=3 > provider: msdosfs/BOOT (0xc2cba300), access=r0w0e0, flags= (0x0030) > consumer: 0xc2f8f140 (msdosfs/BOOT), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8ed40 (mmcsd0s1), access=r0w0e0, flags=0x0030 > geom: mmcsd1s1 (0xc2a81880), rank=3 > provider: ext2fs/BOOT (0xc2a81800), access=r0w0e0, flags= (0x0030) > consumer: 0xc2f8e100 (ext2fs/BOOT), access=r0w0e0, flags=0x0030 > consumer: 0xc2f8e2c0 (mmcsd1s1), access=r0w0e0, flags=0x0030 > geom: mmcsd1 (0xc2a81a00), rank=2 > provider: diskid/DISK-01CCEE1C (0xc2a81980), access=r0w0e0, flags= > (0x0030) > consumer: 0xc2f8e180 (diskid/DISK-01CCEE1C), access=r0w0e0, > flags=0x0030 > consumer: 0xc2f8e240 (diskid/DISK-01CCEE1C), access=r0w0e0, > flags=0x0030 > consumer: 0xc2f8e380 (mmcsd1), access=r0w0e0, flags=0x0030 > > class: VFS (0xc07d4518) > geom: ffs.mmcsd0s2 (0xc2a81580), rank=3 > consumer: 0xc2f8e040 (mmcsd0s2), access=r1w0e0, flags=0x0030 > > class: DEV (0xc07d3d68) > geom: msdosfs/BOOT (0xc2cba200), rank=4 > consumer: 0xc2f8f140 (msdosfs/BOOT), access=r0w0e0, flags=0x0030 > geom: diskid/DISK-01CCEE1Cs1 (0xc2a81780), rank=4 > consumer: 0xc2f8e080 (diskid/DISK-01CCEE1Cs1), access=r0w0e0, > flags=0x0030 > geom: ext2fs/BOOT (0xc2a81900), rank=4 > consumer: 0xc2f8e100 (ext2fs/BOOT), access=r0w0e0, flags=0x0030 > geom: diskid/DISK-01CCEE1C (0xc2a81600), rank=3 > consumer: 0xc2f8e180 (diskid/DISK-01CCEE1C), access=r0w0e0, flags=0x0030 > geom: mmcsd1s1 (0xc2a81c00), rank=3 > consumer: 0xc2f8e280 (mmcsd1s1), access=r0w0e0, flags=0x0030 > geom: mmcsd1 (0xc2a81a80), rank=2 > consumer: 0xc2f8e340 (mmcsd1), access=r0w0e0, flags=0x0030 > geom: mmcsd0s2a (0xc2cba180), rank=4 > consumer: 0xc2f8ecc0 (mmcsd0s2a), access=r0w0e0, flags=0x0030 > geom: mmcsd0s2 (0xc2cb9f00), rank=3 > consumer: 0xc2f8ef00 (mmcsd0s2), access=r0w0e0, flags=0x0030 > geom: mmcsd0s1 (0xc2a7f780), rank=3 > consumer: 0xc2f8f100 (mmcsd0s1), access=r0w0e0, flags=0x0030 > geom: mmcsd0 (0xc2cba480), rank=2 > consumer: 0xc2f8f1c0 (mmcsd0), access=r0w0e0, flags=0x0030 > > class: MD (0xc07c2340) > > class: SWAP (0xc07fe538) > > db> > > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"