ubiquity crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'

Bug #1845730 reported by Brett Bogert
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

One Last piece of info.. Here is the info on what changed the path
for udevadm:

systemd (242-1) experimental; urgency=medium

  * New upstream version 242
    - Change ownership/mode of the execution directories also for static users
      (Closes: #919231)
    - A new boolean sandboxing option RestrictSUIDSGID= has been added that is
      built on seccomp. When turned on, creation of SUID/SGID files is
      prohibited. The NoNewPrivileges= and the new RestrictSUIDSGID= options
      are now implied if DynamicUser= is turned on for a service.
      (Closes: #928102, CVE-2019-3843, CVE-2019-3844)
  * Drop Revert-udev-network-device-renaming-immediately-give.patch.
    This patch needs ongoing maintenance work to be adapted to new releases
    and fails to apply with v242. Instead of investing more time into it we
    are going to drop the patch as it was a hack anyway.
  * Rebase patches
  * Drop pre-stretch migration code
> * Drop /sbin/udevadm compat symlink (Closes: #852580)
  * socket-util: Make sure flush_accept() doesn't hang on unexpected
    EOPNOTSUPP
  * Enable regexp matching support in journalctl using pcre2 (Closes: #898892)
  * Switch from libidn to libidn2 (Closes: #928615)

One wierd thing though is that the udev package files list shows that
udevadm should be in /bin/udevadm yet there seem to be 2 copies:

:~$ ll /bin/udevadm
-rwxr-xr-x 1 root root 678312 Sep 12 04:28 /bin/udevadm*

:~$ ll /usr/bin/udevadm
-rwxr-xr-x 1 root root 678312 Sep 12 04:28 /usr/bin/udevadm*

an artifact maybe or design intent ?

Version of udev shows 242+ so this change is applied.

:~$ dpkg --list | grep udev

ii udev 242-6ubuntu1 amd64 /dev/ and hotplug management daemon

The Fix,

Ok.. After more investigation the problem is coming from moving udevadm
from /sbin/udevadm to /usr/bin/udevadm:

In the nm.py line 39 in the get_vendor_and_model method the CMD path is
hardcoded to /sbin/udevadm but the command is now in /usr/bin/udevadm:

def get_vendor_and_model(udi):
    vendor = ''
    model = ''
    cmd = ['/sbin/udevadm', 'info', '--path=%s' % udi, '--query=property']
    with open('/dev/null', 'w') as devnull:
        out = subprocess.Popen(
            cmd, stdout=subprocess.PIPE, stderr=devnull,
            universal_newlines=True)
        out = out.communicate()
    if not out[1]:
        for prop in out[0].split('\n'):
            if prop.startswith('ID_VENDOR_FROM_DATABASE'):
                vendor = prop.split('ID_VENDOR_FROM_DATABASE=')[1]
            elif prop.startswith('ID_MODEL_FROM_DATABASE'):
                model = prop.split('ID_MODEL_FROM_DATABASE=')[1]
    return (vendor, model)

ubuntu@ubuntu:~$ which udevadm
/usr/bin/udevadm

So I hacked nm.py in my live image and reran the installer and it installed
fine.

So the fix is simply to change the path for udevadm to /usr/bin instead of
/sbin on line 39 of nm.py

I hope this is a one-off and not a "let's clean up /sbin" activity
otherwise we might be chasing more of these during the beta cycle.

Thanks for all of your hard work,
WolfLand

The problem:

This happened when I tried to start the installer(which never appeared). This worked fine prior to the beta on 2 other machines(1-Intel based, 1-AMD/radeon based). No sure what's happening but the installer just will not run.

According to /var/log/installer/debug we are missing the following:

FileNotFoundError: [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'

I have verified that this file/directory does not exist on any of my 3 ubuntu 19.10 systems.

This error seems to be coming from nm.py get_vendor_and_model.

This computer does have a different vendor and model of wireless device but was working fine
in 19.04 with built in drivers.

Here is the output from the /var/log/installer/debug file:

Ubiquity 19.10.12
/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py:54: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk, GObject, GLib, Atk, Gio
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version('NM', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import NM, NMA
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NMA was imported without specifying a version first. Use gi.require_version('NMA', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import NM, NMA
/usr/lib/ubiquity/plugins/ubi-timezone.py:195: PyGIWarning: TimezoneMap was imported without specifying a version first. Use gi.require_version('TimezoneMap', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import TimezoneMap
No such schema “org.gnome.nautilus.desktop”
Failed to play sound: Not available
update_release_notes_label()
update_release_notes_label()
Could not translate page (prepare): 'NoneType' object has no attribute 'replace'
/usr/lib/ubiquity/plugins/ubi-console-setup.py:72: Warning: Source ID 255 was not found when attempting to remove it
  GLib.source_remove(self.keyboard_layout_timeout_id)
/usr/lib/ubiquity/plugins/ubi-console-setup.py:74: Warning: Source ID 258 was not found when attempting to remove it
  GLib.source_remove(self.keyboard_variant_timeout_id)
/usr/lib/ubiquity/plugins/ubi-timezone.py:98: PyGIWarning: Soup was imported without specifying a version first. Use gi.require_version('Soup', '2.4') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GObject, GLib, Soup

(process:31878): dconf-WARNING **: 12:47:33.650: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=8d82213026304d77bfb0df9b03bf8fbd --binary-syntax --close-stderr”: Child process exited with code 1

(process:31919): dconf-WARNING **: 12:47:34.555: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=8d82213026304d77bfb0df9b03bf8fbd --binary-syntax --close-stderr”: Child process exited with code 1

(process:31927): dconf-WARNING **: 12:47:34.630: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=8d82213026304d77bfb0df9b03bf8fbd --binary-syntax --close-stderr”: Child process exited with code 1

(process:31932): dconf-WARNING **: 12:47:34.676: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=8d82213026304d77bfb0df9b03bf8fbd --binary-syntax --close-stderr”: Child process exited with code 1

(process:31937): dconf-WARNING **: 12:47:34.998: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=8d82213026304d77bfb0df9b03bf8fbd --binary-syntax --close-stderr”: Child process exited with code 1
Gdk-Message: 12:47:35.015: ubiquity: Fatal IO error 0 (Success) on X server :0.

Ubiquity 19.10.12
/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py:54: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk, GObject, GLib, Atk, Gio
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version('NM', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import NM, NMA
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NMA was imported without specifying a version first. Use gi.require_version('NMA', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import NM, NMA
Exception in GTK frontend (invoking crash handler):
Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 330, in __init__
    self.view = NetworkManagerTreeView(self.state_changed)
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 102, in __init__
    state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 120, in __init__
    self.start(state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 140, in start
    self.build_cache()
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 237, in build_cache
    vendor, model = get_vendor_and_model(udi)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 43, in get_vendor_and_model
    universal_newlines=True)
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'

Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 330, in __init__
    self.view = NetworkManagerTreeView(self.state_changed)
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 102, in __init__
    state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 120, in __init__
    self.start(state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 140, in start
    self.build_cache()
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 237, in build_cache
    vendor, model = get_vendor_and_model(udi)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 43, in get_vendor_and_model
    universal_newlines=True)
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'
Ubiquity 19.10.12
/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py:54: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk, GObject, GLib, Atk, Gio
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version('NM', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import NM, NMA
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NMA was imported without specifying a version first. Use gi.require_version('NMA', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import NM, NMA
Exception in GTK frontend (invoking crash handler):
Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 330, in __init__
    self.view = NetworkManagerTreeView(self.state_changed)
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 102, in __init__
    state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 120, in __init__
    self.start(state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 140, in start
    self.build_cache()
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 237, in build_cache
    vendor, model = get_vendor_and_model(udi)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 43, in get_vendor_and_model
    universal_newlines=True)
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'

Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 330, in __init__
    self.view = NetworkManagerTreeView(self.state_changed)
  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py", line 102, in __init__
    state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 120, in __init__
    self.start(state_changed)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 140, in start
    self.build_cache()
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 237, in build_cache
    vendor, model = get_vendor_and_model(udi)
  File "/usr/lib/ubiquity/ubiquity/nm.py", line 43, in get_vendor_and_model
    universal_newlines=True)
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'

Hope this helps and I am going to try again and see if I get the same result,

Thanks

ProblemType: Crash
DistroRelease: Ubuntu 19.10
Package: ubiquity 19.10.12 [modified: usr/share/ubiquity/apt-setup]
ProcVersionSignature: Ubuntu 5.3.0-12.13-generic 5.3.0
Uname: Linux 5.3.0-12-generic x86_64
ApportVersion: 2.20.11-0ubuntu7
Architecture: amd64
CasperVersion: 1.419
Date: Fri Sep 27 16:40:12 2019
ExecutablePath: /usr/lib/ubiquity/bin/ubiquity
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper iso-scan/filename= quiet splash --
InterpreterPath: /usr/bin/python3.7
LiveMediaBuild: Ubuntu 19.10 - Release amd64
ProcCmdline: /usr/bin/python3 /usr/lib/ubiquity/bin/ubiquity gtk_ui
ProcEnviron:
 LANGUAGE=en_US
 TERM=unknown
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Python3Details: /usr/bin/python3.7, Python 3.7.4+, python3-minimal, 3.7.3-1
PythonArgs: ['/usr/lib/ubiquity/bin/ubiquity', 'gtk_ui']
PythonDetails: /usr/bin/python2.7, Python 2.7.16+, python-minimal, 2.7.16-1
SourcePackage: ubiquity
Title: ubiquity crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Brett Bogert (bbogert24) wrote :
tags: removed: need-duplicate-check
Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
Brett Bogert (bbogert24)
description: updated
Brett Bogert (bbogert24)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Rik Mills (rikmills)
Changed in ubiquity (Ubuntu):
importance: Medium → Critical
information type: Private → Public
tags: added: rls-ee-incoming
Revision history for this message
Rik Mills (rikmills) wrote :

Probably obvious, but I'll say for the record. I see this on a laptop with failure to load try/install screen, and launch from live session, where the laptop has only wireless to configure. Not seen on a Vbox VM with its emulated ethernet connection there.

Revision history for this message
Brett Bogert (bbogert24) wrote : Re: [Bug 1845730] Re: ubiquity crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: '/sbin/udevadm': '/sbin/udevadm'

Rik,

       Makes sense as I did all of my initial testing on a machine that is
       connected via ethernet but my daily driver is connected via wireless.

       This would explain why I did not catch this before the beta.

On 9/30/19 2:31 AM, Rik Mills wrote:
> Probably obvious, but I'll say for the record. I see this on a laptop
> with failure to load try/install screen, and launch from live session,
> where the laptop has only wireless to configure. Not seen on a Vbox VM
> with its emulated ethernet connection there.
>

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 19.10.13

---------------
ubiquity (19.10.13) eoan; urgency=medium

  [ Jean-Baptiste Lallement ]
  * scripts/install.py: Replaced removed property Package.section by
    Version.section (LP: #1845593)

  [ Iain Lane ]
  * nm.py: Stop referencing udevadm by absolute path
    systemd 242-6ubuntu1 dropped a `/sbin/ubiquity` compatibility symlink
    that we were referencing by absolute path. This broke ubiquity when run
    on a system with a wireless adapter. Fix this by not referencing an
    absolute path but using normal $PATH lookup instead. (LP: #1845730)

 -- Iain Lane <email address hidden> Fri, 27 Sep 2019 09:44:57 +0200

Changed in ubiquity (Ubuntu):
status: Confirmed → 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.