All of a sudden yum hangs on a Centos 4.5 (updated to the latest patch before 4.6) when I try to use it. "clean metadata" didn't help. The output of -d5 shows it gets to the point of "Reading Local RPMDB" and then sits there. The process doesn't die, but doesn't seem to do anything from that point on. strace shows this: futex(0xb76dcae8, FUTEX_WAIT, 2, NULL
I remember that futex hangs have been mentioned in the past when doing "big" updates from 4.x to 4.y, but this wasn't the case here. python-2.3.4-14.4 python-sqlite-1.1.7-1.2.1 sqlite-3.3.6-2 yum-2.4.3-3.el4.centos Kernel in use is not the latest 4.5 kernel, but one from 4.3. This shouldn't matter in this case, shouldn't it?
How can I resolve this? I see that one suggestion is rm /var/lib/rpm/__db*. How do I rebuild it then? I found that cleaning the metadata doesn't remove the sqlite databases, so I removed these from /var/yum/cache as well. The rebuilt databases were different, but it didn't solve the problem.
Kai
Hi,
I used to have exactly the same problem when the machine rebooted in the middle of an RPM installation or if the rpm process was killed -9.
On Jan 9, 2008 7:41 PM, Kai Schaetzl maillists@conactive.com wrote:
The process doesn't die, but doesn't seem to do anything from that point on. strace shows this: futex(0xb76dcae8, FUTEX_WAIT, 2, NULL ... How can I resolve this? I see that one suggestion is rm /var/lib/rpm/__db*. How do I rebuild it then?
You can just remove the __db* files (if you're sure they're there because of an rpm interrupted process, check first if there are no rpm processes running). __db* are Berkeley DB's lockfiles and are used for transactions inside Berkeley DB. You don't need to rebuild anything, the RPM database is on the other files on that directory. Once you remove the locks you'll be able to access it normally.
I found that cleaning the metadata doesn't remove the sqlite databases, so I removed these from /var/yum/cache as well. The rebuilt databases were different, but it didn't solve the problem.
You don't have to clean /var/yum/cache since that's yum's cache and the problem you have is with rpm. Cleaning it, however, won't hurt you, you'll only have to download the RPM again.
Hope it helps, Filipe
Filipe Brandenburger wrote on Fri, 11 Jan 2008 10:35:16 -0500:
You can just remove the __db* files (if you're sure they're there because of an
rpm interrupted process, check first if there are no rpm processes running). __db* are Berkeley DB's lockfiles and are used for transactions inside Berkeley DB. You don't need to rebuild anything, the RPM database is on the other files on that directory. Once you remove the locks you'll be able to access it normally.
Hm, the files are __db.001, __db.002 and __db.003 and range up to a size of over one MB, so they cannot be lockfiles. Yeah, maybe they are interim transaction files. After removing and doing an rpm query they are back there, in exactly the same size. I'd rather think they are indexes, there is no transaction necessary for a read query. Anyway, after removing and rebuilding them yum works! Thanks.
Kai