ish-app / ish-app/ish

running rust binary with tokio results in segfault

Open
#2,447 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

unconfirmed
Dominant language
C
Stars
20.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

when running a binary built for i686-unknown-linux-musl (rainfrog-v0.1.12-alpine-i686.tar.gz) or i586-unknown-linux-musl (rainfrog-v0.1.13-i586-unknown-linux-musl.tar.gz) that is using tokio's async runtime, the program crashes with this message:

thread 'tokio-runtime-worker' panicked at /cargo/registry/src/[index.crates.io](http://index.crates.io/)-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/[worker.rs](http://worker.rs/):656::12:
attempt to calculate the remainder with a divisor of zero
Segmentation fault

this has also been reported on the new python package manager, uv: https://github.com/astral-sh/uv/issues/2732

looking at tokio-rs, the line in question seems to be: https://github.com/tokio-rs/tokio/blob/9c337ca1a306be38e3474082be14bdef4bcb45b5/tokio/src/runtime/scheduler/multi_thread/worker.rs#L656

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the i686-unknown-linux-musl or i586-unknown-linux-musl binaries under iSH and inspect the linked Tokio worker.rs line, comparing the related uv report. Done means the Tokio async runtime no longer panics with a zero divisor or ends in a segmentation fault on these targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.