[SOLVED] Xscreensaver 6.06 warning - possible .dat corrupter

Non release banter
nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

[SOLVED] Xscreensaver 6.06 warning - possible .dat corrupter

Post#1 by nanZor » 24 Mar 2024, 09:54

WARNING! But no need to panic - but I just ran across two instances of savefile dat corruption in two instances of Porteus when trying to use xscreensaver 6.06 for the first time. It was a slackware package that I downloaded from pkgs.org and converted to an xzm. All seems fine, until ...

In both LXDE 5.01 and Porteux LXQT, after setting up xscreensaver 6.06, all of a sudden a file or two becomes UNdeletable with input/output errors.

I thought it was my card at first on Porteux, but then I simply tried it on my LXDE 5.01, and lo and behold - undeletable files. My savefiles are in the default xfs format if that matters at all.

Tried to "recover" the savefiles to see if it would fix corruption, but what showed up in the logs is a bit beyond me:

Code: Select all

Cannot get host filesystem geometry.
Repair may fail if there is a sector size mismatch between
the image and the host filesystem.
Phase 1 - find and verify superblock...
Cannot get host filesystem geometry.
Repair may fail if there is a sector size mismatch between
the image and the host filesystem.
Phase 2 - using internal log
        - zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
It just seems too much of a coincidence for this to show up on two different cards, and two different Porteus(x) installs right after trying the xscreensaver 6.06. Maybe some sort of incompatibility has cropped up. Wow.
Last edited by nanZor on 26 Mar 2024, 10:25, edited 1 time in total.
That's a UNIX book - cool. -Garth

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Xscreensaver 6.06 warning - possible .dat corrupter

Post#2 by nanZor » 24 Mar 2024, 10:51

This is what these files that were in the trash looked like. Upon emptying the trash, they got thrown to the desktop and there seems no way to delete the files with the ???? in them..

Code: Select all

-rwxrwxr--  1 guest users   57 Mar 22 20:47 Night*
l?????????  ? ?     ?        ?            ? day
-rw-r--r--  1 guest users  117 Nov 11 18:21 lxtask.desktop
-rw-r--r--  1 guest users  104 Nov 11 16:07 mozilla-firefox.desktop
l?????????  ? ?     ?        ?            ? night
guest@porteus:~/Desktop$ 
I did try and recover the savefile from another machine, and let it turn and here's the savefile recovery log. Interesting, never did this before..

Code: Select all

Cannot get host filesystem geometry.
Repair may fail if there is a sector size mismatch between
the image and the host filesystem.
Phase 1 - find and verify superblock...
Cannot get host filesystem geometry.
Repair may fail if there is a sector size mismatch between
the image and the host filesystem.
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
So, maybe there is something about downloading a pre-built Slackware 15 binary, converting it to xzm, running on an xfs dat file, on a fat32 sd-card that might be the problem. Pulling that binary from my system..
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Xscreensaver 6.06 warning - possible .dat corrupter

Post#3 by Ed_P » 24 Mar 2024, 15:40

Save.dat files can get corrupted if they overflow. I always back mine up periodically. I also use the changes=EXIT cheatcode which provides a warning when shutting down if the file will overflow and I can then not save the updated file. When I download large files I move them to a folder outside of the Porteus system so they don't impact the /mnt/live/memory/images/changes folder.
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Xscreensaver 6.06 warning - possible .dat corrupter

Post#4 by nanZor » 24 Mar 2024, 20:15

Sure enough, I got bitten because I didn't make a backup of my save.dat. Luckily these are testing setups where I try to push the envelope. :)

I was impressed though with the Porteus repair utility, as all the xfs_repair utils and the like talk about mounting / unmounting a filesystem and not an xfs .dat file directly. So I was impressed with the Porteus repair util which certainly tried it's best.

And I learned something about xscreensaver, which seems to want the *extended* dpmsX or some such spec, and that explained why I was constantly fiddling with manually editing the config file, and seeing grayed-out boxes for power management in it, even after it let me do the config. Every time I went back in to check the prefs, the boxes were grayed out again, and xset q showed the funky happenings.

Oddly enough, I was totally amused. I'll make a new savefile. UPDATE: I figured it out! xscreensaver dumped ALL of it's wallpapers into my system and borked my lil' savefile! Hilarious.
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Xscreensaver 6.06 warning - possible .dat corrupter

