Linux XFS filesystem development
 help / color / mirror / Atom feed
* Re: Problem mounting xfs on newer kernels, "found unrecovered unlinked inode AG 0x3"
       [not found] <CAOPeA1ze0C7n+Uk=gUi4FyDaj3Ap_SzBf62dnT6j-pzR94gwkQ@mail.gmail.com>
@ 2025-12-08 18:53 ` Darrick J. Wong
  0 siblings, 0 replies; only message in thread
From: Darrick J. Wong @ 2025-12-08 18:53 UTC (permalink / raw)
  To: Janne Raatikainen; +Cc: xfs

[cc linux-xfs]

On Mon, Dec 08, 2025 at 02:39:39PM +0200, Janne Raatikainen wrote:
> Hello,
> 
> I send this email, because I found your address from relating bug,
> https://git.sceen.net/linux/linux-stable.git/commit/fs/xfs/xfs_inode.c?h=linux-2.6.11.y&id=4790c167cc662250114dc4ecdc5d9cedbae1fe01
> 
> My error is:
> "found unrecovered unlinked inode AG 0x3"
> 
> I recently updated my Debian 11 os to Debian 12. Update went fine,
> with the exception that after rebooting with Debian 12 kernel, xfs
> root filesystem caused Linux to hang.
> 
> I have not ran any xfs_repair yet.
> 
> Currently installed kernels
> ii  linux-image-5.10.0-36-amd64           5.10.244-1
>            amd64        Linux 5.10 for 64-bit PCs (signed)
> ii  linux-image-6.1.0-40-amd64            6.1.153-1
>            amd64        Linux 6.1 for 64-bit PCs (signed)
> ii  linux-image-6.12.57+deb12-amd64       6.12.57-1~bpo12+1
>            amd64        Linux 6.12 for 64-bit PCs (signed)
> 
> 5.10 (from Debian 11) works without problems, according to dmesg
> filesystem is clean.

ISTR a bug some time ago wherein the kernel would mark a filesystem log
clean even though it had open unlinked inodes.  I /think/ that was
happening on fs freeze, but I don't remember that well.  Prior to 6.1 or
so we simply leaked the space and you wouldn't find out until an
xfs_repair, but now we try to clean up after ourselves when we notice
this...

> 6.1.0 (from Debian 12) stalls immediately, systemd can't log anything
> because its journal is on root filesystem.
> 6.12.57 lets system be mounted rw for about 10-30 seconds, before it stalls.

...but the difficulty here is that this is done at runtime, which is why
you can run for a half a minute before the stalls come back.

> This bug is reproducible by rebooting to different kernels. 5.10 don't
> detect the problem.

Interesting.  Can you capture a metadump of the rootfs and send it to us
(xfs_metadump -ag /dev/rootdisk /some/path && gzip -9 /some/path)?
Also, if possible, the dmesg / sysrq-t output somewhere?  I'm curious if
it's the xfs_iget() that's stalling.

(I know, capturing anything from the initramfs is annoying...)

> Please let me know, if you have some suggestions how to fix
> (xfs_repair?) or do you need some additional information to fix
> similar bugs in future?
> According to man page of xfs_repair, filesystem should be mounted and
> unmounted cleanly, before fixing with xfs_repair. Which kernel
> version, and xfsprogs version should I use to fix this unlinked inode
> problem? I will definitely backup my data with dd before I try to fix
> it.

The xfs_repair in bookworm (and probably even bullseye) should be ok for
cleaning up after this, though obviously if you have the ability to make
an lvm snapshot for a test-run, it would be safer to try it there first.

--D

> Best regards,
> Janne Raatikainen

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-08 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAOPeA1ze0C7n+Uk=gUi4FyDaj3Ap_SzBf62dnT6j-pzR94gwkQ@mail.gmail.com>
2025-12-08 18:53 ` Problem mounting xfs on newer kernels, "found unrecovered unlinked inode AG 0x3" Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox