console-conf crashes configuring wlan on uc20 pi

Bug #1878960 reported by Ian Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
Fix Released
Undecided
Unassigned

Bug Description

When trying to configure wlan via console-conf in UC20 running on Raspberry Pi 4, it crashes thusly:

cwayne18@ubuntu:/var/log/console-conf$ cat subiquity-info.log.1009
2020-04-01 17:24:54,592 INFO console_conf:74 Starting console-conf v0.0.5
2020-04-01 17:24:54,592 INFO console_conf:75 Arguments passed: ['/usr/bin/console-conf']
2020-04-01 17:24:55,937 INFO console_conf/Welcome:479 start: starting UI
2020-04-01 17:24:56,712 INFO console_conf/Welcome:484 finish: completed SUCCESS
2020-04-01 17:24:56,713 INFO console_conf/Network:479 start: starting UI
2020-04-01 17:24:56,731 INFO console_conf/Network/apply_config:479 start: silent=True
2020-04-01 17:24:57,083 INFO console_conf/Network/apply_config:484 finish: silent=True SUCCESS
2020-04-01 17:24:59,104 ERROR subiquitycore.core:688 Exception in controller.run():
Traceback (most recent call last):
  File "/usr/share/subiquity/subiquitycore/core.py", line 686, in run
    self.urwid_loop.run()
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 286, in run
    self._run()
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 384, in _run
    self.event_loop.run()
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 1484, in run
    reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/urwid/compat.py", line 58, in reraise
    raise value
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 403, in <lambda>
    wrapper = lambda: self.parse_input(
  File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 502, in parse_input
    callback(processed, processed_codes)
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 411, in _update
    self.process_input(keys)
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 511, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/usr/lib/python3/dist-packages/urwid/wimp.py", line 648, in keypress
    return self._current_widget.keypress(size, key)
  File "/usr/lib/python3/dist-packages/urwid/container.py", line 594, in keypress
    return self.top_w.keypress(self.top_w_size(size,
  File "/usr/share/subiquity/subiquitycore/ui/actionmenu.py", line 104, in keypress
    return super().keypress(size, key)
  File "/usr/lib/python3/dist-packages/urwid/container.py", line 1590, in keypress
    key = self.focus.keypress(tsize, key)
  File "/usr/lib/python3/dist-packages/urwid/container.py", line 2271, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/usr/share/subiquity/subiquitycore/ui/container.py", line 447, in keypress
    return lb.keypress(size, key)
  File "/usr/share/subiquity/subiquitycore/ui/container.py", line 321, in keypress
    upkey = super().keypress(size, downkey)
  File "/usr/lib/python3/dist-packages/urwid/listbox.py", line 999, in keypress
    key = focus_widget.keypress((maxcol,),key)
  File "/usr/lib/python3/dist-packages/urwid/wimp.py", line 540, in keypress
    self._emit('click')
  File "/usr/lib/python3/dist-packages/urwid/widget.py", line 460, in _emit
    signals.emit_signal(self, name, self, *args)
  File "/usr/lib/python3/dist-packages/urwid/signals.py", line 265, in emit
    result |= self._call_callback(callback, user_arg, user_args, args)
  File "/usr/lib/python3/dist-packages/urwid/signals.py", line 295, in _call_callback
    return bool(callback(*args_to_pass))
  File "/usr/share/subiquity/subiquitycore/ui/actionmenu.py", line 97, in click
    self.parent._action(value)
  File "/usr/share/subiquity/subiquitycore/ui/actionmenu.py", line 143, in _action
    self._emit("action", action)
  File "/usr/lib/python3/dist-packages/urwid/widget.py", line 460, in _emit
    signals.emit_signal(self, name, self, *args)
  File "/usr/lib/python3/dist-packages/urwid/signals.py", line 265, in emit
    result |= self._call_callback(callback, user_arg, user_args, args)
  File "/usr/lib/python3/dist-packages/urwid/signals.py", line 295, in _call_callback
    return bool(callback(*args_to_pass))
  File "/usr/share/subiquity/subiquitycore/ui/views/network.py", line 146, in _action
    meth("{}/{}".format(device.name, action.name), device)
  File "/usr/share/subiquity/subiquitycore/ui/views/network.py", line 68, in impl
    stretchy = cls(self, device, *args)
  File "/usr/share/subiquity/subiquitycore/ui/views/network_configure_wlan_interface.py", line 77, in __init__
    if self.device.configured_ssid is not None:
AttributeError: 'NetworkDev' object has no attribute 'configured_ssid'

This is with core20 snap rev 620 for arm64.

Tags: uc20
tags: added: core20
tags: added: uc20
removed: core20
Michael Vogt (mvo)
Changed in snapd:
importance: Undecided → Critical
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Changed in subiquity:
status: New → In Progress
no longer affects: snapd
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

The most recent builds for amd64/armhf/arm64 in here should have a fix for this

https://launchpad.net/~xnox/+snap/xnox-core20

Also available in edge/xnox-consoleconf-fixes

Trying to build images with these in place, but it's very slow for me for some reason.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Images available at https://people.canonical.com/~xnox/uc20/

Please test them and let me know if this issue is now resolved for you, or can be reproduced still.

Revision history for this message
Ian Johnson (anonymouse67) wrote :

This does not work yet, I tried configuring wlan by editing the ssid/password and it did not automatically enable dhcp on ipv4, so I tried to manually do that and console-conf crashed. After trying again after the crash, it seems it was able to make it past that so I was able to create a user.

Logs from /var/log/console-conf attached. Note that I had to manually redact my password since it seems this version of console-conf suffers from https://bugs.launchpad.net/subiquity/+bug/1879381 in case anyone else who tries this wants to help by uploading their logs.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Jonathan Cave (jocave) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@jocave

the fixes i'm proposed are not available in images from cdimage.ubuntu.com.

I only test building merge proposals, as I have no Pi hardware to test this on.

Refreshed images with patch mentioned in #5 are now available from
https://people.canonical.com/~xnox/uc20/

Please let me know if those work, before this gets to 20/dangerous images.

Revision history for this message
Ian Johnson (anonymouse67) wrote :

I tested the new image with core20 rev 637 for the other bug and configuring wifi did not crash at all this time for me, but still I had no ip addr automatically, and had to go to the wlan interface and switch ipv4 to automatic dhcp manually to get an ip addr, but after this I was able to use console-conf and login w/o a problem.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

All fixes for this issue landed in edge on Friday. Please confirm this is ok to promote to beta.

Changed in subiquity (Ubuntu):
status: New → Fix Committed
Changed in subiquity:
status: In Progress → Fix Committed
no longer affects: subiquity (Ubuntu)
Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

I tested this on an arm64 rpi4 (1 GB) with core20 663 from edge, other snaps from beta. On install both interfaces are detected and wlan0 is disabled. If I try to enable it it crashes with the following backtrace:

Traceback (most recent call last):
  File "/usr/bin/console-conf", line 11, in <module>
    load_entry_point('subiquity==0.0.5', 'console_scripts', 'console-conf-tui')()
  File "/usr/share/subiquity/console_conf/cmd/tui.py", line 86, in main
    interface.run()
  File "/usr/share/subiquity/subiquitycore/core.py", line 676, in run
    self.urwid_loop.run()
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 286, in run
    self._run()
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 384, in _run
    self.event_loop.run()
  File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 1484, in run
    reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/urwid/compat.py", line 58, in reraise
    raise value
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/share/subiquity/subiquitycore/async_helpers.py", line 26, in _done
    fut.result()
  File "/usr/share/subiquity/subiquitycore/context.py", line 142, in decorated_async
    return await meth(self, **kw)
  File "/usr/share/subiquity/subiquitycore/controllers/network.py", line 436, in _apply_config
    await arun_command(['netplan', 'apply'], check=True)
  File "/usr/share/subiquity/subiquitycore/utils.py", line 85, in arun_command
    raise subprocess.CalledProcessError(proc.returncode, cmd)
subprocess.CalledProcessError: Command '['netplan', 'apply']' returned non-zero exit status 78.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

$ errno -l | grep 78
EREMCHG 78 Remote address changed

I am confused about non-zero exit status 78

I wonder if you can boot with eth0 and wlan.
Configure console-conf for eth0, and ssh in.
Wite console-conf state fun, and run console-conf over ssh again, configure wifi, and crash it.
Run netplan apply by hand, and figure out what went wrong.

This sounds very weird.

Revision history for this message
Michael Vogt (mvo) wrote :

Fwiw, configuring the wlan on my Pi3 works correctly now.

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

I tried to reconfigure and reinstall the same image a couple of times, and couldn't reproduce the crash anymore. Both interfaces are configured correctly. So it seems that it's something to keep an eye on, but doesn't seem to happen very frequently.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

this crash was fixed in May 2020

Changed in subiquity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.