fogbound.net




Mon, 2 Dec 2024

Docker Desktop on Intel Macs

— SjG @ 12:59 pm

I had a database corruption event happen in a Docker container, one result of which was that the container was completely wedged and unusable. I spent a lot of time removing containers and images and recreating them, only to have the same problem. In my case, the symptom was I’d create a new MySQL database, and operation would be fine, until part way through a bulk data import or heavy query, and the database would crash and the container would get into an unusable state again. Docker didn’t yield anything in the log, but MySQL showed corruption:

2024-11-27T22:35:38.182396Z 8 [ERROR] [MY-013183] [InnoDB] Assertion failure: os0file.cc:2899:dir_fd != -1 thread 140305764447808
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
2024-11-27T22:35:38Z UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=511ab47ad6d5dfd73d58eea5860b1c9c9a97ce07
Thread pointer: 0x7f9ad4000fc0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f9b7b3febc0 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x15af021]
/...

Once this problem occurred in a container, the database wouldn’t be start-able, often complaining about being unable to update permissions on /var/lib/mysql/mysql.sock.

Eventually, with much futile searching, I found this posting and switched Docker Desktop away from using VirtioFS to using gRPC FUSE for sharing the filesystem between the container and the host machine. This seems to have resolved the issue. I can load big databases again, and heavy transactions work in my development environment again.


Tue, 12 Nov 2024

Directory structure compare

— SjG @ 11:39 am

There’s gotta be a better way. But after a horrible upgrade process for a horrible commercial open-source product, I need to see which sub-directories from the old installation are missing in the new one. Don’t ask. I’ve literally been having nightmares about this upgrade.

Anyway, given tree1 and tree2 under some common point, I want a list of directories that exist in tree1 and don’t exist in tree2.

Here was my clumsy way of solving the problem.

cd tree1
find . -type d -print | sort > ../dirs_old
cd ../tree2
find . -type d -print | sort > ../dirs_new
cd ..
comm -23 dirs_old dirs_new


Tue, 13 Aug 2024

Another Dependency Hell

— SjG @ 7:01 am

So Google requires an Android app be updated to a later API version if it’s to be distributed. No version 33 for the Play Store! That means a few gigabytes of downloads for the updated Android Studio and Android v35 SDKs.

Unfortunately, this Android app is built in Ionic/Angular/Capacitor. So we have to update from Ionic 7 to Ionic 8, Angular 16 to Angular 18, and Capacitor 5 to Capacitor 6. But that means we can’t use Nodejs 16 anymore. Which means that the Docker container we use for building needs to upgraded from Ubuntu 18.04 to at least 20.04.

We haven’t even gotten to the obsoleted Capacitor plugins yet. @capacitor-community/barcode-scanner has been deprecated in favor of @capacitor-mlkit/barcode-scanning, and I’m sure there are others. I’m just hoping the APIs are at least reasonably similar.

Once again, my plaint is: why didn’t I become a plumber?


Tue, 27 Feb 2024

Cardboard Haberdashery

— SjG @ 5:42 pm

The annual Venice Mardi Gras parade was on the 25th (due to scheduling issues, that’s the midst of Lent this year!), so it was time to make a costume.

As the self-appointed official unofficial photographer, I always need to be able to wield one or more cameras, so my costumes tend to focus on some kind of headgear that won’t get in the way. Past costumes have included wild structures to hide a fill-in flash, wizard hats, a big papier-mâché fish, and the like. This year, since the theme is “Magical Mystery Trip,” I figured a variant on a top-hat would hint at magicianishness. A magical geometrical figure adds to the alchemical implications, so I put a Mardi Gras themed dodecahedron on it.

The top hat itself is made of cardboard. I started by measuring my head with a piece of string, cutting out a sheet from a delivery box (the corrugations pulled over the hard edge of the table to make it flexible), and creating a cylinder. Duct tape was used inside to hold it together. A top plug was hand-drawn, cut out, and hot-glued into place. Oh, so much hot glue. It’s great for imprecise work like this: it fills gaps, is adjustable for those vital few seconds, but hardens quickly into a pretty good secure bond. The brim was then drawn onto a sheet of chipboard, cut, positioned, and glued. After that, I cut the cylinder down to the curve with a razor blade, and taped in some padding with gaffer tape to help smooth that edge.

Then the hat part got put aside for a bit while the decoration was implemented. A dodecahedron is a geometric solid made of twelve pentagons. To add interest, I used Affinity Designer to illustrate a collection of pentagonal patterns based on fleurs-de-lis. You can download the design file as a PDF.

I took the file and a pack of acid-free chipboard to CrashSpace, and zapped out a bunch of pentagons on the trusty Epilog laser cutter. The chipboard comes in sheets that are 12 by 12 inches and “medium weight” which translates to 0.057 inches (~1.47mm) thick. Because the boards are not perfectly flat, the laser cutter doesn’t cut exactly the same across the entire sheet, meaning that some of the cut-out areas aren’t completely cut out.

In the vinyl- and paper-cutting crafts world, they refer to removing the cut-out portions from a design with the delightful term “weeding.” For most of the patterns, weeding just involves popping out the loosely connected portions. But there are places where I got poor through-cut. Also, the density of the chipboard is not very uniform, so some areas took a lot of cleanup with an X-Acto knife.

If I had been wiser, I would have recut these at a slightly slower speed to make sure there was complete cut-through.

Then, out came the hot-glue again, and the pentagons were assembled into a dodecahedron. You can kind of see in the lower left corner of picture below a temporary jig I made for positioning the pentagons into groups of three for rapid gluing. It’s not very precise, but fortunately it doesn’t need to be.

Next came painting. I have a set of metallic acrylic paints that were bought for last year’s Mardi Gras mask. In retrospect, I should not have bought them as the “metallic” effect is produced by tiny plastic flakes like glitter. Ugh. Micro-plastics. We’re all full of ’em, and it’s only getting worse. But I already have the paints, so I decided to use them.

The final result didn’t end up looking half bad. I wore a not-terribly-clashing floral front-plate for my FloMask to complete the look.

In the spirit of Mardi Gras, at the end of the parade, the hat was given to a school teacher whose students had just learned about dodecahedrons.


Thu, 28 Dec 2023

Welcome to the Fediverse

— SjG @ 5:03 pm

I’ve hooked up this blog to the fediverse. The improved visibility will doubtless increase readership from none to the lofty realms of zero.

Posts will federate as posts/toots/notes from @admin. Presumably, comments/responses will propagate back somehow too. I could read the manual, but I’m just going to sit back and see what happens.