Some Bits: Nelson's log

17 posts in July 2015

New Mac logic board: system identity

I brought my 2011 iMac in for repair, to replace a video card under an extended warranty program specific to my hardware configuration. (Reading between the lines, a cooling problem.) Once they got it on the testbench the tech decided to replace the system board as well because it tested faulty. At no charge! Despite the machine being a year+ out of warranty. Nice of them.

Anyway, a new system board means a new CPU, a new ethernet MAC, and a bunch of other small things. Which changed my machine’s identity for various things. I had to re-log in to all Apple online services. Time Machine also expressed concern but offered to “inherit” the backup I had, which seems to have worked. Had to set up a new IP assignment on my router for the MAC address of course.

I’d also logged Chrome out of Google and wiped all local state, for my security. Happy to report that logging back in to Chrome restored everything pretty well. I got all my Chrome extensions back but lost the extension configuration state. Also my browser link history is gone forever, I’d sort of hoped that would sync through Google too.

Fixed wireless Internet: Cambium, Ubiquiti

I don’t believe in wireless communications. Too spooky. Also too unreliable, and slow. And 2.4GHz wifi is particularly bad in San Francisco, between the crowding, the lack of distinct channels in 802.11a/b/g, and the faraday cages surrounding all our lathe-and-plaster rooms.

But in Grass Valley wireless is the only option. AT&T and Comcast refuse to provide wired service to rural homes and PUC and the FCC are not regulating their monopolies effectively. My ISP is SmarterBroadband, a wireless ISP that works by establishing fixed wireless links from house to house to regional distribution point to central office and then down to fast fiber backhaul. It works surprisingly well and reliably, the main limiting factor has been speeds and the challenges of getting clear line-of-sight in a hilly area covered with trees.

My link for the last couple of years has been a 900 MHz link through oak trees to a house 1.4 miles north of me. The key thing about 900 MHz is it works OK through tree cover, something higher frequencies has a harder time with. Cambium Networks hardware running Canopy, which I think dates back to the old Motorola Canopy days. It’s been pretty reliable; the only time my point to point link has failed has been in heavy snow, and then only because snow accumulated on the antenna. Also low latency (20ms?) and low jitter. The problem has been speed. The max link speed is 2600kbits/s, and the product they sell me only bursts that fast before throttling me down to 1000kbit/s. That’s 300 megabytes / hour, and it sucks.

Yesterday they upgraded me. Sent a guy 70 feet up a tree with a Cambium ePMP 1000, a 5Ghz antenna. Pointed at the same house but that far up we’re above the trees, clear line of sight. I’m told the link is good to 25 Mbit/s but I’m being sold 12/2 Mbps. Which is still pretty great and I’m grateful for the upgrade. I’m surprised how cheap the antennas are. They offered me an upgrade for a very low cost, and it looks like you can buy your own antenna for about $140. Of course you need the service!

In addition to 900MHz and 5GHz my ISP sells two other types of wireless links. There’s a 2.4GHz product they mostly don’t sell any more. It also requires clear line of sight, but is slower than 5GHz. And they have a new 3.4GHz product they label “4G”, I think because it’s based on cellular technology. It’s pretty fast too (their product offers 70% the bandwidth of 5GHz) and is able to handle a little multipath, so works with a small amount of tree cover. Didn’t work at my house though, and once we were committed to going up a tree we might as well use the 5GHz gear.

The other half of the problem I have now is getting the Internet connection from the tree 200′ from my house inside. I’m intending to run cable, but that may get complicated depending on the status of existing conduits and the challenge of trenching. Right now I have a shitty old Linksys WRT54GL sitting outside and it works surprisingly well. That’s making me think I should try a wireless link instead, even though I don’t believe in wireless.

I asked on Metafilter and got a clear consensus answer on the product I need: a Ubiquiti Nanostation M. These are consumer grade point to point wireless links. There’s a variety of frequencies and antenna sizes. They’re rated for 5+ miles so are way overkill for my 200 ft needs. But then I can probably use the tiny 9″ x 3″ antennas and be done with it. It looks like I can get a pair for about $150. Need mounting hardware and a bit of wiring work at both ends to install it right, but still that’s got to be cheaper than digging a trench.

The big question is how reliable this kind of link is. Reports are promising! I’m also curious to know what’s going on at a protocol level. They call their protocol “airMAX” which is apparently not 802.11, it’s some TDMA thing. OK, I’m fine with proprietary. But then does the link work as an ethernet bridge? Or is it working at an IP level and messing with my packets? More to learn.

Wireless; maybe not as scary as I have believed! Still nothing beats a clean run of Cat5e. Except a pickup truck full of hard drives, of course.

Update: Ubiquiti answered a tweet I made asking for advice, with a suggestion to use the Nanostation locoM5 and a suggested wireless bridge configuration. That sure makes it easy!

Multivariate linear regression, gradient descent

I’m taking Andrew Ng’s online Machine Learning course on Coursera. First time doing a MOOC for real, and on the fence about the learning style, but it is nice to have an organized class with weekly assignments.

Two weeks have gone by. The two weeks together sort of consist of one learning unit. You learn how to do linear regressions for datasets. What does that have to do with machine learning? Well, a linear regression model is a very simple form of predictive modelling for a dataset. “I fit this straight line to my 100 data points, then can use that line to predict values for arbitrary other inputs”.

The course is a bit schizophrenic about being math vs. computer programming. Ng’s lecture notes are entirely in terms of linear algebra, building up to result equations like

Screen Shot 2015-07-26 at 6.55.26 PM

(WTF? X is a matrix of your input feature set; m rows of n features each. y is an m row vector of expected feature outputs. Theta is an m row vector that is the coefficients of your linear regression prediction model. Alpha is the “learning rate”, a number that’s picked essentially by intuition. The assignment := is shorthand for iteration; we keep iteratively improving the theta vector until it converges.)

I hate linear algebra. Always did, ever since I was 19 years old and it was my 8AM class. It was the only math class I nearly failed, then crammed super hard the last week and got an A. Then promptly forgot it all. Happily, this class is also a programming class, and the actual exercises are “implement this function in Octave / Matlab”. So I get to turn that confusing math into simple code:

Screen Shot 2015-07-26 at 7.04.07 PM

While I’m a good programmer it’s been many years since I used a matrix programming language like Maple/Matlab/Octave/R. So getting to that function was hard-worn. I ended up implementing that by following Ng’s lecture progression. He starts with a simple single variable linear regression. I coded that using lots of loops so all the actual arithmetic was scalar operations. Then I tediously hand-translated all those loops into vector forms and generalized it to multivariable inputs. Good learning exercise both to remind me how linear algebra works and to learn the funky vagaries of Octave/Matlab execution. (TIL automatic broadcasting). It was gratifying to see how much faster the code ran in vector form!

Of course the funny thing about doing gradient descent for linear regression is that there’s a closed-form analytic solution. No iterative hillclimbing required, just use the equation and you’re done. But it’s nice to teach the optimization solution first because you can then apply gradient descent to all sorts of more complex functions which don’t have analytic solutions. If I end up getting to do genetic algorithms again I’m gonna be thrilled.

In the end I feel pretty proud of myself for completing week 2, doing all the optional extra work, and understanding it all. My long term goal here is just to understand enough about machine learning algorithms that I can stop worrying about how they are implemented, just bash about with someone else’s software libraries applied to my data. But it’s helpful to understand what’s going on under the hood.

Installing Octave on Mavericks

I’m using Octave for a machine learning course I’m taking online. It’s an open source MatLab clone, and true to open source it is ugly, awkward, and doesn’t install easily. Of course it’s also great free software that I’m grateful for, but that doesn’t make it easier to install.

There’s a binary version of Octave 3.8.0 that is an official installer. But the command line interface doesn’t seem able to plot graphics of any kind. The GUI version can, but there’s so many other bugs in the GUI I want the command line to work. Specifically for a program like this to run:

t = [0:0.2:2*pi];
y=sin(t);
plot(t,y);

Homebrew has a formula for Octave 3.8.2 with a zillion dependencies and options. In theory “brew install octave” should work but in practice it’s not sufficient. Here’s something approximating what worked for me, based mostly on these notes

  1. brew install Caskroom/cask/aquaterm
    Some funky graphics system that allows plots to be drawn without X11
  2. brew install gnuplot --with-x11 --with-aquaterm
    Install GNUPlot using various graphics systems. The octave formula doesn’t seem to select these reliably.
  3. brew install octave --without-docs --without-gui --without-java
    Building the docs induces TeX to be installed. No thanks. I have no idea what optional Java things Octave depends on but I’d rather not bother. And I don’t want the experimental GUI, so skip that too.
  4. brew link --overwrite gcc
    Octave’s formula is designed to be built with gcc and gcc’s Fortran. It installs gcc (which takes over an hour to compile!) but I had a different version of gfortran installed previously, which caused my Octave build to fail. The --overwrite causes the gcc package to override gfortran.
  5. brew install ghostscript
    I had to run this three times by hand because the download server was broken.

