Get the latest tech news

Tokio and Prctl = Nasty Bug


Recently I encountered a bug so cute that I immediately knew that I will want to share it on my blog. It was one of those bugs that even Rust can’t save you from. It occurred in HyperQueue (HQ), a distributed task scheduler written in Rust that I work on.

But since we have released version 0.21.0, we have received several issue reports about a major problem, where tasks spawned by HyperQueue were getting terminated after a few seconds, apparently without any obvious reason. The commit was actually created quite some time ago, back in summer of 2024, when I was doing a frankly unhealthy amount of HyperQueue benchmarking for my PhD, but it was only merged recently, which is why the issues have only started appearing now. This was also the reason why tasks would actually finish successfully if you submitted more of them (as shown in#815), because the worker thread would receive more work to do (more commands to spawn), so it took more time for tokio to terminate it.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of nasty bug

nasty bug

Photo of prctl =

prctl =

Photo of tokio

tokio

Related news:

News photo

Samsung phone users under attack, Google warns -- "A nasty bug in Samsung's mobile chips is being exploited by miscreants as part of an exploit chain to escalate privileges and then remotely execute arbitrary code, according to Google security researchers." "affects Samsung Exynos mobile processors"

News photo

iOS and iPadOS 17.5.1 fix a nasty bug that resurfaced old photos