HELP! I seem to have done something very bad (SVB) to rpm. And, it seems to be painfully reproducible (I did it to two machines). Short explanation: 1. Do some rpm command (I was using "rpm -e", I think). 2. Ctrl-C out. You won't get the shell prompt back. Now, that user account can no longer do any rpm commands from any session -- it always hangs. You can kill -9 the existing rpm processes, but nothing I've tried helps until reboot. Longer explanation: 1. I wanted to upgrade a couple of packages: perl-GD and perl-Chart. I don't know where I got the old packages :-( , but I made some new ones of my own. 2. Instead of doing "rpm -F", I forgot that the perl modules were installed from an rpm in an older perl library area, and I deleted the module files (rm). (oops) (Is this clear?) 3. When attempting to install the new rpm's, I got error messages, so I tried "rpm -e" on the old package. That failed due to dependencies, so I added "--nodep" to the command. This was taking a long time (hung?), so I ctrl-c'ed out. Now all rpm commands (from the root account) hung. 4. I rebooted this morning. The rpm commands were working ok (at least "rpm -qa" worked), so I tried "rpm -F <packageFileName>" (as root), and it's hung. 5. From another window (also as root), "rpm -qa" hangs again. 6. From a different account, "rpm -qa" works fine. HELP! 1. How do I fix things and get my new packages in? 2. Is the database corrupted? 3. If the database is corrupted, how do I fix it? Thanks, Bill
Bill Mills-Curran
Now, that user account can no longer do any rpm commands from any session -- it always hangs. You can kill -9 the existing rpm processes, but nothing I've tried helps until reboot.
Perhaps there is some kind of stale lock file sitting around? I don't use rpm, but I'd suggest running strace on the rpm command to see what the problem might be. strace rpm <args> -- Josh Huber
On Thu, 31 Oct 2002, Josh Huber wrote:
Bill Mills-Curran
writes: Now, that user account can no longer do any rpm commands from any session -- it always hangs. You can kill -9 the existing rpm processes, but nothing I've tried helps until reboot.
Perhaps there is some kind of stale lock file sitting around?
I don't use rpm, but I'd suggest running strace on the rpm command to see what the problem might be.
strace rpm <args>
-- Josh Huber
Josh, Just by coincidence, I just ran "strace -ppid" on the "locked-up" process. It's in a select/timeout loop. I just tried Charles Anderson's suggestion (his email came shortly after yours). That cured the lock-up. Now on to see if I can get something done... Thanks, Bill
Documented bug in rpm-4.1. To fix:
kill -9 the hung rpm process
rm -f /var/lib/rpm/__db*
If it still hangs, repeat that process and add this step:
rpm --rebuilddb
On Thu, Oct 31, 2002 at 09:52:31AM -0500, Bill Mills-Curran wrote:
subssn594> 2. Ctrl-C out. You won't get the shell prompt back.
subssn594> Now, that user account can no longer do any rpm commands from any
subssn594> session -- it always hangs. You can kill -9 the existing rpm
subssn594> processes, but nothing I've tried helps until reboot.
--
Charles R. Anderson
participants (3)
-
Bill Mills-Curran
-
Charles R. Anderson
-
Josh Huber