Post#5 by Ed_P » 24 Mar 2024, 21:48

nanZor wrote:
24 Mar 2024, 20:15
Oddly enough, I was totally amused.
:lol: Happy to hear you're enjoying yourself. :happy62:
nanZor wrote:
24 Mar 2024, 20:15
I figured it out! xscreensaver dumped ALL of it's wallpapers into my system and borked my lil' savefile!
Sounds right.

My save.dat is 536.9 MB (not sure why since I allocate it as 512 MB) and is about 70% full (which is 20% more than I'm happy with). A little desktop file I use periodically executes this script which you may find useful.

SavedatSpaceCk.sh

Code: Select all

#!/bin/sh
# Add to /etc/rc.d/rc.local_shutdown.  And make rc.local_shutdown executable.
#                                      sudo chmod +x /etc/rc.d/rc.local_shutdown
# Bogomips help: https://forum.porteus.org/viewtopic.php?f=140&t=6069&p=47591#p47589
#                https://forum.porteus.org/viewtopic.php?f=140&t=6069&p=47614#p47598

# du -BM -d3 /mnt/live/memory/images/changes 

# Color definitions
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redwarning() {
   echo -e $txtred "$1" $rst
}

BOOTDEV=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
if [ "$BOOTDEV" == "/mnt/isoloop" ]; then
   BOOTDEV=`grep -A1 "ISO=" /var/log/porteus-livedbg`
   BOOTDEV=${BOOTDEV:4:9}
fi
if [ "$BOOTDEV" == "/mnt/nvme" ]; then
   BOOTDEV=`grep -A1 "ISO=" /var/log/porteus-livedbg`
   BOOTDEV=${BOOTDEV:4:14}
fi
VERSION=$(cat /etc/porteus-version)
FOLDER=porteus${VERSION:9:3}
Changes=$BOOTDEV/$FOLDER/changes
if [ ! -d $Changes ]; then 
   Changes="$BOOTDEV/changes"
fi
#set -x;

#SaveDat=50save.dat
SAVEDAT=$(ls -t $Changes/)  # ls -gt $CHANGES
SaveDat=$(echo $SAVEDAT | awk '{print $1}')
#echo $SaveDat
if [ -n "$1" ]; then
   SaveDat=$1
fi
#set -x;

if [ -a /mnt/live/memory/images/changes ]; then
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/live/memory/images/changes | tail -n1)
   Changes=/mnt/live/memory/images/changes
   SAVEDAT=$(cat /proc/cmdline | awk '{print $7}')
   SaveDat=${SAVEDAT:33}
else
   if [ ! -f $Changes/$SaveDat ]; then
      echo "No $Changes/$SaveDat file."
      read && exit
   fi
   echo toor | sudo -S -u root mloop $Changes/$SaveDat &>/dev/null        
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/loop | tail -n1)
   Changes=$Changes/$SaveDat
   echo toor | sudo -S -u root uloop &>/dev/null
fi

# echo $SDspace
read size used avail percent <<< $SDspace
if [ ${percent%\%} -ge  85 ]; then
   /usr/share/porteus/gtkdialog.py -p "Warning!  $SaveDat file $percent full" -s "Used: $used - Free: $avail" -d err
   exit
else
#  https://forum.porteus.org/viewtopic.php?p=78822#p78822 - ncmprhnsbl - '/usr/share/porteus/gtkdialog.py -h' to see the usage..  
   /usr/share/porteus/gtkdialog.py -p "$Changes"    -s "$SaveDat file $percent full - Used: $used - Free: $avail" -d info 
   exit
fi

# if no dialog option.
if [ ${percent%\%} -ge  85 ]; then
   echo 
   redwarning "Warning! save.dat file $percent full.  Used: $used  Free: $avail"
   echo 
else
   echo "save.dat file $percent full.  Used: $used  Free: $avail"
fi
sleep 5
exit
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Xscreensaver 6.06 warning - possible .dat corrupter

Post#6 by nanZor » 25 Mar 2024, 09:10

Wow, thanks for that - I'll read through and check it. Nice comments too with the forum msg refs. I like it!

If the stick is large enough, go ahead and live a little - a fat32 can hold up to what, near 4gb? Plump up your savefile! :roll:

I made a savefile.dat once with about 3.75gb, although that took awhile.
That's a UNIX book - cool. -Garth

Post Reply