Apologies for the strange title but I don't know how else to explain...
I booted my Raspberry Pi 3 after a few days and it was working fine, then did a system update with [code]sudo pacman -Syu[/code] and it failed with some error related to being unable to lock the DB.
Following the wiki, I found that I need to delete /var/lib/pacman/db.lck and I could not do it via SSH.
I then mounted the card on my PC (running Manjaro), did a "proper" chroot with arch-chroot and also could not remove the lock file.
It turned out that I needed to run [code]chmod 600 db.lck[/code] first and then I was able to delete it (is this normal?).
I also tried to update the system while in the chroot, as I did many times before, and got issues with the signature on some packages (it seems to particularly dislike the "icu" package, for some reason). After the update failed, I tried once more and it succeeded (very strange, if you ask me). Running [code]pacman -Syu[/code] once more returns "there is nothing to do" as expected. Great.
Unmount the card, pop it back in, boot, does not work: no display apart from the first 3 seconds of kernel output and cannot SSH to it. Re-put the card in the PC, chroot and... back to square 1. The db.lck is there, I need to remove it, I do the update, problems with signatures, I do it again, it works, etc. Unmount, mount again (without even trying to boot the RPi): back to square 1.
It seems whatever I do does not "stick" to the card. Still, the card seems to be working normally. Any ideas?
EDIT - It appears there are many issues here. I can simply not write anything "permanently" to that card. Creating a document in the root folder is fine until I unplug and re-plug the card, and then the document is gone.
EDIT2 - This is the output of fsck
fsck /dev/sdc2
fsck from util-linux 2.39.1
e2fsck 1.47.0 (5-Feb-2023)
/dev/sdc2: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? yes
fsck.ext4: unable to set superblock flags on /dev/sdc2
/dev/sdc2: ********** WARNING: Filesystem still has errors **********
It smells like hardware issues to me