From: Donald Douwsma <ddouwsma@redhat.com>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 0/5] xfsdump, xfsprogs distro builds and DEBUG=
Date: Mon, 23 Mar 2026 12:48:06 +1100 [thread overview]
Message-ID: <fce43d76-de74-4767-9435-c0fde65d37ec@redhat.com> (raw)
In-Reply-To: <nxyxi6y5hdpr3jpmr3aehoaklpe53qqdrpkf27ejn4ospx4rin@6oib2fgjv3hm>
On 14/3/26 00:12, Andrey Albershteyn wrote:
> On 2026-02-24 18:17:07, Donald Douwsma wrote:
>> tldr; Fedora builds with -DDEBUG, is that what folk want or expect?
>>
>> We see cases from the field where xfsrestore aborts on an assert(3).
>> In each case there's a real problem that needs to be fixed, but these
>> problems are preventing folk from restoring their data. With the asserts
>> suppressed or removed xfsrestore usually does something sane enough, at
>> worst leaving restored content in the orphanage where a user can find
>> it.
>>
>> This was notably seen with the original xfsdump bind mount fix, now
>> we're seeing asserts fire during cumulative restores in
>> noref_elim_recurse.
>>
>> xfsrestore: tree.c:1421: noref_elim_recurse: Assertion 'isrealpr' failed
>>
>> This appears to be caused by a rename to within the tree between restore
>> levels, or a combination of modifications during occurring during the
>> dump. Fixing it will likely require changes in noref_elim_recurse, or
>> tree_post, to ensure elements of the tree are created for these edge
>> cases.
>>
>> But why are we seeing assert(3) active in Fedora based distro builds?
>>
>> xfsprogs and xfsdump m4/package_globals.m4 shows builds should default
>> to DEBUG and xfsdump doc/INSTALL talks about how to turn off asserts and
>> create an optimized build, but only Debian has its build rules in-tree,
>> where they set DEBUG=-DNDEBUG.
>>
>> Building locally on Fedora or similar gets varied results with recent
>> Fedora versions building as if DEBUG=-DNDEBUG was set within the realm
>> of configure or autoconf, which may be misleading people.
>>
>> But for Fedora release builds we can see that they're building with
>> DEBUG=-DDEBUG resulting in gcc called with -DDEBUG in the build logs.
>>
>> https://src.fedoraproject.org/rpms/xfsdump
>> https://kojipkgs.fedoraproject.org//packages/xfsdump/3.2.0/4.fc44/data/logs/x86_64/build.log
>>
>> https://src.fedoraproject.org/rpms/xfsprogs
>> https://kojipkgs.fedoraproject.org//packages/xfsprogs/6.18.0/2.fc44/data/logs/x86_64/build.log
>>
>> I don't think the intention was to have these build as DEBUG, but that
>> seems to be the current result. But before I dig into this further can I
>> confirm what people think this should do?
>>
>> The following series is illustrative of the changes to build xfsdump
>> cleanly with DEBUG=-DNDEBUG, or the type of downstream workarounds
>> required to help end users hitting problems for the status quo.
>>
>> Don
>>
>> Donald Douwsma (5):
>> xfsrestore: remove unused variable strctxp
>> annotate variables only used for assert
>> xfsrestore: include TREE_DEBUG all builds
>
> First 3 patches looks good to me to include, not sure about the
> rest and the original use of the those asserts.
>
Thanks for looking over these.
I've done a bit more digging and have a reproducer for the recent
noref_elim_recurse assert, with what I know now the tree debug
messages may not be as useful.
Regarding the assert stuff, its a bit of a can of worms, the
documentation in the build system is misleading, when it was
written the idea seems to have been to have debug and release
builds, but Fedora/rpm distros didn't follow that.
Since then it looks like most packages have moved to assert(3),
being active for all builds. So perhaps its better to keep it
that way and remove some of the unused DEBUG options from the
docs and build scripts.
prev parent reply other threads:[~2026-03-23 1:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 7:17 [PATCH 0/5] xfsdump, xfsprogs distro builds and DEBUG= Donald Douwsma
2026-02-24 7:17 ` [PATCH 1/5] xfsrestore: remove unused variable strctxp Donald Douwsma
2026-02-24 7:17 ` [PATCH 2/5] annotate variables only used for assert Donald Douwsma
2026-02-24 7:17 ` [PATCH 3/5] xfsrestore: include TREE_DEBUG all builds Donald Douwsma
2026-02-24 7:17 ` [PATCH 4/5] xfsrestore: remove failing assert from noref_elim_recurse Donald Douwsma
2026-03-23 3:01 ` Donald Douwsma
2026-02-24 7:17 ` [PATCH 5/5] xfsrestore: assert suppression workaround Donald Douwsma
2026-03-13 13:12 ` [PATCH 0/5] xfsdump, xfsprogs distro builds and DEBUG= Andrey Albershteyn
2026-03-23 1:48 ` Donald Douwsma [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fce43d76-de74-4767-9435-c0fde65d37ec@redhat.com \
--to=ddouwsma@redhat.com \
--cc=aalbersh@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox