Bug 678644 - yum reinstall hangs
Summary: yum reinstall hangs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 15
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedBlocker
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-18 17:50 UTC by Orion Poplawski
Modified: 2014-01-21 23:17 UTC (History)
5 users (show)

Fixed In Version: rpm-4.9.0-0.rc1.3.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-03 03:03:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2011-02-18 17:50:02 UTC
Description of problem:

yum reinstall libsemanage
Loaded plugins: downloadonly, langpacks, refresh-packagekit
Adding en_US to language list
Setting up Reinstall Process
Resolving Dependencies
--> Running transaction check
---> Package libsemanage.x86_64 0:2.0.46-3.fc15 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================
 Package                 Arch               Version                    Repository          Size
================================================================================================
Reinstalling:
 libsemanage             x86_64             2.0.46-3.fc15              fedora             105 k

Transaction Summary
================================================================================================
Reinstall     1 Package(s)

Total download size: 105 k
Installed size: 197 k
Is this ok [y/N]: y
Downloading Packages:
libsemanage-2.0.46-3.fc15.x86_64.rpm                                     | 105 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libsemanage-2.0.46-3.fc15.x86_64                                             1/1 

hangs there.

ps -ft pts/0
UID        PID  PPID  C STIME TTY          TIME CMD
root     17557 20795  2 17:45 pts/0    00:00:02 /usr/bin/python /usr/bin/yum reinstall libsemana
root     20795 20792  0 16:43 pts/0    00:00:00 -bash
[root@vmrawhide ~]# strace -fp 17557
Process 17557 attached - interrupt to quit
futex(0x7ff1d30c32dc, FUTEX_WAIT, 1, NULL^C <unfinished ...>
Process 17557 detached

Must kill 9, then:

# yum reinstall libsemanage
Freeing read locks for locker 0xa: 17557/140676818183968
Freeing read locks for locker 0xb: 17557/140676818183968
Freeing read locks for locker 0xc: 17557/140676818183968
Freeing read locks for locker 0x29: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x2b: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x2c: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x2d: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x2e: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x2f: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x30: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x31: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x32: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x33: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x34: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x35: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
Freeing read locks for locker 0x36: 17557/140676818183968
error: rpmdb: Thread/process 17557/140676818183968 failed: locker has write locks
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

Removing the /var/lib/rpm/__db.* get it working again.

Version-Release number of selected component (if applicable):
rpm-4.9.0-0.rc1.1.fc15.x86_64
yum-3.2.29-4.fc15.noarch

How reproducible:
Every reinstall

yum upgrade appears to work fine

Comment 1 Orion Poplawski 2011-02-18 17:54:23 UTC
Downgrading to rpm-4.9.0-0.beta1.7.fc15.1.x86_64 did not appear to help.

Comment 2 Andre Robatino 2011-02-18 18:11:01 UTC
Yes, I did a clean install from TC2 x86_64 last night, installed fedora-release*-15-0.7 from Koji, then updated, then after trying to reinstall fedora-release*-15-0.7, it hung. I don't have the VM any more, though.

Comment 3 Andre Robatino 2011-02-18 18:35:30 UTC
Just did a text-based install from the x86_64 TC2 DVD, brought up the network, did "yum reinstall fedora-release", and it hung.

Comment 4 Jason Tibbitts 2011-02-18 18:39:01 UTC
I'm seeing this as well on rawhide.

rpm-4.9.0-0.rc1.1.fc16.x86_64
yum-3.2.29-4.fc15.noarch

Comment 5 Andre Robatino 2011-02-18 18:58:24 UTC
I can reproduce it in the same way on i386, so you can change the Platform to "All Linux". (And due to comment 4, you could change the Version to "rawhide".)

Comment 6 Orion Poplawski 2011-02-18 19:27:35 UTC
I can't reproduce with rpm -Uvh --force libsemanage-2.0.46-3.fc15.x86_64.rpm.  Not sure what yum is doing that would be different.

Comment 7 Adam Williamson 2011-02-18 19:47:04 UTC
Discussed at 2011-02-18 blocker review meeting. Rejected as blocker, does not hit Alpha criteria: updating does not require --reinstall to work.

Comment 8 Andre Robatino 2011-02-19 05:58:04 UTC
Using "rpm -Uvh --replacepkgs fedora-release-15-0.7.noarch.rpm" works for me. Trying to use yum shell with an erase and install command as a substitute for yum reinstall works if the package is getting updated (so there are two separate transactions) but not if the package is already updated (so it says it is reinstalling and only does one transaction).

Comment 9 Andre Robatino 2011-02-19 06:04:05 UTC
Never mind, erase followed by install would be more or less equivalent to an update when the package changes. I think that in general using rpm might require both the --replacefiles and --replacepkgs options (but not --oldpackage).

Comment 10 Panu Matilainen 2011-02-19 16:27:52 UTC
Right, I can easily reproduce this. It appears to deadlock on rpmdb access, and be related to yum using two different handles to the rpmdb (making it use just one fixes the hang). It doesn't happen with rpm 4.8.x though... so while yum is at least in part guilty here, I need to check what causes the difference between 4.8 and 4.9 here.

Comment 11 Panu Matilainen 2011-02-21 09:22:15 UTC
Fixed in rpm-4.9.0-0.rc1.3 (fc15/16). Yum is indeed being a bit naughty, but there was a real rpm bug (regression) involved, good thing it was caught.

Comment 12 Fedora Update System 2011-02-21 09:28:34 UTC
rpm-4.9.0-0.rc1.3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/rpm-4.9.0-0.rc1.3.fc15

Comment 13 Fedora Update System 2011-02-21 20:38:17 UTC
rpm-4.9.0-0.rc1.3.fc15 has been pushed to the Fedora 15 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpm'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rpm-4.9.0-0.rc1.3.fc15

Comment 14 Fedora Update System 2011-03-03 03:02:46 UTC
rpm-4.9.0-0.rc1.3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.