LaurieWired Profile picture
Dec 26, 2024 5 tweets 2 min read Read on X
“My wife complains that open office will never print on Tuesdays”

A bizarre sentence; which kicked off one of the most interesting bug hunts in Ubuntu’s history.

It all starts with some goofy pattern matching. Image
It’s not a bug with the printer, or OpenOffice, or the printer driver.

It’s a mistake in the way the “file” utility parses file signatures.

When printing from OpenOffice, a PostScript file is created with the creation date. Image
CUPS, the Common Unix Printing System, then uses the file utility as part of its pipeline to determine the type.

But if "Tue" appears at byte 4 (Tuesday's creation date), it's mistakenly identified as an Erlang JAM file, causing the print job to fail.
Essentially, the logic in the file utility for recognizing Erlang JAM files were too broad.

Looking for a single static string position is an extremely fragile detection method.

Simply changing the creation date to “XTue” completely solves the problem! Image
After some back and forth, the logic in the file utility was improved, and the bug was fixed.

It’s a good lesson for us programmers to not blindly dismiss “implausible” sounding issues.

Next time someone makes an outlandish claim; take a closer look. You might just be onto a bizarre edge case!

Here’s the original bug report:
bugs.launchpad.net/ubuntu/+source…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with LaurieWired

LaurieWired Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @lauriewired

Jun 20
A lone Boston coder rewrote BIOS in 1984.

IBM wanted to sue. The programmer's clever loophole became the model for legally defensible reverse engineering.

You’ve probably been booting his descendants ever since. This is how Phoenix Technologies got away with it: Image
Image
The case Apple v. Franklin held that BIOS could be protected by copyright.

IBM already crushed other competitors citing the case law.

Phoenix created a bizarre ruse. What if an engineer had never *seen* IBM’s specification…and thus came up with the idea organically? Image
Image
Known as a Chinese wall, this was the setup:

One team read the proprietary IBM Tech Reference Manual; writing extremely detailed (but not plagiarized) specifications.

A lone engineer, never exposed to IBM source, then wrote compatible APIs to meet the technical spec. Image
Read 5 tweets
Jun 12
Grep is actually an acronym; originally started as a ed command:

:g/<re>/p

G - global search. <re> - Regular Expression, P - print.

It was invented to run Natural Language Processing on The Federalist Papers; the precursor to the US Constitution. Yes, really. Image
Image
Lee McMahon, computer scientist at Bell Labs, was working to clarify the authorship of The Federalist Papers.

85 essays, all published under a pseudonym, it’s been a historical puzzle for a century+

The trick? De-anonymization by isolating word-frequency statistics. Image
Problem. McMahon’s working on a PDP-11; only 64KB of memory.

The full corpus exceeded 200KB. Regexes were the clear way to calculate the sets, but ed loaded the whole file at once.

McMahon called in a favor from a friend, none other than Ken Thompson himself. Image
Image
Read 4 tweets
Jun 3
A squadron of F22’s was once taken out by an imaginary line.

On a mission to Japan, an unforeseen software bug occurred crossing the international date line. Longitude swaps from W179.99 to E180 degrees.

Navigation, comms, and even fuel management went down! Image
Image
This wasn’t a simple "turn it on and off again” fix; something was seriously wrong. Reboots weren't helping.

According to Maj. Gen. Sheppard:

“…all systems dumped and when I say all systems, I mean all systems...they could have been in real trouble." Image
Thankfully, the squad of 12 F22’s were accompanied by a KC-10 tanker, who they followed visually back to Hawaii safely.

Details are sparse, but these issues aren't uncommon in aviation!

It's extremely difficult to notice subtle bugs over millions of lines of code. Image
Read 4 tweets
May 27
Want to recognize a song from just a few seconds of distorted audio?

Use Constellation Maps.

The math is brilliantly simple.

With just a handful of bytes; discarding 99% of the waveform, you can recognize a unique fingerprint across hundreds of millions of tracks. Image
Image
First, chop up the audio into few-second windows.

Take an FFT of the waveform, then extract the local peaks. Each maximum becomes a “star” on an xy plot of time vs frequency.

Pair nearby stars into clusters and hash the result. Boom, a noise-resistant fingerprint. Image
Constellation maps were the basis for Shazam.

Shazam today is a polished iOS/Android app, but the tech actually started back in 2003!

The early marketing was kind of hilarious; dial a phone number and get your Nokia to "listen". The ID'd track was sent back via SMS. Image
Read 4 tweets
May 23
I miss the insanity of 80s processor design.

Intel’s iAPX 432 was a “micromainframe”.

It had no general purpose registers, supported object orientation *directly*, and performed garbage collection on-chip.

It was also 23x slower than an 8086. Here's why it failed. Image
Image
Intel targeted Ada so aggressively that C support was an afterthought.

Problem was, particularly at the time, the Ada compiler was extremely untuned and immature.

Scalar instructions were basically never used; *everything* was huge object-oriented calls. Image
Image
The “micromainframe” moniker wasn’t just marketing. One I/O chip could stitch together 63 CPUs on a single bus.

Essentially memory safe in-hardware; dangling pointers were impossible at the ISA level.

Partners like BiiN suggested using the CPU for nuclear-reactor control. Image
Image
Read 4 tweets
May 22
NTIRE is the coolest conference you’ve never heard of.

Deleting motion blur? Sure.
Night Vision? No problem.

Every year, labs compete on categories like hyperspectral restoration, satellite image enhancement, even raindrop removal (think car sensors)! Some highlights -> Image
Low-light enhancement is always popular.

Retinexformer, shown here got 2nd place in the 2024 contest.

A *TINY* transformer-based model, it runs in about 0.5 seconds for a 6K image on a single 3090. Only 1.6M parameters (<2MB weights at INT8)! Image
Maybe motion blur removal is more your thing.

UAVs are often used to examine wind turbine blades for early failure warning. Movement of drone + rotational velocity pose a challenge.

Here’s the 2021 winner DeblurGANv2, taking ~0.19s of processing per image. Image
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(