Up to Main Index                           Up to Journal for January, 2022

                    JOURNAL FOR SUNDAY 23RD JANUARY, 2022
______________________________________________________________________________

SUBJECT: Raspberry Pi 4 oddity, a little progress on player health
   DATE: Mon 24 Jan 02:48:49 GMT 2022

Wednesday, I sat down for my normal WolfMUD coding session and realised that I
hadn’t run my usual updates that day. So, I invoked my normal incantation:


  aptitude forget-new && aptitude autoclean && aptitude update && \
  aptitude upgrade


The updates available were for: raspberrypi-bootloader, raspberrypi-kernel and
linux-libc-dev. The Pi Zero W and Pi3B+ updated normally, the Pi4 fell over in
a heap and made a mess of the terminal. I couldn’t see what had gone wrong and
the logs hadn’t recorded an issue either.

Now that’s a problem. I use my local Pi4 to test updates before updating the
live Pi4 server that hosts this site and the Git repositories.

My thought now was to reboot the local Pi4 and reinstall the three packages[1],
just in case any had not installed properly. Rebooted, and the Pi4 complained
of needing an fsck to be run. Rebooted again with ‘shutdown -r -F now’ and…
nothing, it didn’t come back. Now I needed to attach a screen to the Pi4 to
see what was going on. Time to fish out the adapters. What I ended up with was:


     RPi4 → micro HDMI to → HDMI to HDMI → HDMI to DVI →  DVI  → Monitor
             HDMI cable       adapter        adapter     cable


Quite a mess, but it worked. I could now login and see what was up. I needed
to run fsck on the SSD still. It seems you cannot run ‘shutdown -r -F now’
when root is on USB? I had to run fsck manually with root mounted read only. I
also reinstalled the three packages ‘just in case’ and also ran ‘debsums -ca’
to make sure everything else was okay.

Now, should I go ahead and update the live server? I went for it — luckily it
upgraded without any issues. By now it was late in the evening and my coding
session had gone ‘Poof!’ and disappeared :(

Yesterday, Saturday, I finally managed to get some time to work on WolfMUD and
started adding health for players. I added intKeys for Thing.Int and modified
Thing.Marshal and Thing.Unmarshal to load and save the health attributes. That
all seems to be working fine. I then modified state.Prompt to display health
attributes. Finally, I added a HIT command to test everything, and it sort of
worked.

I’ve had to fiddle around with state.Prompt some more. Then found and fixed an
issue in mailbox.Suffix causing a panic. By the end of the afternoon I had:


  [North bridge]
  You are standing on the west side of an incomplete bridge. By the looks of
  it the city wants to expand onto the far banks of the river. Down river to
  the south you see another bridge in a similar state of construction.

  You see Diddymus here.

  You see exits: west
  H:30/30>HIT DIDDYMUS
  You hit Diddymus.
  H:30/30>HIT DIDDYMUS
  You hit Diddymus.
  H:30/30>
  Diddymus says: Hi!
  H:30/30>


Meanwhile, in another other terminal:


  [North bridge]
  You are standing on the west side of an incomplete bridge. By the looks of
  it the city wants to expand onto the far banks of the river. Down river to
  the south you see another bridge in a similar state of construction.

  You see Fred here.

  You see exits: west
  H:30/30>
  Fred hits you.
  H:28/30>SAY Hi!
  You say: Hi!
  H:26/30>


The problem here is that Fred hit me twice, but due to the message de-spamming
I was only notified once that I had been hit. I then had to do ‘something’, in
this case SAY, to get an updated prompt. I think the fix is simple. I need to
set observer messages as priority, then the messages won’t be de-duplicated
and de-spammed. Implementing the fix looks like it is going to be messy…

I still have no idea what went wrong with the Pi4…

--
Diddymus

  [1] In hindsight trying to reinstall the packages before rebooting might
      have been a better idea. However, I had no idea what had gone wrong or
      what state the system was in.


  Up to Main Index                           Up to Journal for January, 2022