[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#193278: libc6: When restarting, if one fails, rest isn't done



Package: libc6
Version: 2.3.1-16
Severity: important

When upgrading to this version, when restarting services, it failed when
doing apache (which always seems to happen BTW; I always have to start
apache afterwards, and see also #169424 which also mentions this).

Later I discovered that it had apparently not restarted any of the
services in its list after apache: samba logins stopped working for
instance, and the samba daemons were clearly still running from before
the upgrade. A quick check shows that also proftpd, cupsys, mysql-server
were not restarted (i.e. all installed packages from the list after
apache). It only showed apache as having failed.

This is a Bad Thing...

>From a quick look in the libc6 postinst I don't see why this is
happening; however, I wonder why not the init.d script "restart" option
isn't used; presumably that's more robust in restarting a service than
"stop; sleep 1; start" i.e. perhaps taking into account that a daemon
might not immediately terminate hence keeping the TCP port in use for a
few seconds longer than expected...

Hmm, looking further, I see that there's some flawed logic apparently
where it determines what services to restart:

    # dpkg -s proftpd 2> /dev/null | awk 'BEGIN{RS="\n\n";FS="\n"}{if ( $2 ~ /Status: .* installed$/ ) { print $1 } }' | cut -f 2 -d ' '
    proftpd

    # dpkg -s apache proftpd 2> /dev/null | awk 'BEGIN{RS="\n\n";FS="\n"}{if ( $2 ~ /Status: .* installed$/ ) { print $1 } }' | cut -f 2 -d ' '
    apache
    proftpd

    # dpkg -s apache apache2-common proftpd 2> /dev/null | awk 'BEGIN{RS="\n\n";FS="\n"}{if ( $2 ~ /Status: .* installed$/ ) { print $1 } }' | cut -f 2 -d ' '
    apache

Note the conspicuous absence of proftpd from the last example...
This may be the reason why not all services are restarted.

BTW: Why not use dpkg -l ? Seems a lot less complicated.


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux wurtel 2.4.21-pre4 #1 Wed Jan 29 22:00:33 CET 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-4    The Berkeley database routines [gl

-- no debconf information




Reply to: