{"id":12611,"date":"2015-10-20T15:52:11","date_gmt":"2015-10-20T19:52:11","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12611"},"modified":"2015-10-20T15:52:11","modified_gmt":"2015-10-20T19:52:11","slug":"how-both-tcp-and-ethernet-checksums-fail","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/10\/20\/how-both-tcp-and-ethernet-checksums-fail\/","title":{"rendered":"How Both TCP and Ethernet Checksums Fail"},"content":{"rendered":"<p><a href=\"http:\/\/www.evanjones.ca\/tcp-and-ethernet-checksums-fail.html\">Evan Jones<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=10360108\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"http:\/\/www.evanjones.ca\/tcp-and-ethernet-checksums-fail.html\"><p>At Twitter, a team had a unusual failure where corrupt data ended up in memcache. The root cause appears to have been a switch that was corrupting packets. Most packets were being dropped and the throughput was much lower than normal, but some were still making it through. The hypothesis is that occasionally the corrupt packets had valid TCP and Ethernet checksums. One \"lucky\" packet stored corrupt data in memcache. Even after the switch was replaced, the errors continued until the cache was cleared.<\/p>\n<p>I was very excited to hear about this error, because it is a real-world example of something I wrote about seven years ago: <a href=\"http:\/\/www.evanjones.ca\/tcp-checksums.html\">The TCP checksum is weak<\/a>. However, the Ethernet CRC is strong, so how could a corrupt packet pass both checks? The answer is that the Ethernet CRC is recalculated by switches. If the <em>switch<\/em> corrupts the packet and it has the same TCP checksum, the hardware blindly recalculates a new, valid Ethernet CRC when it goes out.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Evan Jones (via Hacker News): At Twitter, a team had a unusual failure where corrupt data ended up in memcache. The root cause appears to have been a switch that was corrupting packets. Most packets were being dropped and the throughput was much lower than normal, but some were still making it through. The hypothesis [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,762,476,49],"class_list":["post-12611","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-ethernet","tag-networking","tag-twitter"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=12611"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12611\/revisions"}],"predecessor-version":[{"id":12612,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12611\/revisions\/12612"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}