Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1154476
Summary: | [abrt] dnf: lock.py:64:_read_lock:ValueError: invalid literal for int() with base 10: '' | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mikhail <mikhail.v.gavrilov> | ||||||
Component: | dnf | Assignee: | Michal Luscon <mluscon> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 21 | CC: | akozumpl, bruce, fedora, jsilhan, mikhail.v.gavrilov, minkov.89, pantinor, pnemade, rholy, tla | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i686 | ||||||||
OS: | Unspecified | ||||||||
URL: | https://retrace.fedoraproject.org/faf/reports/bthash/3ef2a407378cc893c82e26f33524abc595e13fbd | ||||||||
Whiteboard: | abrt_hash:d253dd87b2ca2b5a4bcb7509b6d08946764bb5cd | ||||||||
Fixed In Version: | hawkey-0.5.3-2.fc21 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-02-20 08:32:10 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Mikhail
2014-10-20 03:24:11 UTC
Created attachment 948356 [details]
File: backtrace
Created attachment 948357 [details]
File: environ
Another user experienced a similar problem: [root@localhost ~]# dnf update Traceback (most recent call last): File "/bin/dnf", line 36, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1085, in run self._process_demands() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 812, in _process_demands load_available_repos=lar) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 212, in fill_sack with lock: File "/usr/lib/python2.7/site-packages/dnf/lock.py", line 85, in __enter__ pid = self._read_lock() File "/usr/lib/python2.7/site-packages/dnf/lock.py", line 64, in _read_lock return int(f.readline()) ValueError: invalid literal for int() with base 10: '' [root@localhost ~]# reporter: libreport-2.3.0 cmdline: /usr/bin/python -OO /bin/dnf update executable: /bin/dnf kernel: 3.17.0-301.fc21.i686 package: dnf-0.6.2-1.fc21 reason: lock.py:64:_read_lock:ValueError: invalid literal for int() with base 10: '' runlevel: N 5 type: Python uid: 0 Hi, thanks for the report. Did you run multiple instances of DNF or do you know what did you do unusually? Occurs unexpected power failure during the upgrade. Now dnf does not work. Then there should be some systemd command that would reset dnf lock after reboot. Problem is still there Same here: $ date Thu 4 Dec 10:30:06 CET 2014 $ dnf --version 0.6.2 Installed: dnf-0:0.6.2-1.fc21.noarch at 2014-11-08 17:36 Built : Fedora Project at 2014-10-03 12:40 Installed: rpm-0:4.12.0.1-3.fc21.x86_64 at 2014-11-08 15:34 Built : Fedora Project at 2014-10-28 09:48 $ sudo dnf clean all ; sudo dnf -d 10 update ... Completion plugin: Generating completion cache... --> Starting dependency resolution ---> Package kernel.x86_64 3.17.4-301.fc21 will be installed ---> Package kernel-modules-extra.x86_64 3.17.4-301.fc21 will be installed ---> Package kernel-core.x86_64 3.17.4-301.fc21 will be installed ---> Package kernel-modules.x86_64 3.17.4-301.fc21 will be installed ---> Package adwaita-gtk2-theme.x86_64 3.14.2-1.fc21 will be upgraded ---> Package adwaita-gtk2-theme.x86_64 3.14.2.2-1.fc21 will be an upgrade ---> Package gnome-themes-standard.x86_64 3.14.2-1.fc21 will be upgraded ---> Package gnome-themes-standard.x86_64 3.14.2.2-1.fc21 will be an upgrade ---> Package f21-backgrounds-base.noarch 21.0.0-1.fc21 will be upgraded ---> Package f21-backgrounds-base.noarch 21.1.0-1.fc21 will be an upgrade ---> Package f21-backgrounds-gnome.noarch 21.0.0-1.fc21 will be upgraded ---> Package f21-backgrounds-gnome.noarch 21.1.0-1.fc21 will be an upgrade ---> Package kernel-devel.x86_64 3.17.3-300.fc21 will be upgraded ---> Package kernel-devel.x86_64 3.17.4-301.fc21 will be an upgrade ---> Package kernel-headers.x86_64 3.17.3-300.fc21 will be upgraded ---> Package kernel-headers.x86_64 3.17.4-301.fc21 will be an upgrade ---> Package nautilus.x86_64 3.14.1-1.fc21 will be upgraded ---> Package nautilus.x86_64 3.14.2-1.fc21 will be an upgrade ---> Package nautilus-extensions.x86_64 3.14.1-1.fc21 will be upgraded ---> Package nautilus-extensions.x86_64 3.14.2-1.fc21 will be an upgrade ---> Package kernel.x86_64 3.16.7-200.fc20 will be erased ---> Package kernel-modules-extra.x86_64 3.16.7-200.fc20 will be erased --> Finished dependency resolution timer: depsolve: 1645 ms Dependencies resolved. ============================================================================================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================================================================================= Installing: kernel x86_64 3.17.4-301.fc21 fedora 42 k kernel-core x86_64 3.17.4-301.fc21 fedora 18 M kernel-modules x86_64 3.17.4-301.fc21 fedora 17 M kernel-modules-extra x86_64 3.17.4-301.fc21 fedora 2.2 M Upgrading: adwaita-gtk2-theme x86_64 3.14.2.2-1.fc21 fedora 87 k f21-backgrounds-base noarch 21.1.0-1.fc21 fedora 4.8 M f21-backgrounds-gnome noarch 21.1.0-1.fc21 fedora 8.0 k gnome-themes-standard x86_64 3.14.2.2-1.fc21 fedora 2.8 M kernel-devel x86_64 3.17.4-301.fc21 fedora 9.1 M kernel-headers x86_64 3.17.4-301.fc21 fedora 945 k nautilus x86_64 3.14.2-1.fc21 fedora 2.5 M nautilus-extensions x86_64 3.14.2-1.fc21 fedora 70 k Removing: kernel x86_64 3.16.7-200.fc20 @System 138 M kernel-modules-extra x86_64 3.16.7-200.fc20 @System 8.2 M Transaction Summary ============================================================================================================================================================================================================================================= Install 4 Packages Upgrade 8 Packages Remove 2 Packages Total download size: 58 M Is this ok [y/N]: y Downloading Packages: (1/12): kernel-3.17.4-301.fc21.x86_64.rpm 114 kB/s | 42 kB 00:00 (2/12): kernel-modules-extra-3.17.4-301.fc21.x86_64.rpm 254 kB/s | 2.2 MB 00:08 (3/12): adwaita-gtk2-theme-3.14.2.2-1.fc21.x86_64.rpm 275 kB/s | 87 kB 00:00 (4/12): gnome-themes-standard-3.14.2.2-1.fc21.x86_64.rpm 245 kB/s | 2.8 MB 00:11 (5/12): f21-backgrounds-base-21.1.0-1.fc21.noarch.rpm 293 kB/s | 4.8 MB 00:16 (6/12): f21-backgrounds-gnome-21.1.0-1.fc21.noarch.rpm 32 kB/s | 8.0 kB 00:00 (7/12): kernel-devel-3.17.4-301.fc21.x86_64.rpm 203 kB/s | 9.1 MB 00:45 (8/12): kernel-modules-3.17.4-301.fc21.x86_64.rpm 199 kB/s | 17 MB 01:27 (9/12): kernel-headers-3.17.4-301.fc21.x86_64.rpm 152 kB/s | 945 kB 00:06 (10/12): nautilus-extensions-3.14.2-1.fc21.x86_64.rpm 206 kB/s | 70 kB 00:00 (11/12): kernel-core-3.17.4-301.fc21.x86_64.rpm 202 kB/s | 18 MB 01:32 (12/12): nautilus-3.14.2-1.fc21.x86_64.rpm 410 kB/s | 2.5 MB 00:06 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 616 kB/s | 58 MB 01:36 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. timer: transaction test: 356 ms Running transaction Cleaning up. Traceback (most recent call last): File "/bin/dnf", line 36, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 141, in _main ret = resolving(cli, base) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving base.do_transaction() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 246, in do_transaction super(BaseCli, self).do_transaction(display) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 562, in do_transaction with lock: File "/usr/lib/python2.7/site-packages/dnf/lock.py", line 85, in __enter__ pid = self._read_lock() File "/usr/lib/python2.7/site-packages/dnf/lock.py", line 64, in _read_lock return int(f.readline()) ValueError: invalid literal for int() with base 10: '' I have been able to FIX my problem manually removing this .pid file: /var/lib/dnf/rpmdb_lock.pid it was empty, probably a result of some error or crash and it was never removed by dnf, failing as per stack trace above: File "/usr/lib/python2.7/site-packages/dnf/lock.py", line 64, in _read_lock return int(f.readline()) ValueError: invalid literal for int() with base 10: '' Assigning to our expert on locks. Michael, please take a look. You can either use systemd and implement `dnf.lock.release_all()` method or refactor _try_read_lock or any other solution. Same problem (backtrace) here, probably happened after an unexpected reboot. In my case the file /var/lib/dnf/rpmdb_lock.pid does not exist. Instead I found /var/cache/dnf/x86_64/21/metadata_lock.pid. After deleting this file (and running `# dnf clean expire-cache`, did that just to be sure metadata was not corrupted) dnf worked fine again. dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-2139/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 then log in and leave karma (feedback). hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. |