/usr/bin/ubuntu-drivers:PermissionError:/usr/bin/ubuntu-drivers@480:__call__:main:invoke:invoke:invoke:new_func:invoke:autoinstall:command_install

Bug #1913651 reported by errors.ubuntu.com bug bridge
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Fix Released
High
Unassigned
Bionic
Won't Fix
Undecided
Unassigned
Focal
Fix Released
High
Unassigned
Groovy
Won't Fix
High
Alberto Milone

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding ubuntu-drivers-common. This problem was most recently seen with package version 1:0.8.6.3~0.20.10.1, the problem page at https://errors.ubuntu.com/problem/a5320fbf71298787ff2595cc2b8227783b068dae contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.

There is also this bucket:
https://errors.ubuntu.com/problem/fb18ad88544e0c025b2c9ec591b91c080d23401d

If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Revision history for this message
Brian Murray (brian-murray) wrote :

Here's the Traceback:

Traceback (most recent call last):
  File "/usr/bin/ubuntu-drivers", line 480, in <module>
    greet()
  File "/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/bin/ubuntu-drivers", line 418, in autoinstall
    command_install(config)
  File "/usr/bin/ubuntu-drivers", line 160, in command_install
    pm_fd = open('/run/nvidia_runtimepm_supported', 'w')
PermissionError: [Errno 13] Permission denied: '/run/nvidia_runtimepm_supported'

A regular user cannot write to '/run'.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

xnox suggests using $XDG_RUNTIMEDIR which is /run/user/1000 and writable.

Also using 'with open' would be better.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Triaged
Changed in ubuntu-drivers-common (Ubuntu Focal):
status: New → Triaged
Changed in ubuntu-drivers-common (Ubuntu):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Focal):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Groovy):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted ubuntu-drivers-common into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.8.6.4~0.20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-drivers-common (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

I verified this by using ubuntu-drivers in a chroot on a system with nvidia but "runtimepm" isn't supported on my system so I had to change the check for it from "if packages[p].get('runtimepm'):" to "if True:". After doing that I received the original Traceback:

...
  File "/usr/bin/ubuntu-drivers", line 161, in command_install
    pm_fd = open('/run/nvidia_runtimepm_supported', 'w')
PermissionError: [Errno 13] Permission denied: '/run/nvidia_runtimepm_supported'

Now for the verification:

Preparing to unpack .../ubuntu-drivers-common_1%3a0.8.6.4~0.20.04.1_amd64.deb ...
Unpacking ubuntu-drivers-common (1:0.8.6.4~0.20.04.1) over (1:0.8.6.3~0.20.04.2) ...
Setting up ubuntu-drivers-common (1:0.8.6.4~0.20.04.1) ...
(focal-amd64)root@impulse:~# vi /usr/bin/ubuntu-drivers
(focal-amd64)root@impulse:~# sudo -i -u ubuntu
(focal-amd64)ubuntu@impulse:~$ ubuntu-drivers install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.8.6.4~0.20.04.1

---------------
ubuntu-drivers-common (1:0.8.6.4~0.20.04.1) focal; urgency=medium

  * ubuntu-drivers:
    - Don't error out when failing to write to /run without
      root privileges (LP: #1913651), since package
      installation will fail later.
    - Restore "--package-list" for list-oem, which was supported
      but accidentally not exposed in the transition to click.
      (LP: #1914051).

 -- Alberto Milone <email address hidden> Mon, 01 Feb 2021 18:49:18 +0100

Changed in ubuntu-drivers-common (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-drivers-common has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in ubuntu-drivers-common (Ubuntu Groovy):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.8.6.5

---------------
ubuntu-drivers-common (1:0.8.6.5) hirsute; urgency=medium

  * tests/test_ubuntu_drivers.py:
    - Add testcase for list-oem --package-list.
  * UbuntuDrivers/detect.py:
    - Fix the way we validate the nvidia modules metapackages
      (LP: #1914374).

 -- Alberto Milone <email address hidden> Wed, 03 Feb 2021 19:13:21 +0100

Changed in ubuntu-drivers-common (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted ubuntu-drivers-common into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.0~0.20.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-drivers-common (Ubuntu Groovy):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-groovy
removed: verification-done
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted ubuntu-drivers-common into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.0~0.18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Andy Whitcroft (apw) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted ubuntu-drivers-common into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.0~0.18.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in ubuntu-drivers-common (Ubuntu Groovy):
status: Fix Committed → Won't Fix
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Proposed package removed from archive

The version of ubuntu-drivers-common in the proposed pocket of Bionic that was purported to fix this bug report has been removed because the bugs that were to be fixed by the upload were not verified in a timely (105 days) fashion.

tags: removed: verification-needed-bionic
Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: Fix Committed → Won't Fix
tags: removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Proposed package upload rejected

An upload of ubuntu-drivers-common to bionic-proposed has been rejected from the upload queue for the following reason: "It doesn't seem like there is any interested in testing or organizing testing of this update. If someone turns up we can always accept the package from the rejected queue.".

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.