[Bug 2146422] Re: Installer UI crashed with ServerDisconnectedError
Olivier Gayot
2146422 at bugs.launchpad.net
Thu Mar 26 18:35:26 UTC 2026
I investigated the issue and managed to reproduce it once on amd64.
So this isn't strictly specific to riscv but only seems to occur if two
or more Subiquity clients run.
When testing on riscv, I get a subiquity client for serial and another
for the tty.
The --serial option of kvm-test allows having the same in amd64.
Observed behavior
-----------------
* A newly spawned client failed with ServerDisconnectedError right after a refresh.
* After refresh, I found 3 different server log files (and only expected two - one before refresh, and one after).
lrwxrwxrwx 1 root root 31 Mar 26 16:53 subiquity-server-debug.log -> subiquity-server-debug.log.2342
-rw------- 1 root root 134897 Mar 26 16:53 subiquity-server-debug.log.1716
-rw------- 1 root root 26125 Mar 26 16:53 subiquity-server-debug.log.2240
-rw------- 1 root root 45629 Mar 26 17:13 subiquity-server-debug.log.2342
* The hierarchy of processes also showed some inconsistency. Process
2240 was supposedly a server process (see above) but is now showing as a
shell process (which spawned a server).
2204 root 20 0 2888 1816 1700 S 0.0 0.0 0:00.05 `- /bin/sh /snap/subiquity/7147/usr/bin/subiquity-server
2240 root 20 0 2888 2036 1924 S 0.0 0.0 0:02.00 | `- /bin/sh /snap/subiquity/7147/usr/bin/subiquity-server
2342 root 20 0 392M 88488 21476 S 0.0 1.1 0:01.85 | `- /snap/subiquity/7147/usr/bin/python3.12 -m subiquity.cmd.server
Explanation
-----------
* Server process 1716 was the server process before refresh
* Server process 2240 was the new server process after refresh. But it somehow was forced to restart and ended up executing os.execvp(["snap", "run", "subiquity-server"])
* as a consequence, it "turned" into the "snap" process, and in turn ended up spawning yet another server process (i.e., PID 2342)
Why server 2240 was forced to restart?
---------------------------------------
* it turned out that GET refresh/progress?change_id="x" causes a server
restart if change x is a snap change ID in the "Done" state.
https://github.com/canonical/subiquity/blob/e422d4239fdc2491b3808e63bf77f165276c53a1/subiquity/server/controllers/refresh.py#L225-L242
[...]
2026-03-26 16:53:47,074 DEBUG curtin.reporting.start.subiquity/Refresh/progress_GET:45 start: subiquity/Refresh/progress_GET:
2026-03-26 16:53:47,074 DEBUG subiquity.common.api.server:83 /refresh/progress waiting on start
[...]
2026-03-26 16:53:47,724 DEBUG subiquity.common.api.server:85 /refresh/progress resuming
* One of the clients likely didn't stop immediately upon refresh, and
ended sending a /refresh/progress query to the newly created server
process - triggering a restart.
* In the meantime, a newly created client crashed because the server
decided to restart.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2146422
Title:
Installer UI crashed with ServerDisconnectedError
Status in subiquity package in Ubuntu:
In Progress
Bug description:
I tried to install current resolute-live-server-riscv64.iso. subiquity
26.04-beta+git12.e422d423 failed with the error below. Full logs
appended.
SnapUpdated: True
SourcePackage: subiquity
Tags: subiquity
Title: Installer UI crashed with ServerDisconnectedError
Traceback:
Traceback (most recent call last):
File "/snap/subiquity/7156/lib/python3.12/site-packages/subiquity/client/client.py", line 426, in run
await super().run()
File "/snap/subiquity/7156/lib/python3.12/site-packages/subiquitycore/tui.py", line 390, in run
await super().run()
File "/snap/subiquity/7156/lib/python3.12/site-packages/subiquitycore/core.py", line 133, in run
raise exc
File "/snap/subiquity/7156/lib/python3.12/site-packages/subiquity/client/client.py", line 367, in start
variant = await self.client.meta.client_variant.GET()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/subiquity/7156/lib/python3.12/site-packages/subiquity/common/api/client.py", line 75, in impl
async with make_request(
File "/snap/subiquity/7156/usr/lib/python3.12/contextlib.py", line 210, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/snap/subiquity/7156/lib/python3.12/site-packages/subiquity/common/api/client.py", line 168, in make_request
async with session.request(
File "/snap/subiquity/7156/usr/lib/python3/dist-packages/aiohttp/client.py", line 1187, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/snap/subiquity/7156/usr/lib/python3/dist-packages/aiohttp/client.py", line 601, in _request
await resp.start(conn)
File "/snap/subiquity/7156/usr/lib/python3/dist-packages/aiohttp/client_reqrep.py", line 965, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/snap/subiquity/7156/usr/lib/python3/dist-packages/aiohttp/streams.py", line 622, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/2146422/+subscriptions
More information about the foundations-bugs
mailing list