[BUG] crash while using new_stream
Open
Nobody has claimed this yet.
bug
- Dominant language
- C++
- Stars
- 28.5k
- Forks
- 2.3k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 62
Description
Describe the bug
crash while using new_stream -- I was trying to replicate something from the swift side and I can see the same error there.
To Reproduce
Include code snippet
import mlx.core as mx
i = 0
while True:
print(i)
s = mx.new_stream(mx.gpu)
x = mx.random.uniform(shape=[10, 10]).sum(stream=s)
_ = x.item()
i += 1
...
607
608
609
libc++abi: terminating due to uncaught exception of type std::runtime_error: [METAL] Command buffer execution failed: Internal Error (0000010a:Internal Error)
[1] 10855 abort python /tmp/t.py
Expected behavior
No crash
Desktop (please complete the following information):
- OS Version: macOS 15.4
- Version 0.25.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by running the reproduction with Python, MLX 0.25.0, macOS 15.4, and the mx.new_stream/mx.gpu calls; compare the failure around iteration 609. Done means the loop completes without the Metal command-buffer crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100