From owner-dev-commits-src-all@freebsd.org Fri May 28 09:21:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6C16164FB6F; Fri, 28 May 2021 09:21:08 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Frzh41vJnz4jBH; Fri, 28 May 2021 09:21:07 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: by mail-ot1-x332.google.com with SMTP id 69-20020a9d0a4b0000b02902ed42f141e1so2909317otg.2; Fri, 28 May 2021 02:21:07 -0700 (PDT) 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=2ZI45k/5uos3lObFuftHFXLPaGtd/WDPPi3VfnhKZ5s=; b=WiWQiQWkI7HuF3q9O8dG2ynt+uC1jYSIIdKCL8g3QPT9j+OI2nIZkwwDbbnbMlZzGE AFd2BATTk2atRKrk2KG+zErXNYW289rLCT82gs5smHhw82CyE136uTVf2OSbA82ki54U u9mUEDMtuHVi9FhSb/nYu6u2NdXYcWzDZnc+DgnnfOafMDR4oPWM5Tlmn3u9xiFGCGWc Ii9YDJWs6BXf6iGNiie6Htcdz0r3JKd5sqgP0ymtcvm57FIDiL1iSdhczJcHKyNNFQ/m SfhJvcu4RwdhefuMJsbfMxTX8XPfpFP+mBvYms/cATXnbvAhAtLIco/bvJs/cWyYu/4X dtMA== 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=2ZI45k/5uos3lObFuftHFXLPaGtd/WDPPi3VfnhKZ5s=; b=XMhNCmzJA3gPjPFMysIYmWwOnCFzG+W6n2WQBBzBMD+xOuoVXT8/G3UGZnsfJfNi1F MJyXnDUs5+IIo33erlHOglS/FbULSxjfJ2NB0C1GfRxj2tXx5M5ioeZCYfkRhASNVCTq SWePlasMWOAUvpdVde9wWRm1LVzOltFtdM2e8a/WtBZ2acZ4sjxXfF2T4T2k5uN78OBN AN/C5yO5tEb1wNYnCFM7rBt8gboCe0ro+4OY7+1lLWdA+b+B4F9h2wY3Qsl3HCSn2mXT MEneSHh0j6aaExfHCWxDzbR7r80lmI6j0Z1rdhsCCbi53UDAIDDNoBBuVn1BxM2Qk7ld dgrA== X-Gm-Message-State: AOAM5330EetL5z5i3/KSAQmsu64AXmiShWaw4SM7fn0s3b/t5mvzFaO0 zLJSIDAskpJogDv4jrO/X6t7pggDlunqysfhvTvWVGhW4L8= X-Google-Smtp-Source: ABdhPJxrRd2PBf9FjThCi17PqUq3m2JEKZnyqOcfI+yCmlHrA0uH2ST9BMvzS4wDw/RNZ+5hmJFXHnpu8wj296tyztU= X-Received: by 2002:a9d:65d6:: with SMTP id z22mr6300367oth.116.1622193666509; Fri, 28 May 2021 02:21:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:4186:0:0:0:0:0 with HTTP; Fri, 28 May 2021 02:21:05 -0700 (PDT) In-Reply-To: <4faa0667-ca1b-923b-fbae-c97b0b863589@FreeBSD.org> References: <202105212038.14LKcb3U062829@gitrepo.freebsd.org> <4faa0667-ca1b-923b-fbae-c97b0b863589@FreeBSD.org> From: Rob Wing Date: Fri, 28 May 2021 01:21:05 -0800 Message-ID: Subject: Re: git: f190f9193bc1 - main - Fix fsck_ufs segfaults with gjournal (SU+J) To: John Baldwin Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" X-Rspamd-Queue-Id: 4Frzh41vJnz4jBH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 09:21:08 -0000 Hmm, I provided a fix for ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245907) and it appears = to have created a spiderweb of breakage - as noted by jhb and chs (in commit 84768d114951e88288024f09d4beae0956c3cf21). I=E2=80=99ll have some time to dig into this in the next day or two. In the meantime, the best idea I have for an immediate fix is to revert the aforementioned commit and commit f190f9193bc10a8193c87e0a02fa91400e4eb159, then apply/test the patch found at: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D225092&action=3Ddiff If there=E2=80=99s any input or suggestions, let me know. Thanks, Rob On Thursday, May 27, 2021, John Baldwin wrote: > On 5/21/21 1:38 PM, Kirk McKusick wrote: > >> The branch main has been updated by mckusick: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Df190f9193bc10a8193c8 >> 7e0a02fa91400e4eb159 >> >> commit f190f9193bc10a8193c87e0a02fa91400e4eb159 >> Author: Kirk McKusick >> AuthorDate: 2021-05-21 20:41:40 +0000 >> Commit: Kirk McKusick >> CommitDate: 2021-05-21 20:42:37 +0000 >> >> Fix fsck_ufs segfaults with gjournal (SU+J) >> The segfault was being hit in ckfini() (sbin/fsck_ffs/fsutil.c= ) >> while attempting to traverse the buffer cache to flush dirty buffer= s. >> The tail queue used for the buffer cache was not initialized before >> dropping into gjournal_check(). Move the buffer initialization >> earlier >> so that it has been done before calling gjournal_check(). >> > > This appears to have broken fsck in at least some use cases. On my rpi > I get this error trying to boot: > > Setting hostid: 0x4ce29432. > Starting file system checks: > fsck_ufs: Initial malloc(-1515870811) failed > fsck_ufs: Initial malloc(-1515870811) failed > Automatic file system check failed; help! > ERROR: ABORTING BOOT (sending SIGTERM to parent)! > > The amount being passed to malloc() is malloc junk: > > (gdb) p/x -1515870811 > $1 =3D 0xa5a5a5a5 > > The i386 CI jobs in jenkins have been failing with the same error recentl= y > as well. > > I guess this means sblock isn't fully initialized by sblock_init()? At > least > not enough to set fs_bsize? Hmm, perhaps readsb() is what sets fs_bsize? > > -- > John Baldwin >