Live data from Hacker News

A Google Cloud support engineer solves a tough DNS case

cloud.google.com

121–130 of 283 posts

Re: A Google Cloud support engineer solves a tough DNS case

#121

Earlier quoted context omitted.

Yes, there is a flag to change the default behavior. I am not sure how many folks actually use this flag.

If you want flags, gcc has -Wall -Wextra -Werror which seems like it would have caught this bug. (Of course, if you weren't using -Wall -Wextra from the beginning you'll have a lot of catching up to do before you can build with -Werror.)

Yep, there's tons of details here, which is why I think the original poster was simply trolling.

Re: A Google Cloud support engineer solves a tough DNS case

#122

Earlier quoted context omitted.

I think what he's trying to suggest is that the customer may have been able to isolate the issue faster by walking through the provisioning settings for the machine to identify core changes. The bug report resulted in a core fix, which is a better result than if the customer had fixed it themselves of course.

Also, it was very nice of Google to follow up and submit the patch to LKML. IMHO this goes beyond the scope of their role. They could have taken a more selfish approach and accepted the bug as "normal" behavior, and advised their customer to not configure the buffer to such an enormous size.

Any decent engineer would smile at the fact that they just found a bug in this type of open source stack and happily submit it. Feel this is more of a side effect of individual behavior rather than company policy.

Re: A Google Cloud support engineer solves a tough DNS case

#123

Note: You shouldn't use int , unsigned int , char , short , long . Use int16_t , uint16_t , uint8_t , etc (or their _fast equivalents) from stdint.h . The former's sizes change based on platform, cpu, and compiler; the latter are fixed-width (or flexible, where _fast may use a larger size if it's faster). I started brushing up on my C recently and have been collecting these little nuggets: https://gist.github.com/pet…

Not when you are writing the Linux kernel, when you know exactly which sizes the integers are.

Or even when you are writing low-level code on a known platform (e.g. an LP64 platform).

Re: A Google Cloud support engineer solves a tough DNS case

#125

The big news here is Google support engineer solves ANY problem. I can never get through to them. That’s the downside to a fully automated support system, no humans.

There are lots of support engineers around, you just need to pay Google to use up their time.

Re: A Google Cloud support engineer solves a tough DNS case

#126

Earlier quoted context omitted.

If you use an automated configuration management system such as Puppet, you don't ever run sysctl manually in a shell. Instead, everything is controlled by the configuration management system. sysctl is a bit problematic in terms of exhaustiveness. That is, how do you ensure that the kernel only has its original values plus whatever you put in sysctl.conf, and nobody actually ran sysctl manually at some point? But it…

OK, so a reason why this file might reflect reality is that some automatic system wrote the file and subsequently successfully ran sysctl -p, but there are dozens of reasons why the file and reality would differ. The only source of truth is sysctl(8) or reading files in /proc/sys, and these are the values that need to propagate to observability systems and decision-making.

The configuration management does whatever you tell it to. In this case, it's your responsibility to ensure that sysctl.conf is exhaustive, and there are ways to ensure that it is. If anyone applies changes on the side, they will be reverted on the next pass. Not saying it's easy, but it's not non-trivial. Making this exhaustive with /proc is another story.

Unfortunately, this is the only way until kernel folks start agreeing that random mutability is a good thing. Right now, the kernel has way too many mutation points, and it's not (as far as I know) possible to ask it for a "diff" against the defaults.

Re: A Google Cloud support engineer solves a tough DNS case

#128
Really enjoyed this :)

As our systems grow in size and complexity we will inevitably encounter limits (and resulting problems) that previously were not approached. For the future (interstellar space travel etc.) all this will need to be recreated for greater scale

Re: A Google Cloud support engineer solves a tough DNS case

#129
"When sk_rcvbuf gets close to 2^31, adding the size of the packet can cause an integer overflow. And since it’s an int it becomes a negative number, therefore the condition is true when it should be false (for more, also check out this discussion of signed magnitude representation)."

And this is why you don't generally use signed numbers in systems code, unless you specifically need negative numbers. And why you gradually develop a paranoia about the sizes of numbers.

Re: A Google Cloud support engineer solves a tough DNS case

#130

" When sk_rcvbuf gets close to 2^31, adding the size of the packet can cause an integer overflow. And since it’s an int it becomes a negative number, therefore the condition is true when it should be false (for more, also check out this discussion of signed magnitude representation). " And this is why you don't generally use signed numbers in systems code, unless you specifically need negative numbers. And why you gr…

I'm not sure how using an unsigned number would help, given that when it overflows you're still going to have some code do unexpected stuff anyway.
Post reply on HN