From owner-freebsd-arm@freebsd.org Thu Feb 11 13:25:30 2021 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 231F85478C4 for ; Thu, 11 Feb 2021 13:25:30 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dby6x6z4Kz3l30 for ; Thu, 11 Feb 2021 13:25:29 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Received: from freebsd2.freebsd.lan (mail.northatlanticmusicsupplies.com [212.237.182.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jsm) by smtp.freebsd.org (Postfix) with ESMTPSA id A9A8726F8C for ; Thu, 11 Feb 2021 13:25:29 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Subject: Re: newfs segfault (was:nvme dma returns EFBIG (27)) From: Jesper Schmitz Mouridsen To: freebsd-arm References: <15cc2f1d-b8e5-5df3-a05a-4f3014074918@FreeBSD.org> <20210210230833.d8ed42bcdf4707ebf0d2aea6@bidouilliste.com> <2AAF8FF6-F4F1-4221-BA88-FBDD5463B84F@yahoo.com> Message-ID: Date: Thu, 11 Feb 2021 14:25:28 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 13:25:30 -0000 On 11.02.2021 14.22, Jesper Schmitz Mouridsen wrote: > On 11.02.2021 04.13, Mark Millard wrote: >> On 2021-Feb-10, at 15:01, Jesper Schmitz Mouridsen > FreeBSD.org> wrote: >> >>> On 10.02.2021 23.08, Emmanuel Vadot wrote: >>>> On Wed, 10 Feb 2021 22:55:27 +0100 >>>> Jesper Schmitz Mouridsen wrote: >>>> >>>>> Hi >>>>> >>>>> I can dd blocks from /dev/nda0p0 but I cannot run newfs. >>>>> >>>>> It prints nvme0: nvme_payload_map: err  27.  and ctrl+t shows it is >>>>> stuck in physwri >>>>> >>>>> https://github.com/freebsd/freebsd-src/blob/a6dc68c0e0f8a24ffaf0b4e78e58141ef7897047/sys/dev/nvme/nvme_qpair.c#L1003 >>>>> >>>>> >>>>> https://github.com/freebsd/freebsd-src/blob/c6c70c074633569447be4bfd2b694a1c294015bd/sys/dev/nvme/nvme_qpair.c#L567 >>>>> >>>>> >>>>> I could format as ext4 under Linux. >>>>> >>>>> Any hints or pointers are welcome. >>>>> >>>>> Thanks >>>>> >>>>> Jesper >>>>   What board ? >>>>   What version of FreeBSD ? >>>>   dmesg ? >>>> >>>>   Any of the above is *always* required for trying to reproduce and >>>> finding bugs. >>>> >>>>   Cheers, >>>> >>> I was on FreeBSD generic 13.0-ALPHA1 on >>> >>> on FreeBSD generic 13.0-ALPHA2 FreeBSD 13.0-ALPHA2 #0 >>> c256201-g02611ef8ee9 >>> >>> newfs /dev/nda0p1v now core dumps. >>> >>> Program terminated with signal SIGSEGV, Segmentation fault. >>> #0  isblock (cp=0x100247f9f >> 0x100247f9f>, h=0, fs=) at >>> /usr/src/sbin/newfs/mkfs.c:1085 >>> 1085    /usr/src/sbin/newfs/mkfs.c: No such file or directory. >>> (gdb) bt >>> #0  isblock (cp=0x100247f9f >> 0x100247f9f>, h=0, fs=) at >>> /usr/src/sbin/newfs/mkfs.c:1085 >>> #1  alloc (size=4096, mode=mode@entry=16893) at >>> /usr/src/sbin/newfs/mkfs.c:1001 >>> #2  0x0000000000215d20 in fsinit (utime=) at >>> /usr/src/sbin/newfs/mkfs.c:948 >>> #3  mkfs (pp=, pp@entry=0x0, fsys=, >>> fsys@entry=0xffffffffee26 "/dev/nda0p1") at >>> /usr/src/sbin/newfs/mkfs.c:611 >>> #4  0x00000000002133ec in main (argc=, >>> argv=) at /usr/src/sbin/newfs/newfs.c:405 >>> >>> It is on my pinebookpro. nvmecontrol devlist >>>   nvme0: KINGSTON SA2000M8250G >>>      nvme0ns1 (238475MB) >> Care to try somehting like . . . >> >> # gdb newfs >> . . . >> Reading symbols from newfs... >> Reading symbols from /usr/lib/debug//sbin/newfs.debug... >> (gdb) start /dev/nda0p1v >> Temporary breakpoint 1 at 0x2129f8: file >> /usr/fbsd/mm-src/sbin/newfs/newfs.c, line 142. >> . . . >> Temporary breakpoint 1, main (argc=1, argv=0xffffffffeb80) at >> /usr/fbsd/mm-src/sbin/newfs/newfs.c:142 >> 142             reserved = 0; >> (gdb) print &disk.d_sbunion.d_fs >> ??? >> (gdb) print (&disk.d_sbunion.d_fs)+1 >> ??? >> >> I'm curious about the ??? figures reports vs. the 0x100247f9f >> in your backtrace. (Not that I'm sure what to do with the >> reported information.) The start causes some libraries to >> load, which is why I indicated to use it. > Below gdb output and nvmecontrol identify nvme0 > > > Type "apropos word" to search for commands related to "word"... > > Reading symbols from newfs... > Reading symbols from /usr/lib/debug//sbin/newfs.debug... > (gdb) b newfs.c:142 > Breakpoint 1 at 0x2129d8: file /usr/src/sbin/newfs/newfs.c, line 142. > (gdb) c > The program is not being run. > (gdb) start /dev/nda0p1 > Temporary breakpoint 2 at 0x2129d8: file /usr/src/sbin/newfs/newfs.c, > line 142. > Starting program: /sbin/newfs /dev/nda0p1 > > Breakpoint 1, main (argc=2, argv=0xffffffffea60) >     at /usr/src/sbin/newfs/newfs.c:142 > warning: Source file is more recent than executable. > 142             reserved = 0; > (gdb)  print &disk.d_sbunion.d_fs > $1 = (struct fs *) 0x237fa0 > (gdb) print (&disk.d_sbunion.d_fs)+1 > > $2 = (struct fs *) 0x238500 > > nvmecontrol identify nvme0 > Controller Capabilities/Features > ================================ > Vendor ID:                   2646 > Subsystem Vendor ID:         2646 > Serial Number: > Model Number:                KINGSTON SA2000M8250G > Firmware Version:            S5Z42105 > Recommended Arb Burst:       6 > IEEE OUI Identifier:         b7 26 00 > Multi-Path I/O Capabilities: Not Supported > Max Data Transfer Size:      131072 bytes > Controller ID:               0x0001 > Version:                     1.3.0 > > Admin Command Set Attributes > ============================ > Security Send/Receive:       Supported > Format NVM:                  Supported > Firmware Activate/Download:  Supported > Namespace Managment:         Not Supported > Device Self-test:            Supported > Directives:                  Not Supported > NVMe-MI Send/Receive:        Not Supported > Virtualization Management:   Not Supported > Doorbell Buffer Config:      Not Supported > Get LBA Status:              Not Supported > Sanitize:                    crypto, block, > Abort Command Limit:         5 > Async Event Request Limit:   8 > Number of Firmware Slots:    2 > Firmware Slot 1 Read-Only:   No > Per-Namespace SMART Log:     Yes > Error Log Page Entries:      256 > Number of Power States:      5 > Total NVM Capacity:          0 bytes > Unallocated NVM Capacity:    0 bytes > Firmware Update Granularity: 00 (Not Reported) > Host Buffer Preferred Size:  0 bytes > Host Buffer Minimum Size:    0 bytes > > NVM Command Set Attributes > ========================== > Submission Queue Entry Size >   Max:                       64 >   Min:                       64 > Completion Queue Entry Size >   Max:                       16 >   Min:                       16 > Number of Namespaces:        1 > Compare Command:             Supported > Write Uncorrectable Command: Supported > Dataset Management Command:  Supported > Write Zeroes Command:        Supported > Save Features:               Supported > Reservations:                Not Supported > Timestamp feature:           Supported > Verify feature:              Not Supported > Fused Operation Support:     Not Supported > Format NVM Attributes:       Crypto Erase, Per-NS Erase, Per-NS Format > Volatile Write Cache:        Present, flush all > > NVM Subsystem Name:          (null) > _______________________________________________ > 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" forgot kern.maxphys: 1048576