blinksh / blinksh/blink

Running two commands from ios_system causes a hang

Open
#2,079 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
6.9k
Forks
748
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] Using latest version on the [App Store](http://itunes.apple.com/app/id1156707581)
- [x] Read the [docs](http://blink.sh/docs/)
- [x] Searched for [existing GitHub issues](https://github.com/blinksh/blink/issues)

### Configuration

Blink: v18.0.1.940 (App Store). Oct 4 2024
iOS: 18.1.1

### Describe the bug

Running two commands from `ios_system.framework` at the same time (in separate windows) will result in a hang. I first ran into this running `curl` in two windows (a relatively contrived example as I was testing something out, but something that could happen in normal use.)

Then I noticed that if I were to `curl` in one window and `ls` in another, I got a hang. This also happens with other commands from the `ios_system.framework`: if I `cat` and `ls`, `cat` and `curl`, etc.

I understand that there are some limitations in `ios_system.framework` and perhaps this is one of them. If so, perhaps there should be a lock on running any of these commands at the same time.

I tried this in a-shell and I also get a crash when I run two `curl` processes at the same time, but I can use `cat` and `ls`, etc. as expected.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the concurrent-command hang with ios_system.framework using the reported curl, ls, and cat combinations in separate windows. Trace the command entry points and existing concurrency behavior, then verify that supported commands no longer hang when run simultaneously and that the reported cases have regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.