Client side crash after receiving PROBING storage response status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I quickly went through the first steps of the installation and Subiquity crashed with the below stack when reaching the file-system screen.
SourcePackage: subiquity
Title: Installer UI crashed with TypeError
Traceback:
Traceback (most recent call last):
File "/snap/
super().run()
File "/snap/
super().run()
File "/snap/
raise exc
File "/snap/
self.
File "/snap/
self._actions = self._actions_
File "/snap/
for action in config:
TypeError: 'NoneType' object is not iterable
As a response to the POST /storage/guided query, the client received a StorageResponse containing the status ProbeStatus.PROBING (and all other fields set to None) ; which it didn't expect.
The client should learn to expect this kind of answer or we should implement a mechanism to have the server wait until it finishes probing before responding.
Changed in subiquity: | |
status: | New → Fix Committed |
Changed in subiquity: | |
status: | Fix Committed → Fix Released |
The bug occurs when the user clicks on "Done" from the "Guided storage configuration" screen.
By the time we reach this screen, we can expect the original probing operation to be completed (otherwise we would have gotten the "Waiting for storage probing to complete") screen instead.
However, we have a hook on udev events that re-trigger the probing operation. Therefore, we can't reliably expect that no probing operation is ongoing when the user clicks on "Done". One way to reproduce the crash in dry-run mode is to add the following:
```
log.debug( data)
self. guided( data) ProbeStatus. PROBING.
async def guided_POST(self, data: GuidedChoice) -> StorageResponse:
+ self._udev_event()
return await self.GET()
```
this will simulate a udev event when the user clicks on done ; effectively making the probing operation restart. As the result, the HTTP response will have status=