‘Twas the night before Thanksgiving…

…and the main Adélie Linux Web serving box went down, in a strange way.

Network access to all the KVM VMs running on our primary dedicated server suddenly dropped, and new connections were refused. Connecting to the host via BMC, I was greeted with possibly the oddest machine identification I’ve ever seen:

Adélie Linux 4.14.76-mc11-easy-p8/ppc64 on chloe
Sat Aug 6 3160 10:08:02 (hvc0; 0 users)

Upon login, it became even weirder:

chloe ~ # uptime
10:07:54 up 24855 days, 3:14, 1 user, load averages: 1.10, 0.25, 0.08

Note how time went backwards! It actually seemed to be stuck in a loop going from about 10:06 AM to 10:11 AM UTC on the 6th of August, 3160 AD. (We have a rack-mounted time machine?) It turns out that there is an issue with the 4.14 branch running KVM on 64-bit PowerPC. Upgrading the box to kernel 4.19.3 appears to have solved the issue.

Clearing confusion regarding modern PowerPC endianness

I am having to correct, with alarming regularity, confusion regarding the endianness of modern PowerPC and POWER chips.  This article is going to answer a lot of those questions, with facts and citations.

What endianness are modern PowerPC / POWER CPUs, including POWER9?
Fact: All POWER Architecture processors since POWER3 support both big and little endian modes. This is because the PowerPC ISA defines an endian-switch bit in a processor control register (MSR), and all POWER processors since POWER3 implement the PowerPC ISA. The PowerPC ISA dates back to the 1990s, where AIX and Linux were exclusively big endian and Windows NT (yes, Windows NT) ran on PowerPC in little endian mode. Most POWER hardware, and most PowerPC computers, historically had firmware that only supported big endian mode. Reports are that POWER4 and POWER5 chips do not support setting the MSR because no firmware supports this mode, but I have no citation to confirm nor deny this. (My IBM POWER hardware starts at POWER6.) This has changed with POWER8, and now modern computers support both. POWER8 and POWER9 can run in either endian, though they still default to big endian during initial bootup (and the firmware services are still in big endian, requiring a byteswap for little endian OSes).
Isn’t Linux only being developed for PowerPC on little endian now?
Fact: The Linux kernel supports both endians equally.
Didn’t Debian drop support for big endian PowerPC with Jessie?
Fact: Debian still “actively supports” big endian 64-bit PowerPC; it is not a release architecture because it does not have enough dedicated maintainers. The port is still fully functional and is kept up to date.
When you buy a new POWER computer, aren’t your only choices of operating system little endian?
Fact: In addition to Debian’s big endian port, there are plenty of other operating systems that support big endian. Gentoo’s PPC64 profile is bi-endian in nature. FreeBSD and Adélie Linux are exclusively big endian, and support all the modern features of POWER9 including DARN, Radix MMU, and more. Devuan is currently adding PPC64 support for both endians.
Isn’t IBM (or OpenPOWER, or [another member organisation of OpenPOWER]) investing solely in little endian for the future?
Fact: OpenPOWER is dedicated to supporting development of both BE and LE.

Aren’t you stuck with one endian or the other?
Fact: Linux’s KVM hypervisor lets you run an environment with the opposite endianness of your host. You can freely run either endian on your host and still have the software of the other endianness available to you with no issues.

Status update for Firefox on PowerPC / big endian

(This post is probably not interesting to non-technical observers.  Rest assured, I’m still working quite hard on porting Firefox to PowerPC when I have the chance.)

I’ve just pulled the latest Firefox code (from mozilla-central) and have fully rebuilt Firefox with the latest code.

First, the good news: JS-API tests are still 100% passing.  XPC Shell tests are up!  10 more tests pass now, and it took a full 17 minutes less time to run the test suite.  This is huge; it shows that if we (the POWER, SPARC, System/390, etc communities) work together with Mozilla to truly fix Firefox on big endian, there should be no issues keeping it working.

And now, some of the worse news.  Skia m71 has landed on the tree, which is meant to bring feature-parity with Chrome 71.  This was a major loss for us.  Skia does not compile at all on any architecture other than x86 and ARM.  Once that bug was patched around, it also does not compile correctly on big endian systems; thankfully, Marcus from the Raptor Talos community already had some patches written for this during their Chromium port sprint.  And now, unfortunately, comes the truly bad news: even after fixing all the build errors, it is not possible to start Firefox with Skia m71.  This seems to be related to the text layer code, which was not always working correctly anyway.  Before, this would just cause some graphical glitches; now it is a completely fatal error.

This will require more digging than I presently have the time to consider, unfortunately.  I probably won’t get back to Mozilla porting until early next week.  This will give me the time I need to focus on writing Parcel, Adélie’s next-generation package database tool and Web site.

If you like what you see and want to ensure that Firefox is ported to POWER, in addition to all of the other important work that we do improving the Linux ecosystem, please consider supporting the Adélie Linux project on Patreon, or chipping in with cryptocurrency.  Your support is what keeps efforts like this going.  Thank you!

Saturday: Mozilla and Bixby

This morning, I tried more ideas for fixing the remaining endianness bugs in Mozilla’s graphics engine.  I found a few more leads but so far no progress on cracking the image decoding issue.

It was a beautiful day out and my allergies are waning since it’s finally autumn, so we took my gran out and decided to explore around Bixby.  There’s quite a variety of shops down there; very nice.  Their Super Target is much nicer than the Tulsa one, as well.

A sunset with many shades of blue, teal, red, and yellow.
Sunset over Bixby

As it became dark, we headed home.  On the way back I stopped in to Best Buy to find a universal remote for the TV I was given second-hand.  Had a nice chat with the cashier about watch bands.

Back at home, Mr Gaz was very affectionate and mrowy.  They say there’s going to be a light frost overnight.  I can’t wait.  The property turned off the air conditioning last week so it’s been uncomfortably warm in my flat.  Bring on the cold weather and warm kitty snuggles ^.^

Now playing: ♫ Heartbeat – Carrie Underwood