This took about 3 hours total. Once completed, my simple 2 line plot program works. Yay!

One added complication; you can select different graphics systems in Octave at runtime. The brew info even helpfully tells you how:

setenv('GNUTERM','qt') # Default graphics terminal with Octave GUI
setenv('GNUTERM','x11') # Requires XQuartz; install gnuplot --with-x
setenv('GNUTERM','wxt') # wxWidgets/pango; install gnuplot --wx
setenv('GNUTERM','aqua') # Requires AquaTerm; install gnuplot --with-aquaterm

If I don’t set this at all, I seem to be getting aqua. And it works. I can also use the x11 graphics system and it works as well.

That IPython web browser integration sure looks like a smart idea now doesn’t it?

JSON query languages

Following up on an earlier post, a roundup of some systems for querying JSON documents. I’m looking for small data extraction languages that make it very easy to extract bits of data from a bunch of JSON blobs. Kind of like regular expressions or XPath or CSS Selectors. A key thing here is being able to do stuff like “find me the parts of this JSON document that have a property foo with value bar”. Also dealing with arrays intelligently.

jq. It’s the most popular JSON query language, and quite powerful. I also find it really terse and confusing but maybe that’s because I don’t use it enough. But it’s definitely the tool to compare everything else to. There’s also been some work on a usable libjq so you can use it inside other languages, like these Python bindings.

OboeJS. It’s a streaming JSON parser but also has an XPath-like language for pulling out chunks of a document. I like the look of it.

jsonfilter is a very simple grep-like tool that works with hierarchical input. It looks good and simple for doing simple things. The author is someone I trust to think a tool like this through.

Postgres. It has native support for JSON types and a pretty decent set of functions for working with it. It also has functions for converting JSON to Postgres’ array and recordset types, which you can then further query. And the JSONB type has a few extra query options. I don’t think I’d load data into Postgres just for JSON queries, but if you have JSON there already it’s pretty powerful.

MongoDB’s JSON query language is surprisingly limited for a system that’s all about searching JSON documents. Maybe that’s just my ignorance, but I can’t find any operators for diving into the document structure other than basically walking the JSON document tree manually.

Other options I didn’t explore. #1 question is whether these have momentum and/or a future. A bunch of them look active on first glance. Will update as I read about them and find anything interesting. There’s a bunch of other things not on this list, too.

Update: in further discussion, pvg notes it’s helpful to split JSON query systems into two groups: “QLs that do selection/filtering and QLs that do that and also processing and sorting and munging and aggregation and summing and map/reduce and ...”.

I really want a system that does all the processing and sorting and munging too. But SQL is very good at that already. So really I just want to do some simple extraction with jq or whatever and then feed it to a SQL system for aggregate reporting. Or else maybe just use Postgres to do everything? I need to get my hands dirty with some feature extraction examples to see how jq / postgres / etc feel.

2011 iMac crash: vertical lines on screen

My iMac just crashed hard. Watching a video in VLC one second, dead machine with mostly black screen the next. Some strange light colored vertical lines.

Googling around this is apparently a known problem, a hardware failure of the GPU. This Apple support page notes a particular known problem for exactly my model of video card and CPU. (2011 iMac, AMD Radeon HD 6970M GPU, 3.4GHz i7 CPU). Sounds like they have a repair program.

LoL API: match data

