Bug#213865: apt-get hangs on daemon stop - Better diagnostic message
Package: apt
Version: 0.5.14
Severity: normal
EVENT DESCRIPTION
This bug cannot be easily reproduced, but this is what happened:
- apt-get install mysql-server (I was upgrading)
- ... apt-get hung
Hm, next I tried apt-get remove mysql-server, which could'n do it
either. The error message was something line "package is in very bad /
inconsistent state, you should install it first before removing". The
exact wording has passed, because my terminal did not have a big
scroll buffer where I worked at the time.
Next I tried apt-get --reinstall mysql-server but that hung
mysteriously too.
The error was simple: apt-get hung because it couldn't stop
mysqld_safe daemon. I had to kill it with -9 and continue
install as usual.
SUGGESTION FOR IMPROVEMENT
Suggestion one. Please include two step message, whenever a server is
going to be shut down:
Stopping process (name) ... <before>
Stopping process (name) ...done. <after>
If the installation process hungs, at least user can see where the
problem is. Right now there is only one message "Stopping ....", which
is printed too late - after success.
Second suggestion. If it is possible, include a timeout, say 7 seconds
(this could be configurable), to let the kill command to run. If
the process is still there, a message could be displayed:
The process XXXX couldn't be killed with /etc/init.d/... stop
I'm going to try killing it with -9
If this fails, the program could hand the situation to user to solve.
-- Package-specific info:
-- apt-config dump --
APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Default-Release "unstable";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Tools "";
DPkg::Tools::Options "";
DPkg::Tools::Options::/usr/bin/apt-listchanges "";
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
-- (no /etc/apt/preferences present) --
-- /etc/apt/sources.list --
deb file:/var/cache/apt-build/repository apt-build main
# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
# deb http://http.us.debian.org/debian unstable main contrib non-free
# deb http://non-us.debian.org unstable/non-US main contrib non-free
#
# deb ftp://non-us.debian.org/ unstable/non-US main contrib non-free
# deb-src ftp://non-us.debian.org/ unstable/non-US main contrib non-free
# Uncomment if you want the apt-get source function to work
# deb-src http://http.us.debian.org/debian unstable main contrib non-free
# deb-src http://non-us.debian.org/debian-non-US unstable non-US
deb ftp://debian.crosslink.net/debian/ unstable main non-free contrib
deb-src ftp://debian.crosslink.net/debian/ unstable main non-free contrib
deb ftp://ftp.fi.debian.org/debian unstable main contrib non-free
deb ftp://ftp.fi.debian.org/debian-non-US unstable/non-US main contrib non-free
deb http://ftp.fi.debian.org/debian ../project/experimental main
deb-src ftp://ftp.fi.debian.org/debian unstable main contrib non-free
deb-src ftp://ftp.fi.debian.org/debian-non-US unstable/non-US main contrib non-free
# deb ftp://ftp.se.debian.org/debian unstable main contrib non-free
# deb ftp://ftp.se.debian.org/debian-non-US unstable/non-US main contrib non-free
#deb http://ftp.oav.net/caudium/debian/ unstable main
#deb-src http://ftp.oav.net/caudium/debian/ unstable main
# Emacs 21
# deb http://people.debian.org/~kitame/emacs21 ./
# Browsers
# deb http://www.opera.com/debian stable opera non-free
# - phoenix
deb http://people.debian.org/~eric/debian/i386 ./
# Desktop
# - ROX (sf), very nice
deb http://www.janw.easynet.be/rox/ developer/
deb http://www.hrw.one.pl/apt/ sid/
deb-src http://www.hrw.one.pl/apt/ src/
# Unoffials
deb http://debian.moolfreet.com/ ./
deb ftp://debian.fifi.org/pub/debian-local testing/official/
deb http://www.gws-online.de/download/potato/ ./
deb-src http://www.gws-online.de/download/potato/ ./
# Sourceforge
# deb http://grustibus.sourceforge.net/debian woody/
# Openoffice
deb ftp://ftp.uninett.no/pub/linux/packages/openoffice-debian unstable main contrib
# Security updates
deb http://security.debian.org/ stable/updates main contrib non-free
# deb http://people.debian.org/~calvin/python-central ./
# http://apt-get.org/
deb http://smarden.org/pape/Debian potato unofficial pape
# deb http://download.us.kde.org/pub/kde/stable/latest/Debian/ woody main
deb http://mywebpages.comcast.net/ddamian/deb/ ./
deb http://kitenet.net/~joey/debian unstable/
deb http://kitenet.net/~joey/debian experimental/
# deb http://pureftpd.sourceforge.net/debian/woody ./
deb ftp://ftp.mowgli.ch/pub/debian sid unofficial
deb ftp://ftp.mowgli.ch/pub/debian sarge unofficial
deb http://marillat.free.fr/ unstable main
deb http://marillat.free.fr/ testing main
# Java
deb http://www.tux.org/pub/java/debian sid main non-free
# XFree 4.2
deb http://people.debian.org/~daenzer/dri-trunk/ ./
# FETA
# deb http://www.sacredchao.net/software unstable main
# deb-src http://www.sacredchao.net/software unstable main
# JAVA
# GNome, beocurve
# deb http://jerakeen.org/debs ./
# AARNET Mirror e
#deb ftp://mirror.aarnet.edu.au/pub/debian unstable main contrib non-free
#deb-src ftp://mirror.aarnet.edu.au/pub/debian unstable main contrib non-free
# This Australian site is not so reliable
# deb ftp://ftp.au.debian.org/pub/debian unstable main contrib non-free
# deb ftp://ftp.au.debian.org/pub/debian-non-US unstable/non-US main contrib non-free
# CENTRAL DEBIAN REPOSITORY
deb http://ftp.debian.org/debian unstable main contrib non-free
deb http://non-US.debian.org/ unstable/non-US main contrib non-free
#deb cdrom:[Debian GNU/Linux 2.3 _Woody_ - fsn.hu's i386 Binary-1 (20010121)]/ unstable contrib main non-US/contrib non-US/main non-US/non-free non-free
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux cante.homeip.net 2.2.18pre21 #1 Sat Nov 18 18:47:15 EST 2000 i686
Locale: LANG=en_US, LC_CTYPE=en_US (ignored: LC_ALL set)
Versions of packages apt depends on:
ii libc6 2.3.2-8 GNU C Library: Shared libraries an
ii libgcc1 1:3.3.2-0pre4 GCC support library
ii libstdc++5 1:3.3.2-0pre4 The GNU Standard C++ Library v3
-- no debconf information
Reply to: