反企业腔调公开声明:我们搞砸了(Chrome 崩溃版)
1 分•作者: EGreg•9 个月前
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.