A long hard look at what is in Riot’s /match API call. It is well documented but those docs are about the individual trees, this is the forest level view. Particular focus on data that’s not visible in the match history view. (This is NA match #1892290414. None of the participants are my friends, but it is ranked and therefore public.)

Long story short, the most interesting data that’s not currently visualized in the match history pages includes:

  • player positions every minute
  • totalTimeCrowdControlDealt
  • 10 minute averages for player performance: CS, gold, etc
  • 1 minute reports on player XP, CS, etc. (gold is currently visualized)

Top level match object:
Metadata about the game. Game type, map, server version, etc.

Teams
some top level stats on team aggregate performance. Very little data, but does have bans.

participantIdentities
summoner id, name, link to match history. This object exists but contains no data for non-ranked games. (No matter whether my API token account is friends with the player or not.)

Participants
Champion, Summoner spells, Masteries, Runes
Explicitly not any identity info other than “highest achieved season tier”.

> Stats
Detailed per-player info on whole match. level, KDA, items, etc
Unvisualized stuff:
double kills, penta kills, unrealKills, killing spree
various “scores”, all set to 0
first tower, first inhib
totalTimeCrowdControlDealt

> Timeline
None of this data is visualized by Match History.
Contains Role and Lane
Also contains average stats every 10 minutes for creeps, xp, gold, csDiff, xpDiff, damageTaken, damageTakenDiff

Timeline
Timestamped frames every 60 seconds

> participant frames
unvisualized: player position, level, XP, CS.
visualized: player gold

> events
timestamped events like item purchases, skill ups, wards placed, etc. some events like champion kills contain positions. (sadly, not wards.)

Riot’s League of Legends API and match privacy

I’ve been dorking around with the Riot API, for League of Legends. They’ve done a remarkably good job on it, particularly for a game company. The API product, the docs and developer registration and stuff, is well executed. (I say this as someone with some personal expertise.) And they are providing a huge amount of data, particularly detailed info on specific matches.

Here’s an example visualization of a match, from Riot’s own web product. All the data behind that match history view is also available in JSON form.

Anyway, one specific question is how to find matches. There’s two methods for looking up matches. The old /game API returns all matches for a given summoner ID (ie, a player). And the newer /matchhistory API returns all matches for a given summoner ID, but only ranked matches. Riot has said repeatedly that they think of ranked matches as public data and will always make that info available to anyone. But that other matches are casual and should be private. OTOH they haven’t implemented that yet, at least not entirely. Here’s the state of things today AFAICT

  1. Ranked game data is entirely public, including summoner identity
  2. Other game data is entirely public too, but does not include summoner identity except...
  3. You can see summoner identity for all games played by friends of yours and...
  4. Your Riot API developer token acts as you, and thus you can see identities of friends.

These principles apply to both the /game and /matchhistory APIs for “find me games from this person”. But they also apply to the very detailed match data returned by /match. They will return a lot of detailed data for any game, even a custom ARAM (as casual as it gets). However if you’re not friends with a player it won’t show you their summoner details. Ie: the game is anonymous.

At least, I think that’s how it works. I should confirm more.

They keep saying they’re going to disable the old /game API. That will make it more difficult to find match IDs for non-ranked games. OTOH they’ve been saying they’re going to do that for a year now and haven’t.

Update: the bit about seeing data for friends may only be true for the old /game API. It seems not to be true for specific match data returned by /match.

Temperature vs time

Funny graph from my computer in a Kansas datacenter. Something changed there and the temperature has dropped 4°C over 12 hours. And just at the same time, the phase-lock loop that NTP uses to sync time with the kernel goes off. The error isn’t big, at most 8ms, but it’s amusing.

sensors_temp-day ntp_kernel_pll_off-day ntp_offset-day

Database IDs should not be integers

It always bugged me that standard databases use integers as IDs. Not just databases: all sorts of systems, anything with a notion of identity ends up with an “id” token, and the type of that token is almost always “integer”.

The problem is that “integer” has a lot of baggage. An integer is something you can do arithmetic on. It makes no sense to divide one id by another, or add two ids together, or do almost any other arithmetic operation on. The one exception is adding one to an id, as in an autoincrement column for the primary key. But even that’s really a mistake a lot of the time, because those IDs have a way of leaking to the public in URLs and JSON blobs. I can’t tell you how many sites you can estimate growth on by just looking at message IDs or customer IDs or whatever.

My ideal world would be to have a separate “id” type in SQL which has very few operations defined on it. That’s boiling the ocean though. A close second is just to use “text” or maybe “blob” as the ID type. But in practice that doesn’t really work very well. It ends up using more storage even if it shouldn’t have to. And I have to believe indexing and searching text columns is in practice more expensive than integer columns.

So integer it is. Why fight it?

Wanted: SQLite for JSON

I like SQLite. It’s such a nice simple data store. It’s fast for small data (< 100 MB), it requires no separate daemon process, it has great support in every language I work in.

I like JSON and the idea of schemaless databases. I want to be able to download JSON blobs from an API or create some new JSON blobs and store them away with a minimum of effort. Typeless. Then I want to be able to query them somehow.

Now I want to mix the two together. I want to take a bunch of JSON objects and store them in somewhere simple, then query them.

MongoDB was the first big “store a bunch of JSON”. It sort of fits the bill for what I want, but it’s way overengineered for my needs. I don’t want a separate database process. I definitely don’t want a separate cluster of database processes. Also MongoDB is fundamentally untrustworthy and should not be used by anyone for anything serious. It might be OK for my casual hacking, particularly without clustering, but then you run into the way the query language is so awkward.

Postgres has decent JSON support with some queries. I will probably try that for my next hack. Unfortunately it requires a separate database process and I prefer the simplicity of sqlite’s “just open the file” design. But I have a Postgres instance lying around already so what’s one more database?

PostGIS: intersections, multiple SRIDs

Someone asked me to give them a map of all the rivers in the state of Ohio. Sounded like a fun PostGIS exercise for me. Unfortunately I’ve made it more complex because my river database is in SRID 900913 by default, so intersecting that with the Natural Earth admin1 data in a different SRID is not as simple as a one line query. I could just transform Natural Earth on import but ogr2ogr pretends to not know 900913 and that seemed bogus anyway. Some notes from my goofing around:

-- state boundary data is in EPSG:4326
# select ST_SRID(wkb_geometry) from admin1 limit 1;
4326

-- Coerce the test point to the SRID that the state boundary data is in
# select name from admin1 
  where ST_Intersects(wkb_geometry, 
                      ST_Transform(ST_GeomFromEWKT('SRID=4269;POINT(-82.98 39.98)'), 4326));
Ohio

-- try querying with a point inside Ohio but with mismatching SRIDs
# select name from admin1
  where ST_Intersects(wkb_geometry,
                      ST_GeomFromEWKT('SRID=4269;POINT(-82.98 39.98)'));
ERROR:  Operation on mixed SRID geometries

-- Coerce the test point to 900913, which should not work.
-- Bafflingly does not give an error for mixed SRIDs, just returns 0 rows
# select name from admin1
  where ST_Intersects(wkb_geometry,
                      ST_Transform(ST_GeomFromEWKT('SRID=4269;POINT(-82.98 39.98)'), 900913));
(0 rows)

-- Coerce the state boundary geometry to the test point's SRID
# select name from admin1 
  where ST_Intersects(ST_Transform(wkb_geometry, 4269),
                      ST_GeomFromEWKT('SRID=4269;POINT(-82.98 39.98)'));
Ohio

Home Internet device proliferation

I have 31 devices with IP addresses in my house right now. 4 computers, a printer, a game console, a router. These I expect. But also 6 Sonos music players, 3 Roku video players, 3 DirecTV boxes, 3 TV displays, and a couple of iPhones and an iPad and a Kindle. And several other devices on my network I can’t readily identify. I’m a geek who collects gadgets, sure, but I don’t think I am particularly extraordinary in that. This proliferation of devices presents several problems.

The first problem is basic network management. The only reason I know this count is I’m enough of a geek that I know how to find my router status page. Some routers I’ve seen only assign 32 IP addresses in total, I wonder how many households hit that limit and have no way of knowing? How does anyone even know what is on their network?

The second problem is tracking down problem devices. For me this usually shows up as “something’s using all the fucking bandwidth” on my slow 1MBps connection. So I look at the router IP traffic display to find the problem IP address. Then the question is, what is the device? If I’m lucky the device asked for a name when registering via DHCP; the name “DIRECTV-H25-9B3FDEB9” is a pretty good clue, and I’ve learned “NP-1GH314015312” actually means “Roku”. Sometimes the MAC address is a clue; you can look up the first 3 bytes to find the vendor. But knowing an ethernet interface was built by “Hon Hai Precision Ind. Co.” isn’t that helpful. Google tells me that’s Foxconn, still not helpful, it took something else that made me realize that was really my Playstation 4. My Kindle shows up with a prefix E0:CB:1D which is “private”, completely useless for identification.

So then I have to get clever to find the device. nmap’s TCP fingerprinting is helpful for figuring out what OS that IP address is running. For the Playstation that showed that it was FreeBSD, and I vaguely remembered that Sony bizarrely used FreeBSD for its OS and that helped me track it down. nmap can’t detect the Kindle OS via TCP fingerprints. For that device I was left with wireless signal strength in my router display. I guessed maybe it was the Kindle by the time it registered for DHCP then physically carried the Kindle nearer to the router to determine the mystery IP address’ signal strength got stronger. Ridiculous.

The third problem is some devices can’t be trusted with Internet access. My Samsung TV displays are in that category, their SmartHub SmartTV crap. Actually in theory I like the idea of it and the Netflix client etc aren’t bad. But there’s lots of reason to be worried about the security exposure of TV firmware. Also the UI is terrible. Samsung thinks the best time to pop up a “do you want to update?” dialog is right when you turn the TV on after dinner and are about to watch a movie. Consumers can’t even meaningfully answer that question; why ask it of them in the most intrusive possible way? Anyway, I decided the TVs didn’t need Internet access anymore. Not easy to disable. For the wired TVs it was enough to unplug the ethernet, but for the wireless ones the OS lacks any way to forget a network. Fortunately I could tell it to use a new bogus SSID and it was literal enough to accept the broken network even though it knew about a working one.

IPython and inline matplotlib

I’m trying out IPython. I’m also playing around with machine learning which means I need some simple data visualization, so I’m playing around with matplotlib. Here’s how to display generated plots inline (as opposed to in a popup window); the docs are inconsistent.

QT: ipython qtconsole --matplotlib inline

Notebook: launch with “ipython notebook”, then run “%matplotlib inline” in a notebook.

Here’s a sample program that generates and shows a plot:

from matplotlib import pyplot as plt
years = range(1950, 2020, 10)
gdp = [300, 543, 1075, 2862, 5979, 10289, 14958]
plt.plot(years, gdp, color='green', marker='o', linestyle='solid')
plt.show()

Roku Twitch: variable bandwidth usage

The Roku got a new official Twitch client recently. It has a remarkably neat trick: variable adjustment of bandwidth usage while playing a stream without interruption. I’ll be watching the stream in what looks to be 480p quality. Then it drops to lower quality: 360p, or 240p, or even the impressionistic smeary stream for mobile devices. Then it pops back up to 480p when it can. All the while playback is uninterrupted. Crucially the audio never cuts out or skips, so the overall viewing experience is remarkably smooth.

Here’s a bandwidth graph of 10 minutes of me watching RiotGames’ official LCS channel yesterday.

Roku Twitch bandwidth graph

My network is capable of 2600 kbits/sec but only for a burst of ~30 seconds. Then I’m throttled back to 1024 kbps for awhile. Here you can see the stream is mostly consuming about 1000 kbps but occasionally enjoys the burst up to 1500 and once even dropped down to 660 or so. All the time that was happening my playback was quite smooth and solid, the only indication anything was going on was that the graphics got a bit fuzzy sometimes.

Most video streaming apps online seem to have one HTTP stream for each quality of video, and once you start streaming it you’re committed to that bitrate. The Twitch app must be doing something smarter about grabbing a few seconds of stream at a time and dynamically altering the bitrate depending on measured bandwidth. That may explain the 3s buffering time before the stream plays, too. I’ll gladly take that tradeoff.

In the long long ago of the early 00s Internet, video streaming was dominated by RealMedia’s proprietary protocol. That was UDP, so packet loss could be handled by the app. And it was a progressive codec. I think Twitch is doing TCP and not a progressive codec, so it’s more like it’s just dynamically altering which stream it asks for on the fly. Seems to work pretty well.

(BTW, Twitch is still coy about publishing details on video quality and bitrates. Their’ partners page has some samples though, which claims

  • 240p: 384kbps
  • 360p: 512kbps
  • 480p: 768kbps
  • 720p: 1161kbps
  • 1080p: 1500kbps

I’m suspicious of the correctness of these numbers. They’re too low, also too much like round numbers except 720p. Maybe the numbers are video only and they’re doing transcoding to exactly hit a video bitrate? Seems unlikely.)

Leap second fallout

I looked for evidence of major leap second bugs and didn’t find many. The big news was AWS went down around 30 minutes after the leap second, but that turned out to be an improperly published route, not directly a leap second thing.

But DynResearch published a great graph of BGP route instability around that time, a 15x increase in BGP advertisements over normal.

Leap second BGP spike

I wonder what the cause of that was and whether it caused any problems for civilians. My guess is that it is related to dynamic load balancing algorithms assuming a day only has 86,400 seconds.

More info in this article, which also notes that 2000 networks stopped working briefly.

Leap second 2015

Both my Mac and my Linux box seem to have survived the leap second, at least so far. Both systems just reported 23:59:59 taking two seconds. A friend with a MacOS 10.10 box says he saw 00:00:00 briefly. I saw that in 2012, and it’s a serious bug (the date flips too!) but didn’t today.

while :; do date; sleep 0.1; done

A screenshot from this Javascript viewer. (Which has a fun easter egg; the clock started running backwards after this image.)

23:59:60