Posts by mglae

    time-sync.target is an overkill.

    When removed there is still the dependency chain network-online.target -> kodi-waitonnetwork.service.

    kodi-waitonnetwork.service is implemented as wait for time-sync with timeout. Using this with a larger timeout configured (default is 10sec) e.g. 60sec will very likely connect to wireguard if there is a network but also start kodi after the timeout without.

    Reinstallation does not change the state of the disks but start with an empty database.

    You can do disk setup and maintenance from LE using SSH. Enable SSH in LE settings and use a SSH client to connect.

    To e.g. check your sda file system stop Kodi to avoid any disk access, unmount the fs and perform the fsck:

    Code
    systemctl stop kodi
    
    udevil umount /dev/sda
    fsck -f /dev/sda

    After successful check use udevil umount /dev/sda to get access again.

    When done with /dev/sdb and /dev/sdc1 too start kodi with  systemctl restart kodi again.


    To get healt_h information about the disk install System Tools Addon from LE Repo and use e.g. smartctl -a /dev/sda|paste and post the URL.

    There are two major issues in the log.

    Code
    Thread 1 (Thread 0x7f0a06ea86c0 (LWP 5007)):
    #0  0x00007f0a62182aaa in free () from /usr/lib/libc.so.6
    #1  0x0000000000ee2952 in dbiplus::SqliteDataset::close() ()
    #2  0x0000000000c56ff3 in CVideoDatabase::GetEpisodesByWhere(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CDatabase::Filter const&, CFileItemList&, bool, SortDescription const&, int) ()
    #3  0x0000000000c57e9f in CVideoDatabase::GetItems(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CFileItemList&, CDatabase::Filter const&, SortDescription const&) ()
    #4  0x00000000014c6a22 in XFILE::CSmartPlaylistDirectory::GetDirectory(CSmartPlaylist const&, CFileItemList&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) ()
    #5  0x00000000014c7bfb in XFILE::CSmartPlaylistDirectory::GetDirectory(CURL const&, CFileItemList&) ()
    #6  0x00000000014a44a7 in XFILE::CDirectory::GetDirectory(CURL const&, std::shared_ptr<XFILE::IDirectory> const&, CFileItemList&, XFILE::CDirectory::CHints const&) ()
    [...]

    1. Kodi is crashing when closing the video database. May be a broken sqlite DB file.

    Code
    Apr 18 01:49:06.662671 KodiServer kernel: EXT4-fs (sdc1): warning: mounting fs with errors, running e2fsck is recommended
    
    Apr 18 01:49:06.665733 KodiServer kernel: EXT4-fs (sda): warning: mounting fs with errors, running e2fsck is recommended
    
    Apr 18 01:49:06.679060 KodiServer kernel: EXT4-fs (sdb): warning: mounting fs with errors, running e2fsck is recommended

    2. The file systems on your HDs (except the NVME) are broken.

    I do recommend a system backup (via LE settings) to an external media first, then fixing the errors before trying any larger updates.

    Good catch. Seem to be the issue (including NFSv4 not affected). Are you able to build an image with the patches?


    With your remount finding and the mount-storage.sh feature here you can try to create this file in your boot= mount point to work around the issue:

    Bash: mount-storage.sh
    # Warning: if using "overlay" the target directory is not created
    
    # Use default command to mount storage
    mount_part "$disk" "/storage" "rw,noatime"
    # force rw to work around kernel issue, see https://lore.kernel.org/lkml/[email protected]/T/
    mount -o remount,rw /storage

    The other thread is about NFSv4. vers=3 is still the default for kernel mounts.


    and then did mount -o remount,rw /storage, which worked fine

    Boot code in initramfs is using busybox mount while LE user mode is having util-linux mount + nfs-utils mount.nfs. There may be differences in behavior, but the tools are identical in the bisected versions.


    Remain the kernel changes. For NFS (only) they are;

    Code
    > git --no-pager log --oneline v6.6.63...v6.6.66 -- fs/*nfs*
    37dfc81266d3 nfsd: fix nfs4_openowner leak when concurrent nfsd4_open occur
    1cecfdbc6bfc nfsd: make sure exp active before svc_export_show
    065902117a5b nfs: ignore SB_RDONLY when mounting nfs
    229a30ed42bb NFSv4.0: Fix a use-after-free problem in the asynchronous open()
    dde654cad08f NFSD: Prevent a potential integer overflow
    1dfc79bfc544 NFSD: Fix nfsd4_shutdown_copy()
    bd8524148dd8 nfsd: release svc_expkey/svc_export with rcu_work
    028417543535 NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()
    eb51733ae5fc NFSD: Prevent NULL dereference in nfsd4_process_cb_update()

    But I do see nothing obvious.