Bug#1057417: systemd tmpfiles seems to delete lost+found again

Axel Scheepers axel.scheepers76 at gmail.com
Mon Dec 4 17:47:29 GMT 2023


Package: systemd
Version: 252.17-1~deb12u1
Severity: normal
Tags: patch

Dear Maintainer,

   * What led up to the situation?

(previous bug at #788193).

Automatic run of e2scrub reported:

So sorry, the automatic e2scrub of /tmp on mahogany.vultrusercontent.com failed.

A log of what happened follows:
× e2scrub at -tmp.service - Online ext4 Metadata Check for /tmp
     Loaded: loaded (/lib/systemd/system/e2scrub at .service; static)
     Active: failed (Result: exit-code) since Sun 2023-12-03 03:11:03
CET; 137ms ago
       Docs: man:e2scrub(8)
    Process: 25375 ExecStart=/sbin/e2scrub -t /tmp (code=exited,
status=1/FAILURE)
   Main PID: 25375 (code=exited, status=1/FAILURE)
        CPU: 227ms

Dec 03 03:11:00 mahogany systemd[1]: Starting e2scrub at -tmp.service -
Online ext4 Metadata Check for /tmp...
Dec 03 03:11:01 mahogany e2scrub at -tmp[25387]:   Logical volume
"tmp.e2scrub" created.
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: e2fsck 1.47.0 (5-Feb-2023)
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: Pass 1: Checking inodes,
blocks, and sizes
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: Pass 2: Checking
directory structure
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: Pass 3: Checking
directory connectivity
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: /lost+found not found.
Create? yes
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: Pass 4: Checking reference counts
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: Pass 5: Checking group
summary information
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: /dev/system/tmp.e2scrub:
***** FILE SYSTEM WAS MODIFIED *****
Dec 03 03:11:01 mahogany e2scrub at -tmp[25415]: /dev/system/tmp.e2scrub:
21/124928 files (0.0% non-contiguous), 17515/499712 blocks
Dec 03 03:11:01 mahogany e2scrub at -tmp[25375]: /tmp: Scrub FAILED due
to corruption!  Unmount and run e2fsck -y.
Dec 03 03:11:01 mahogany e2scrub at -tmp[25420]: tune2fs 1.47.0 (5-Feb-2023)
Dec 03 03:11:01 mahogany e2scrub at -tmp[25420]: Setting filesystem error
flag to force fsck.
Dec 03 03:11:01 mahogany e2scrub at -tmp[25422]:   Logical volume
"tmp.e2scrub" successfully removed.
Dec 03 03:11:03 mahogany systemd[1]: e2scrub at -tmp.service: Main
process exited, code=exited, status=1/FAILURE
Dec 03 03:11:03 mahogany systemd[1]: e2scrub at -tmp.service: Failed with
result 'exit-code'.
Dec 03 03:11:03 mahogany systemd[1]: Failed to start
e2scrub at -tmp.service - Online ext4 Metadata Check for /tmp.
Dec 03 03:11:03 mahogany systemd[1]: e2scrub at -tmp.service: Triggering
OnFailure= dependencies.


   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Ineffective: put /tmp on a separate filesystem, effective; add lost+found
to /usr/lib/tmpfiles.d;

 cat /usr/lib/tmpfiles.d/tmp-lost-and-found.conf 
x       /tmp/lost+found


I can't find an exeption in the source nor in /usr/lib/tmpfiles.d/*
root at mahogany:/tmp/src/systemd-252.17/src/tmpfiles# ed tmpfiles.c 
158825
/.journal
                                       ".journal",
-3,+3n
764                                 S_ISREG(sx.stx_mode) &&
765                                 sx.stx_uid == 0 &&
766                                 STR_IN_SET(de->d_name,
767                                            ".journal",
768                                            "aquota.user",
769                                            "aquota.group")) {
770                                     log_debug("Skipping \"%s\".", sub_path);

Maybe I'm missing something but if not can it be added to either
/usr/lib/tmpfiles.d or as a patch to tmpfiles.c?
I can confirm adding it to tmpfiles.d solves the problem for me.

Happy holidays, kind regards,

Axel

-- Package-specific info:

-- System Information:
Debian Release: 12.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-13-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd depends on:
ii  libacl1            2.3.1-3
ii  libaudit1          1:3.0.9-1
ii  libblkid1          2.38.1-5+b1
ii  libc6              2.36-9+deb12u3
ii  libcap2            1:2.66-4
ii  libcryptsetup12    2:2.6.1-4~deb12u1
ii  libfdisk1          2.38.1-5+b1
ii  libgcrypt20        1.10.1-3
ii  libkmod2           30+20221128-1
ii  liblz4-1           1.9.4-1
ii  liblzma5           5.4.1-0.2
ii  libmount1          2.38.1-5+b1
ii  libp11-kit0        0.24.1-2
ii  libseccomp2        2.5.4-1+b3
ii  libselinux1        3.4-1+b6
ii  libssl3            3.0.11-1~deb12u2
ii  libsystemd-shared  252.17-1~deb12u1
ii  libsystemd0        252.17-1~deb12u1
ii  libzstd1           1.5.4+dfsg2-5
ii  mount              2.38.1-5+b1

Versions of packages systemd recommends:
ii  dbus [default-dbus-system-bus]   1.14.10-1~deb12u1
ii  systemd-timesyncd [time-daemon]  252.17-1~deb12u1

Versions of packages systemd suggests:
ii  libfido2-1             1.12.0-2+b1
pn  libqrencode4           <none>
pn  libtss2-esys-3.0.2-0   <none>
pn  libtss2-mu0            <none>
pn  libtss2-rc0            <none>
pn  polkitd | policykit-1  <none>
pn  systemd-boot           <none>
pn  systemd-container      <none>
pn  systemd-homed          <none>
pn  systemd-resolved       <none>
pn  systemd-userdbd        <none>

Versions of packages systemd is related to:
ii  dbus-user-session  1.14.10-1~deb12u1
pn  dracut             <none>
ii  initramfs-tools    0.142
ii  libnss-systemd     252.17-1~deb12u1
ii  libpam-systemd     252.17-1~deb12u1
ii  udev               252.17-1~deb12u1

-- no debconf information


More information about the Pkg-systemd-maintainers mailing list