Live data from Hacker News

I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone

kalzumeus.com

1–10 of 80 posts

Re: I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone

#3
post #2

Can somebody post the tldr?

tldr: There were some recent changes in Rails in the portion of the code that handles CSRF protection, specifically around handling AJAX. Users' sessions were getting dropped and it was costing him money.

Re: I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone

#4
I really like this quote:

Bingo Card Creator is not terribly complicated software when compared to most applications, but it sits on top of other pieces of code (Rails, the web server the browser, the TCP/IP stack, the underlying OS, the hardware on both ends, etc) which _collectively_ are orders of magnitude more complicated than any physical artifact ever created by the human race.

You can insert any number of one-off business applications, reports, queries, etc in place of "Bingo Card Creator" but the concept remains true.

Re: I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone

#6
tl;dr: A Rails upgrade last January caused previously valid code to reset the session (but only once per user per session). The session reset caused a logged-in user to be suddenly logged out; but most users' use-flow (and Patrick's test-flow) made the session reset happen before login, so the bug only manifested visibly about 1% of the time. Moral: race conditions are hard! (Alternate moral: read the release notes carefully before upgrading.)

Re: I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone

#7
post #2

Can somebody post the tldr?

From the first sentence:

This post will not help you sell more software. If you’re not fascinated by the inner workings of complex systems, go do something more important. If you are, grab some popcorn, because this is the best bug I’ve seen in years.

There's no real point in summarizing further. It's like asking someone to summarize Hamlet for you [1] because you'd rather not sit through all that acting and dialogue. The point of this story is that it's a big complex meandering story that ultimately culminates in an anticlimactic technical issue. You know, kind of like most of my job.

---

[1] "Almost all the peers in Denmark die violently one by one."

Re: I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone

#8
Great post, good catch. These kind of errors are the ones that always keep me up at night when I launch a new site, you can't fix what you can't see!

The worst one I've done is when a fairly bad bug was being blackholed for a month as I forgot to delete a line from boilerplate code. Damn MS and their stupidly written yet useful templates ([HandleError] attribute for those in the know).

shudders

Post reply on HN