TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Debugging an evil Go runtime bug

498 pointsby cmsimikeover 7 years ago

19 comments

warentover 7 years ago
Marcan's attitude is great; I know of a ton of people (myself included) who would've written that article with far more complaining interleaved. Super informative as well, I learned a ton from this article (GRUB 2 feature for marking off bad RAM? Wow!). Very well written, informative, humorous, etc. Love it
评论 #15848752 未加载
frikkasoftover 7 years ago
That is such as well written post, and showcases some serious diagnostic skills by an experienced person.<p>Btw, thanks about telling me about the badram Grub 2 feature, had no idea that exited.
ereyes01over 7 years ago
Man I loved the approach to narrow down the offending object file using the regex on the SHA hash of the binaries. That would&#x27;ve saved me lots of time hunting and guessing bugs with cscope+kdb back in my kernel hacker days!
donquichotteover 7 years ago
Wow, these are some serious debugging skills. I also admire the tenacity and the will to investigate the root cause.<p>&gt; I tried setting GOMAXPROCS=1, which tells Go to only use a single OS-level thread to run Go code. This also stopped the crashes, again pointing strongly to a concurrency issue.<p>I think I would have stopped there.
评论 #15850960 未加载
cfstrasover 7 years ago
Hah. I remember Bryan Cantrill complaining about this exact thing. Glad that it&#x27;s fixed.<p>Turns out somebody else did, too: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;bcantrill&#x2F;status&#x2F;774290166164754433?lang=en" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;bcantrill&#x2F;status&#x2F;774290166164754433?lang...</a><p>&#x2F;edit: spelling
dmitshurover 7 years ago
The investigation in the linked Go issue [1] is also impressive.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;issues&#x2F;20427" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;issues&#x2F;20427</a>
评论 #15846827 未加载
stmwover 7 years ago
This is great story, probably wins the year for &quot;best bug you&#x27;ve ever encountered?&quot; question. Having implemented some weird runtimes for weird languages, I am sympathetic to Go team here -- these odd tradeoffs of pushing the envelope on OS &lt;-&gt; your_own_compiler interactions can trigger some wild experiences.
FLUX-YOUover 7 years ago
&gt;Since the problem gets worse with temperature, what happens if I heat up the RAM?<p>Neat. I wonder if that makes Rowhammer more likely to occur.
评论 #15848983 未加载
评论 #15848942 未加载
squeedover 7 years ago
For a similar tale of vDSO getting someone in trouble, check out this fun talk &quot;Really crazy container troubleshooting stories&quot;: <a href="https:&#x2F;&#x2F;media.ccc.de&#x2F;v&#x2F;ASG2017-115-really_crazy_container_troubleshooting_stories" rel="nofollow">https:&#x2F;&#x2F;media.ccc.de&#x2F;v&#x2F;ASG2017-115-really_crazy_container_tr...</a>
igraviousover 7 years ago
Ninja level debugging and diagnostic skills. A fascinating read from start to finish. Bonus points for the GRUB 2 feature for masking out bad RAM blocks – still dreaming of owning a laptop with ECC memory :&#x2F;
0x0over 7 years ago
Setting up for a 104 byte stack seems pretty crazy, wouldn&#x27;t you risk overrunning the red zone even without all that stack probing? <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Red_zone_(computing)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Red_zone_(computing)</a>
评论 #15850623 未加载
emmelaichover 7 years ago
Such a thorough and well written write up.<p>To think that some experienced programmers I know declare that concurrency is easy.
评论 #15849249 未加载
alistproducer2over 7 years ago
I learned so much from that post. The author clearly love tinkering with computers. I wish I had that same leveled curiosity. Well done.
fierroover 7 years ago
this is incredibly impressive
评论 #15847053 未加载
cwzwarichover 7 years ago
Why doesn&#x27;t the vDSO code just use MOV in its stack probe probe rather than an OR?
评论 #15846210 未加载
评论 #15846460 未加载
评论 #15847399 未加载
评论 #15850147 未加载
euph0riaover 7 years ago
Thanks for taking the time to do this writeup! Super fun to read and informative.
ezoeover 7 years ago
Not only he does that, he also explains the debug procedure like we&#x27;re 5 years old. I&#x27;m so impressed.
jbubover 7 years ago
I wish i can do something like this one day :) Impressive skills by the author! Well done!
voiper1over 7 years ago
An awesome mystery story!