deezer / deezer/spleeter

[Bug] Separator.join(timeout=...) parameter is silently ignored

Open Beginner friendly
#956 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28.4k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## Problem
`Separator.join(timeout)` blocks forever regardless of the `timeout` argument; the parameter is dead.

## Cite
`spleeter/separator.py:127-138`:
```python
def join(self, timeout: int = 200) -> None:
while len(self._tasks) > 0:
task = self._tasks.pop()
task.get()
task.wait(timeout=timeout)
```

`task` is a `multiprocessing.pool.AsyncResult`. `task.get()` (with no `timeout` arg) blocks indefinitely per stdlib. By the time `task.wait(timeout=timeout)` runs, the task is already complete, so the `timeout` has no effect. Users calling `separator.join(timeout=5)` still hang if any subprocess stalls.

## Expected
`timeout` bounds the wait per task.

## Actual
Parameter ignored; unbounded block.

## Fix
`task.get(timeout=timeout)` (drop the `task.wait` line).

## Environment
spleeter 2.4.2 (`pyproject.toml`), Python >=3.8,<3.12, stdlib `multiprocessing.pool.AsyncResult` (all supported CPython versions).

Thanks for maintaining deezer/spleeter!

Contributor guide

Open the contributing guide

Research direction

Start in spleeter/separator.py:127-138 and inspect how Separator.join handles each multiprocessing AsyncResult. Reproduce the issue with a stalled task and a short timeout, then verify that joining returns or raises within the requested bound and that the existing task-processing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.