dpkg hangs while unpacking replacement
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: dpkg
I tried to install libmoon (I know, I know) using apt-get. It hung while unpacking the replacement. The last message was: "Unpacking replacement libmoon". Eventually I had to kill it and reboot. From then on, everytime I ran apt-get it would retry the libmoon installation. Eventually I found a command to stop that from happening (I don't remember what it was). I was thinking it was just that one package. However, now its happening on the ifupdown package.
I'm pretty sure that its actually dpkg that's hanging. I tried running the following command and, sure enough, it hangs:
dpkg -i /var/cache/
If I turn on debugging, the last line I see is "deferred extract mass sync". Then nothing.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: dpkg 1.15.5.6ubuntu4.1
ProcVersionSign
Uname: Linux 2.6.32-
NonfreeKernelMo
Architecture: i386
Date: Wed Aug 25 15:39:10 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: dpkg
Related branches
- Tristan Seligmann: Approve
-
Diff: 201 lines (+56/-19)3 files modifiedconfig.py.sample (+1/-0)
kali/controller.py (+15/-10)
kali/protocol.py (+40/-9)
I found the code that was printing the "deferred extract mass sync" line. The next line was a Sync() call. That appears to be where it was hanging. So I tried the sync command from bash. It hung. Then it dawned on me that I had a corrupted USB drive plugged in (either no partition table to a corrupt one--not sure). As soon as I removed that device, sync began to work and I was able to install packages again.
It doesn't seem right that a corrupt USB drive could cause dpkg to hang. So, I'm not sure if I should close this or keep it open. I guess sync could be modified to handle that situation gracefully, or dpkg could be tweaked to detect a hung sync call. I probably don't have the bandwidth to contribute a patch either way. I'm just glad its working.