Emacs upgrade hangs: preinst should avoid lsof
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
emacs22 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
In Ubuntu 9.04, apt-get upgrade of emacs fails and hangs:
(Läser databasen ... 237426 filer och kataloger installerade.)
Förbereder att ersätta emacs22-gtk 22.2-0ubuntu2 (med .../emacs22-
And then hangs. This is what the process tree looks like:
root 30393 0.1 0.6 22388 18628 pts/3 S+ 19:36 0:00 | \_ apt-get autoremove
root 30410 0.0 1.3 45472 42836 pts/4 Ss+ 19:36 0:00 | \_ /usr/bin/dpkg --status-fd 22 --unpack --auto-deconfigure /var/cache/
root 30417 0.0 0.0 1872 508 pts/4 S+ 19:36 0:00 | \_ /bin/sh -e /var/lib/
root 30418 0.0 0.0 1872 268 pts/4 S+ 19:36 0:00 | \_ /bin/sh -e /var/lib/
root 30419 0.0 0.0 2300 912 pts/4 D+ 19:36 0:00 | \_ lsof -F p /usr/bin/
root 30420 0.0 0.0 2168 228 pts/4 S+ 19:36 0:00 | | \_ lsof -F p /usr/bin/
root 30421 0.0 0.0 3344 680 pts/4 S+ 19:36 0:00 | \_ wc -l
It is obviously waiting for lsof which never returns.
affects: | ubuntu → emacs22 (Ubuntu) |
summary: |
- Emacs upgrade hangs + Emacs upgrade hangs: preinst should avoid lsof |
The lsof -F p /usr/bin/ emacs22- gtk call hangs because an unrelated process was stuck waiting on an nfs server that had disappeared. So in essence, the problem is a symptom of nfs being very stupid, see https:/ /bugzilla. redhat. com/show_ bug.cgi? id=131712.
But the lsof call is only used to check if emacs is running and print a warning, so it would be simple to replace it with something that does not risk hanging. pidof /usr/bin/ emacs22- gtk for example could be used as a drop-in replacement.