InvokeAI
InvokeAI copied to clipboard
[bug]: two Ctrl-C needed to exit
Operating system
Linux - Ubuntu (Ubuntu 24.04)
GPU vendor
Nvidia (CUDA)
GPU model
RTX 3060
Version number
ab2d203d5e87e42dc54beb477d0324522b5f1947
What happened
I hit Ctrl-C to end the process. The first time I get this traceback:
capture_signal
[2025-04-07 00:27:09,511]::[ModelInstallService]::INFO --> Installer thread 125183075550912 exiting
Traceback (most recent call last):
File "/home/ubuntu/venv/bin/invokeai-web", line 10, in <module>
sys.exit(run_app())
^^^^^^^^^
File "/home/ubuntu/src/InvokeAI/invokeai/app/run_app.py", line 86, in run_app
loop.run_until_complete(server.serve())
File "/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
self.run_forever()
File "/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
self._run_once()
File "/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
handle._run()
File "/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/home/ubuntu/venv/lib/python3.12/site-packages/uvicorn/server.py", line 69, in serve
with self.capture_signals():
^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 144, in __exit__
next(self.gen)
File "/home/ubuntu/venv/lib/python3.12/site-packages/uvicorn/server.py", line 330, in capture_signals
signal.raise_signal(captured_signal)
KeyboardInterrupt
but it has not quit. I hit Ctrl-C again and I get this traceback, and it exits:
Exception ignored in: <module 'threading' from '/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/threading.py'>
Traceback (most recent call last):
File "/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/threading.py", line 1624, in _shutdown
lock.acquire()
KeyboardInterrupt:
/home/ubuntu/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/tempfile.py:936: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpm_0ba2bq'>
_warnings.warn(warn_message, ResourceWarning)
The same has happened to me:
File "/mnt/AI/InvokeAI3/.venv/bin/invokeai-web", line 12, in <module>
sys.exit(run_app())
^^^^^^^^^
File "/mnt/AI/InvokeAI3/src/invokeai/app/run_app.py", line 86, in run_app
loop.run_until_complete(server.serve())
File "/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py", line 641, in run_until_complete
self.run_forever()
File "/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py", line 608, in run_forever
self._run_once()
File "/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
handle._run()
File "/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/asyncio/events.py", line 84, in _run
self._context.run(self._callback, *self._args)
File "/mnt/AI/InvokeAI3/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
with self.capture_signals():
File "/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/contextlib.py", line 144, in __exit__
next(self.gen)
File "/mnt/AI/InvokeAI3/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 330, in capture_signals
signal.raise_signal(captured_signal)
KeyboardInterrupt
^CException ignored in: <module 'threading' from '/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/threading.py'>
Traceback (most recent call last):
File "/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/threading.py", line 1590, in _shutdown
lock.acquire()
KeyboardInterrupt:
/mnt/AI/InvokeAI3/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/tempfile.py:934: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpzksl7qxf'>
_warnings.warn(warn_message, ResourceWarning)
(InvokeAI) ...$```
I ran into this today for the first time. Unsure if it's intermittent or something changed in my environment.
I have been experiencing this since version 5.10
[2025-05-13 10:19:56,092]::[ModelInstallService]::INFO --> Installer thread 140151217034944 exiting
Traceback (most recent call last):
File ".venv/bin/invokeai-web", line 12, in <module>
sys.exit(run_app())
^^^^^^^^^
File ".venv/lib/python3.12/site-packages/invokeai/app/run_app.py", line 92, in run_app
loop.run_until_complete(server.serve())
File "/home/user/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
self.run_forever()
File "/home/user/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
self._run_once()
File "/home/user/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
handle._run()
File "/home/user/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File ".venv/lib/python3.12/site-packages/uvicorn/server.py", line 69, in serve
with self.capture_signals():
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.local/share/uv/python/cpython-3.12.10-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 144, in __exit__
next(self.gen)
File ".venv/lib/python3.12/site-packages/uvicorn/server.py", line 330, in capture_signals
signal.raise_signal(captured_signal)
KeyboardInterrupt