From owner-freebsd-current@freebsd.org Thu Dec 20 18:04:53 2018 Return-Path: Delivered-To: freebsd-current@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 9FFBF134F14B for ; Thu, 20 Dec 2018 18:04:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x132.google.com (mail-it1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE2BC8C031; Thu, 20 Dec 2018 18:04:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x132.google.com with SMTP id a6so3025704itl.4; Thu, 20 Dec 2018 10:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qEq3pU9Tr4VZ9aHDSlnTh49JqFiOtoLe0vG55DQogZw=; b=fz+iS35zzNpa1LZUGhy4hkFxY1g97KEOJQA7ofoaNlfXOhjotJK5ykPvfMJSgpu/2O Dk8MPasslP+eiDalfW872Ry5ji1VESWuQHIn+HS1WSWq74ZYaxoDOM3fywKZ28vlEWqv ykgxR6ZBDhzRMH9yMesTClGWyBysyrVHDb5V5eCXGzM+QcP5pPP3sjhrApsRrlV1Msh6 sGC6TBMpTRrawbfKH9eS9no1vw9cruoMA37R4xKuF5wZc+EwBX45IYcux/eQcrxgvw2Y N+m1ZLUXPGOw8woaU3DRyekSsg1fQwC7NSMVuXRqi7tvMYdwQYVpCmd6j2UDVybjoi9e LXnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=qEq3pU9Tr4VZ9aHDSlnTh49JqFiOtoLe0vG55DQogZw=; b=gguDj89UxrxRsOSqmcTUJjb7gvb9YFwwz2mfvvuaH4ZE6L3a2kFW163lMwuj5PbpzJ Tmc8A+K7PBXvq9P35GBvkccfcNhhSU6NpTLwtdsbSJfD5K4c8hbe86Q41WBOyGEA+oRD lReRafVHH6vylBNKc+CKGCLFrKkf6PgmFDWsK7VI/FH3L6gFUoCbgqQYssJIh0kQzvCw p8U7RX4zI3XQFdxTTUufazYZsFkaYWgmp9hwTUtxFIKpR3zBfHJ1GfDypC3NjaOenbKl sQ8vMdWsuwaJz5ZenVXCeVaD4aRuOq0UbaoHLw3tASIZihmR2tXdFmAJK3OvE46+izSl 2O3Q== X-Gm-Message-State: AA+aEWafoKkX9MBFP1fzWfc1vcCid5Im7sGifF0Malj02neajFRGTlJR vkhkx8QoUsy1Wo12+7NevnHhil5m X-Google-Smtp-Source: AFSGD/Xh0zElfKUgYLPJVokbX7SWo+jSLlZdjjf+4mtGRC5bs7jt0Z8aztErS/o8K2syOJh0wkW+QA== X-Received: by 2002:a24:7fce:: with SMTP id r197mr10142688itc.4.1545329091907; Thu, 20 Dec 2018 10:04:51 -0800 (PST) Received: from raichu (toroon0560w-lp130-07-64-229-95-98.dsl.bell.ca. [64.229.95.98]) by smtp.gmail.com with ESMTPSA id 85sm10033782iou.8.2018.12.20.10.04.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 10:04:51 -0800 (PST) Sender: Mark Johnston Date: Thu, 20 Dec 2018 13:04:49 -0500 From: Mark Johnston To: Rebecca Cran Cc: "freebsd-current@FreeBSD.org" , pho@freebsd.org, mckusick@freebsd.org Subject: Re: Panic in getblkx() booting from disc1.iso in Qemu VM Message-ID: <20181220180449.GD98252@raichu> References: <4628942.YNO7O01DYZ@photon.int.bluestop.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4628942.YNO7O01DYZ@photon.int.bluestop.org> User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: AE2BC8C031 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=fz+iS35z; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::132 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-4.81 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.81)[-0.812,0]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.3.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.29)[ip: (-8.18), ipnet: 2607:f8b0::/32(-1.78), asn: 15169(-1.41), country: US(-0.08)]; MID_RHS_NOT_FQDN(0.50)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2018 18:04:53 -0000 On Thu, Dec 20, 2018 at 10:33:20AM -0700, Rebecca Cran wrote: > I know booting from the cd/dvd iso worked fairly recently, but today booting a > new build of -CURRENT in a Qemu VM resulted in a panic: > > FreeBSD 13.0-CURRENT 19a6ceb89db(HEAD) GENERIC amd64 > FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM > 7.0.1) > WARNING: WITNESS option enabled, expect reduced performance. > VT(efifb): resolution 800x600 > CPU: QEMU Virtual CPU version 2.5+ (2994.86-MHz K8-class CPU) > Origin="AuthenticAMD" Id=0x663 Family=0x6 Model=0x6 Stepping=3 > Features=0x783fbfd > Features2=0x80002001 > AMD Features=0x20100800 > AMD Features2=0x5 > SVM: NAsids=16 > Hypervisor: Origin = "TCGTCGTCGTCG" > real memory = 8589934592 (8192 MB) > avail memory = 8227643392 (7846 MB) > > ... > > WARNING: WITNESS option enabled, expect reduced performance. > Trying to mount root from cd9660:/dev/iso9660/13_0_CURRENT_AMD64_DVD [ro]... > panic: bsize == 0, check bo->bo_bsize > cpuid = 0 > time = 2 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0041189270 > vpanic() at vpanic+0x1b4/frame 0xfffffe00411892d0 > panic() at panic+0x43/frame 0xfffffe0041189330 > getblkx() at getblkx+0x807/frame 0xfffffe00411893f0 > breadn_flags() at breadn_flags+0x3d/frame 0xfffffe0041189460 > cd9660_blkatoff() at cd9660_blkatoff+0x53/frame 0xfffffe00411894d0 > cd9660_vget_internal() at cd9660_vget_internal+0x26b/frame 0xfffffe0041189550 > vfs_domount() at vfs_domount+0x7d3/frame 0xfffffe0041189770 > vfs_donmount() at vfs_donmount+0x7b9/frame 0xfffffe0041189810 > kernel_mount() at kernel_mount+0x58/frame 0xfffffe0041189860 > parse_mount() at parse_mount+0x469/frame 0xfffffe00411899a0 > vfs_mountroot() at vfs_mountroot+0x67f/frame 0xfffffe0041189b10 > start_init() at start_init+0x28/frame 0xfffffe0041189bb0 > fork_exit() at fork_exit+0x84/frame 0xfffffe0041189bf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0041189bf0 Peter reported the same problem with ext2. I believe this is a regression from r342135, which moved a VFS_ROOT call before VFS_STATFS. For most filesystems, VFS_STATFS is the place where mp->mnt_stat is initialized, so the problem arises because mnt_stat.f_iosize is still 0 when the root vnode is initialized. UFS initializes mnt_stat.f_iosize in its VFS_MOUNT implementation, so it is immune to this problem.