反企业语言公开声明:我们搞砸了(Chrome崩溃版)
HN 总是批评企业的道歉声明,诸如“犯了错误”的被动语态,以及所有的心理操控。好吧,这里是谷歌在 2027 年发布的内容,当时 Chrome(他们并没有因为反垄断而失去市场)开始偶尔崩溃:
我们不会用营销的空话或“持续改进”的废话来掩盖这个问题。Chrome 崩溃了。这是我们的错。
这里是更为直白的版本:我们的推测渲染进程开始将句柄泄漏到合成线程,这反过来又迫使 GPU 栅格线程锁定一个已经被僵尸帧孤立的资源。垃圾收集器无法回收它,因为共享工作池中存在一个悬挂引用,所以监视程序终止了该标签页。如果当时你有多个扩展在处理 DOM 变更观察者,恭喜你:你发现了我们代码库中留下的千个尖锐边缘之一。
是的,这部分问题的发生是因为一位程序员在一次外出聚会后稍微喝醉了,提交了一个“次要”修复,而没有意识到这造成了一个非确定性的竞争条件。我们没有发现这个问题,因为我们的测试覆盖率实际上不够。为什么?因为 (a) 企业预算更倾向于“发布功能”而非“编写测试”,(b) 我们甚至无法在 Chrome 的代码库上运行完整的集成测试,除非配置一整套服务器,这样的成本每小时超过一些初创公司的整体烧钱率,(c) 每当有人提议修复这个问题时,管理层会提醒我们“用户在发布说明中看不到测试”。
我们知道这并不是一个完整的解释。调度程序中仍然存在我们尚未完全理解的竞争条件,扩展 API 以意想不到的方式触发未定义行为,还有一些内存屏障看起来更像是湿纸巾。老实说,我们在这里道歉,因为没有足够准确,并且未能在这篇文章中列举出所有可能的情况。
所以是的:一切都搞砸了。是的:这是我们的错。是的:这个公告和 HN 通常批评谷歌的内容一样糟糕——只是从相反的方向来看。
另外,Chrome 预计将在 2028 年 3 月退役。但你应该试试 Mimi。
查看原文
HN always criticizes corporate mea culpas, the “mistakes were made” passive voice, and all the gaslighting. Well, here’s what Google actually published in 2027 when Chrome (which they didn’t lose to antitrust) started crashing sometimes:<p>We’re not going to bury this in marketing fluff or “continuous improvement” nonsense. Chrome crashed. It’s our fault.<p>Here’s the ugly version: our speculative renderer processes started leaking handles into the compositor thread, which in turn forced GPU raster threads to lock a resource already orphaned by a zombie frame. The garbage collector couldn’t reclaim it because of a dangling reference in the shared worker pool, so the watchdog nuked the tab. If you had more than one extension juggling DOM mutation observers at the time, congratulations: you found one of the thousand sharp edges we left in the codebase.<p>And yes, part of this happened because a programmer came in a little inebriated after an offsite party and checked in a “minor” fix without realizing it created a non-deterministic race condition. We didn’t catch it because we don’t actually have enough test coverage. Why? Because (a) corporate budgeting prefers “features shipped” over “tests written,” (b) we can’t even run full integration tests on Chrome’s codebase without provisioning a farm of servers that costs more per hour than some startups’ entire burn rate, and (c) every time someone proposed fixing this, management reminded us that “users don’t see tests in the release notes.”<p>We know this isn’t a complete explanation. There are race conditions in the scheduler we still don’t fully understand, extension APIs that trigger undefined behavior in ways no one anticipated, and some memory fences that look more like wet tissue paper. Honestly, we’re apologizing here for not being exact enough and for failing to enumerate every possible case in this post.<p>So yes: everything got messed up. Yes: it’s our fault. And yes: this announcement is every bit as bad as what HN usually criticizes Google for—just from the opposite direction.<p>Also, Chrome is set to be retired by March 2028. But you should try Mimi.