Live data from Hacker News

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

kalzumeus.com

61–70 of 80 posts

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

#61
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…

Just because it's interesting to you or the author doesn't mean it's interesting to everybody else. I've seen many posts by programmers who think they discovered something great and it turns out to be something others have seen 100 times.

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

#62

Wow. Had a very similar CSRF problem once. Customer complained they were getting page expired errors constantly. But only one customer and only with Safari, not Firefox. Turned out they were using an RSS reader on OS X that shared the system cookie jar with Safari. Every ten minutes it would log in with a password and get a new session cookie. Safari would then use the new session cookie which didn't match the CSRF f…

How did you resolve the problem?

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

#63
You did a great job of breaking down the technical complexity, Patrick. You are a good teacher.

"So why did this never show up in development and why did it show up only sporadically in production?" -- I've also run into production bugs that don't manifest in development; your post inspires me to keep as many details as possible in common for the two environments.

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

#64
post #28
post #23

While not directly related to this post, I feel like it's a good time to point out how great Github is. Patrick hosts everything himself (for the SEO benefit I would assume) which is fine, but it means we can't post issues, watch the abingo repo for changes like this, submit pull requests, etc. I can't imagine that many people searching for ABingo turn into BCC customers so is the SEO benefit at the expense of a grea…

The SEO benefit from A/Bingo is not that I sell $30 of software to Rails hackers. The benefit is that A/Bingo convinces, without loss of generality, DHH to link to bingocardcreator.com despite him not having any interest in BCC. The fraction of DHH's substantial trust which rubs off on my domain as a result helps me rank for unrelated searches by elementary school English teachers. They pay my rent. I don't feel that…

they can take the MIT licensed source code, put it in their own Github, and write me an email saying "Hey, pull my stuff", which happens every once in a while. Github did not invent requesting pulls.

You don't even need to put it on GitHub to send patch. Git has alright support for easily turning changes to a local branch into an easy to email format, cf. http://book.git-scm.com/5_git_and_email.html

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

#65

Earlier quoted context omitted.

Or haskell with STM.

Or ØMQ.

We're just starting a new project this week. It's not that complicated in the big scheme of things, but there are several bits of hardware that need to be coordinated which maintain their own state, plus a GUI, logging, and database updates.

We'd initially talked about what modules and what main threads would be needed, but I started getting paranoid.

So we're going to be using the Python multiprocessing library, and ZeroMQ plus JSON for the communication between the parts.

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

#66
post #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-…

As a physicist, I really want to argue with that statement. In particular, computer hardware operates (by design) as far as possible from any regimes where the laws of physics are well and truly complicated. A tokamak fusion reactor, by contrast, although it breaks down into orders of magnitude fewer logical parts, contains a big blob of monolithic, continuous complexity, namely the plasma itself and all its associat…

Is this actually the case though?

Isn't the physics of CPU design (quantum tunneling etc) just as complicated as that of a fusion reactor (or arguably more so?)

If you meant that the behavior of the plasma itself is complex from the mathematical point of view.. yes, that is true. But it _is_ modeled (along with nuclear explosions) on one of those computer thing you physics type sell short. :P

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

#67
post #47

Earlier quoted context omitted.

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…

"Cesarean section results in regicide, 30 years later." "Rebellious teenagers escape parental control."

Macduff was born by Caesarean section, not Macbeth.

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

#68
post #56

And that's why you should always have great analytics. Monitoring is what found a similarly subtle bug at my past job once. In the later afternoon a marketing guy on the traffic team came over and told me there was a problem with our trial signups. They'd dropped ~7% today for no apparently reason. We looked at the charts and today, for most of the day, compared to many other days and the past week there was indeed a…

You shouldn't redirect for assets that dont exist, even if you do for pages...

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

#69
post #67
post #47

Earlier quoted context omitted.

"Cesarean section results in regicide, 30 years later." "Rebellious teenagers escape parental control."

Macduff was born by Caesarean section, not Macbeth.

Correct, and Macbeth is king by the end of the play, and Macduff kills him.

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

#70
post #43
post #36

Earlier quoted context omitted.

Also (unrelated), My favorite quote from the article: "Race conditions are why sane programmers don’t program with threads or, if they do, they use shared-nothing architecture and pass all communication between the threads through a message queue written by someone who knows what they are doing (if you have to ask, it isn’t you — seriously, multithreaded programming is hard)." Sounds like an advertisement for Erlang…

You can absolutely have race conditions in Erlang, along with deadlocks too.

Absolutely, but it tends to be significantly rarer, and easier to debug (in part due to tools, in other part due to OTP patterns) than multithreading race conditions.

But yeah you can have race conditions in everything, you can also have race condition in non-threaded evented code (e.g. heavily async javascript client-side code)

Post reply on HN