r/programming • • Mar 01 '17

Programmers are confessing their coding sins to protest a broken job interview process. “Whiteboard” interviews are widely hated. They also discriminate against people who are already underrepresented in the field.

https://theoutline.com/post/1166/programmers-are-confessing-their-coding-sins-to-protest-a-broken-job-interview-process
1.0k Upvotes

717 comments sorted by

View all comments

Show parent comments

1

u/AmalgamDragon Mar 03 '17

Nope. Amazon, Google, Facebook, and Microsoft screen for professional computer science and programming test takers not for professional software engineers. At least Google and Microsoft have mostly stopped screening for professional puzzle solvers, so there's that.

1

u/oridb Mar 03 '17

Here's an example problem that I actually had to handle. Tell me how you'd solve it.

Symptom: Your network team's switches in exactly one data center are slowing to a crawl. It's spinning with 100% CPU usage. The only hardware routing packets to it directly is maintained by your team. Your last release your software is 2 weeks old, and your team has pushed no updates to it. There are hundreds of teams running code on the layer below you, and many of them are doing releases.

I'm going to say that the final issue ended up being 4 separate teams. Each of them had their software configured in a way that was theoretically fine, but tickled a bug in another team's config, that tickled a bug in another teams system. That bug was minor, and didn't cause any problems until another unrelated team rolled out their software, which triggered a flood of control plane packets. Those control plane packets were unimportant, but control plane policing was broken in the router software, so its CPU got overloaded and it fell over.

I've had other issues similar to that in most places that I've worked with large interconnected systems. I'd like to know how a more professional engineer would have prevented this. Testing is pretty easy in smaller systems, but in my experience once other code starts getting changed, you get spooky actions at a distance that needs to be debugged to find out what even needs to be rolled back.

1

u/AmalgamDragon Mar 03 '17

More context is required. Is there a single pre-production environment that everyone in the same production environment rolls out to before rolling out to production? When teams roll out to production, do all systems running their stuff update at the same time? When teams roll out to production, are the new changes all switched off by default only to be switched on post-rollout? Is there the capability to rollback updates (in totality like they never happened no matter they tried to do to the machine)? How is the network traffic being monitored?

What do you mean by "There are hundreds of teams running code on the layer below you, and many of them are doing releases." (i.e. what is a 'layer' in this context how is your layer and the layer below connected/communicating)?

1

u/oridb Mar 03 '17 edited Mar 03 '17

More context is required. Is there a single pre-production environment that everyone in the same production environment rolls out to before rolling out to production?

In this case, it also wouldn't have shown up in a small pre-production environment, because the feedback loop was only a problem when the number of servers under the switches reached a critical number that overloaded the CPU and caused it to stop processing critical control packets with acceptable latencies.

When teams roll out to production, do all systems running their stuff update at the same time?

No, that would be incredibly dangerous. Staged rollouts are important. That's the only reason this issue was contained to only one data center, but without high pressure debugging it would be difficult to ensure that it was a bad roll and not (eg) a bug in handling leap seconds or some other situation that could spread out of control. It was also critical to quickly learn who was rolling out code that was having the spooky action at a distance effect.

On the other hand, I've also seen issues where the staged rollout was the root cause -- the new version interacted poorly with the old version, and caused relatively rare (but important) misrecorded data in production. An all at once rollout there might have saved some debugging.

When teams roll out to production, are the new changes all switched off by default only to be switched on post-rollout?

Yes. In this case, 0.5% rollout was enough to trigger cascading bugs.

"There are hundreds of teams running code on the layer below you, and many of them are doing releases." (i.e. what is a 'layer' in this context how is your layer and the layer below connected/communicating)?

I worked on the networking team at that time. Everything was communicating over our stuff.

1

u/AmalgamDragon Mar 03 '17 edited Mar 03 '17

In this case, it also wouldn't have shown up in a small pre-production environment, because the feedback loop was only a problem when the number of servers under the switches reached a critical number that overloaded the CPU and caused it to stop processing critical control packets with acceptable latencies.

It would if changes in network utilization were being monitored in the pre-production environment. By that I don't mean monitoring for loads above some threshold. I mean: is there more or less traffic and do the change meet expectations? Same goes for CPU, memory, local storage, and network storage utilization. Unexpected reductions in utilizations can indicative of a problem just a much as increases.

Given:

Yes. In this case, 0.5% rollout was enough to trigger cascading bugs.

It sounds like even a less than 100% pre-production rollout would have caused enough change in network traffic to be noticeable if it were being monitored.

but without high pressure debugging it would be difficult to ensure that it was a bad roll and not (eg) a bug in handling leap seconds or some other situation that could spread out of control. It was also critical to quickly learn who was rolling out code that was having the spooky action at a distance effect.

Setting up the system to automatically roll back in the case of any issues will tell you if the rollout is bad and the audit trails should be sufficient to identify who was the source of the rollout such that they can automatically notified of the issue their rollout caused and that it was rolled back. While it won't identify if there is an integration issue between the rollout that cause the issue to be apparent in the system, the diagnosis of the integration issue can occur at a non-high pressure pace while the system isn't offline.

1

u/oridb Mar 03 '17 edited Mar 03 '17

It would if changes in network utilization were being monitored in the pre-production environment.

No, the network utilization was actually very low. The thousands of packets per second (hundreds of kilobytes per second on a 40 gigabit link) just turned out to have high CPU load, and weren't properly deprioritized because of a vendor firmware bug interacting with a configuration mistake.

It sounds like even a less than 100% pre-production rollout would have caused enough change in network traffic to be noticeable if it were being monitored.

No, the network traffic difference was lost in the noise. Monitoring router queue length of critical vs noncritical control plane packets is what was needed (and the alerts on that were a big part of the hint that helped debug it), but that doesn't trigger until the CPU is overloaded. And I would be surprised if an applications team decided to monitor stats on backbone traffic and investigate it as part of their rollout. It's really not their job, nor do I think it should be.

There is absolutely testing and monitoring that could have caught this, including active probing for some of the issues that we ran into, (and it was put in place after the incident), but it's rather specific.

1

u/AmalgamDragon Mar 03 '17

As I said, CPU utilization also needs to be monitored. That generally applies to any resources the system has a limited supply (e.g. memory, local storage, network storage). It sounds like 'router queues' are a resource that needs monitoring in that specific system, and not just when the CPU is overloaded.

The monitoring I'm talking about isn't done by individual teams on just their own rollouts, but by the organization as a whole on the entire system. That way it isn't at the discretion of individual teams what gets monitored. That goes back to what I said about the organization being robust with respect to engineering.

There is absolutely testing and monitoring that could have caught this, including active probing for some of the issues that we ran into, (and it was put in place after the incident), but it's rather specific.

Indeed, there will be any number of system specific things that will need to be monitored, and doing so will require the organization to have disciplined engineering practices.

1

u/oridb Mar 03 '17

that specific system

"That specific system" is a generic data center network. With enough scale, strange interactions come up.

1

u/AmalgamDragon Mar 03 '17

Scale makes investing in good engineering all the more important, rather than being a reason not to do it. Distributed systems aren't unique in generating strange interactions. They occur on systems running on single machines too, and not catching them can screw up even more systems (i.e. millions) if they get deployed broadly through an auto-update.

1

u/oridb Mar 03 '17

Yes, those have other challenges. For example, Windows had an issue that some important this party program accessed invalid memory after some action, but due to allocation patterns, the bad access was harmless. They addressed it in a patch, but I am not sure how good engineering would find that one before shipping, without comprehensive tests of all actions in all third party programs, and what broken behavior needed to be accommodated.

→ More replies (0)