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.

When "blocked indefinitely" is not indefinite

41 pointsby g0xA52A2Aover 1 year ago

3 comments

Timwiover 1 year ago
“indefinite” doesn't mean infinite or eternal or forever. It just means “end time unspecified/undetermined”.
评论 #38991239 未加载
评论 #38990976 未加载
评论 #38991540 未加载
fiddlybitover 1 year ago
Very nicely written article.. and yeah, stable-pointer all the things! meme.<p>That said, these issues are why I&#x27;m considering switching away from Haskell long-term... but that&#x27;s not easy, I&#x27;m deeply invested, and all the other features let me be really productive &#x2F; creative. But the occasional weird runtime bug or timesink that takes a week to track down.. could live without that.<p>(There are ways to use the concurrency and queuing primitives like these kind of safely but it needs a deep expertise, there are too many non-obvious parts where you can let an exception slip through at the unintended place or otherwise get yourself burned. Lack of stack traces don&#x27;t help much either, though that can be somewhat orthogonal)
评论 #38994703 未加载
klabb3over 1 year ago
While I don’t know Haskell or GHC, that sounds like a bug in the runtime.<p>My understanding:<p>- Deadlock detection is a feature some language runtimes can provide.<p>- To my knowledge there’s no reasonable path of recovery from within the process (broad sense of the term) itself.<p>- If you have process isolation then a parent or supervisor can kill and respawn. (Is this what Erlang does?)<p>- Deadlocks are only theoretically detectable in the cases where the runtime can trace the “path” to something it knows about. This may include runtime objects like channels and mutices, but certainly does not include IO etc. For example: program is currently waiting on a tcp socket with no timeout.<p>- As such, deadlock detection is at most moderately useful for typical application debugging and development workflows.<p>Personally I would much rather have easy access to a “what are processes currently blocked on” list than “the runtime is so smart it will error out automagically” kind of thing.
评论 #38991595 未加载
评论 #38991281 未加载