谷歌開發團隊犯低級錯誤?因一個字符拼寫Bug,Chromebook用戶被鎖在系統之外

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"近日,Google在短暫上線了一版 Chrome OS 更新後又迅速將其撤掉,原因是某行代碼裏少打的一個 & 字符導致系統無法解密登錄信息,大量用戶也因此被鎖在了系統之外。雖然官方已推出修復更新,但不少人都遭受了損失。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Chrome OS又出大Bug"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自從Google推出了Chrome OS 91,就因爲各種Bug沒少折騰。據 Android Police 報道,繼此前有不少用戶宣稱設備在升級到 91.0.4472.147 後導致CPU佔用率太高、Google取消更新並讓所有人回滾到 91.0.4472.114 卻引發用戶無法安裝Linux的問題之後,近日 91.0.4772.165 的到來讓用戶陷入了更糟糕的境地。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/www.reddit.com\/r\/chromeos\/comments\/oniply\/warning_the_latest_stable_update_is_stopping\/","title":"","type":null},"content":[{"type":"text","text":"ChromeOS subreddit"}]},{"type":"text","text":"的一位版主最近透露這個新的 Chrome OS 更新存在嚴重Bug,該更新將用戶鎖在他們的 Chromebook 之外,用戶根本沒法正常使用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"一位Reddit用戶報告說,他們的兩臺 Chromebook 登錄界面不再接受他們的密碼——有一臺筆記本電腦陷入開機循環,而另一部Asus Chromebook C436,即使採用Powerwash(Chromebook 上存儲的所有本地用戶數據都可以通過重設爲原始出廠狀態清除)措施也無法挽救,最終他們不得不動用 U 盤來讓系統恢復到可用的狀態。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/0e\/0efbded63f12d8d14c3bf0c9c26aeed4.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"總而言之,這個有問題的 91.0.4772.165 版本更新導致大量用戶重要文件丟失,很多用戶對此感到憤怒。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們無法確定這個錯誤是如何通過了三個開發者版本並進入穩定版本的。這次整個事件凸顯了Google對其 Chrome OS 版本缺乏質量控制的問題。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"修復"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在破壞了一堆 Chromebook 之後,谷歌最終撤回了 91.0.4472.165 版本,將Chrome設備回滾到 91.0.4472.147。谷歌事後澄清說,該團隊已經確定了問題,並將於7月21日發佈修復程序。而對於擔心丟失數據的受影響用戶來說,若能等到當天設備自動更新,就能夠再次登錄而無需進行Powerwash。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/eb\/eb8614d7b18ea9118d7b1a2436c6c907.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所以到底發生了什麼事?多虧了Reddit上一位眼尖的用戶,我們才知道一個非常簡單的拼寫錯誤似乎就是導致如此多用戶無法使用 Chromebook 的原因。通過查看兩版更新代碼"},{"type":"link","attrs":{"href":"https:\/\/chromium-review.googlesource.com\/c\/chromiumos\/platform2\/+\/3039560\/2\/cryptohome\/vault_keyset.cc#b471","title":"xxx","type":null},"content":[{"type":"text","text":"文件"}]},{"type":"text","text":"中的差異,我們可以看到是由於Google忘記在條件語句中添加第二個“&”,導致Chrome OS無法解密登錄信息(登錄時需要)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"C++中的“AND”運算符正確寫法是“&&”,但出現Bug的版本中只寫了單個“&”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/e3\/e3d465f4fdad677389e74dd9c85be5b5.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於用戶而言,雖然定期創建重要文件的備份是有必要的,但Chromebook也不應該以這種方式“強迫”用戶刪除本地文件,這對於Google來說是個應該反思的問題。目前,Google已推出修復程序,"},{"type":"link","attrs":{"href":"https:\/\/cros.tech\/table\/","title":"xxx","type":null},"content":[{"type":"text","text":"Chrome OS 91.0.4772.167"}]},{"type":"text","text":"現在可以在更新的服務器上使用。使用新版本,Chrome OS能夠解密用戶帳戶和進行登錄,從而允許訪問重要文件。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"即使是今天的Google,也無法避免像錯字這種低級Bug的出現。京東技術專家胡蜂曾總結道,人人都會犯粗心大意的錯誤,因爲這就是 “人” 這個系統的普遍固有缺陷(Bug)之一。所以,作爲人的程序員一定會犯一些非常低級的、因爲粗心大意而導致的 Bug。這就好比寫文章、寫書都會有錯別字,即使經歷過三審三校後正式出版的書籍,都無法完全避免錯別字的存在。而程序中也有這類 “錯別字” 類型的低級錯誤,比如:條件if 後面沒有大括號導致的語義變化,==、= 和 === 的數量差別,++ 或-- 的位置,甚至 ; 的有無在某些編程語言中帶來的語義差別。即使通過反覆檢查也可能有遺漏,而自己檢查自己的代碼會更難發現這些缺陷,這和自己不容易發現自己的錯別字是一個道理。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"參考鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/www.androidpolice.com\/2021\/07\/20\/a-new-chrome-os-91-update-is-breaking-chromebooks-like-a-bull-in-a-china-shop\/","title":"","type":null},"content":[{"type":"text","text":"https:\/\/www.androidpolice.com\/2021\/07\/20\/a-new-chrome-os-91-update-is-breaking-chromebooks-like-a-bull-in-a-china-shop\/"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章