Leaked semaphore warning on shutdown when using WhisperModel
Author: Waliya-noorCreated Jun 8, 2026Updated Jun 12, 2026
Hi,
I'm using faster-whisper inside a container and noticing a warning on shutdown after running a transcription:
/usr/local/lib/python3.14/multiprocessing/resource_tracker.py:475: UserWarning:
resource_tracker: There appear to be X leaked semaphore objects to clean up at shutdownMinimal setup
- Python: 3.14
faster-whisper:1.2.1- Running inside a container
- Simple usage:
from faster_whisper import WhisperModel
model = WhisperModel("Systran/faster-whisper-base", device="auto", compute_type="auto")
segments, info = model.transcribe(audio_bytes)What I observed
- The transcription works fine
- The warning appears only at process/container shutdown
- I tried explicitly cleaning up:
- deleting the model (
del model) - clearing internal references (
model.model = None) - calling
gc.collect()
- deleting the model (
…but the warning still appears.
Questions
- Is this a known/common issue when using
faster-whisper(orctranslate2)? - Are there recommended ways to properly release resources or avoid this warning?
- Is this something that needs to be handled at the library level, or is it expected/harmless?
Source: SYSTRAN/faster-whisper