Comment 48 for bug 6841

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 07 Jul 2004 14:40:28 +0200
From: Helge Hafting <email address hidden>
To: =?ISO-8859-1?Q?Javier_Fern=E1ndez-Sanguino_Pe=F1a?=
 <email address hidden>
CC: <email address hidden>, Thomas Hood <email address hidden>
Subject: Re: Bug#256680: #256680

Javier Fern�ez-Sanguino Pe�rote:

>On Wed, Jul 07, 2004 at 01:47:18PM +0200, Helge Hafting wrote:
>
>
>># ifdown lo -v
>>Configuring interface lo=lo (inet)
>>run-parts /etc/network/if-down.d
>>ifconfig lo down
>>run-parts /etc/network/if-post-down.d
>>
>>I get the same output, but then it hangs. I broke it with ctrl+C
>>and issued the run-parts command manually. It completed
>>immediately, so there's something after that that hangs ifdown.
>>
>>
>
>What do your /etc/network/if-down.d and /etc/network/if-post-down.d
>directories contain?
>

Nothing! They are empty, except for "." and ".."

>Actually, it looks like your system tries to do LDAP
>stuff while downing lo, which does not make sense to me, there's stuff like
>this in your trace:
>
>
I use openldap for user authentication. (Experimental, there's
just a test user in the ldap database) This means that anything
that uses PAM might need to contact ldap.
It turns out that run-parts indeed tries to contact the ldap server
via 127.0.0.1, and of course that times out when "lo" is down.

>[pid 3697] connect(3, {sa_family=AF_INET, sin_port=htons(389),
>sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
>[pid 3697] select(1024, NULL, [3], NULL, {30, 0}) = 1 (out [3], left {30,
>0})
>[pid 3697] getpeername(3, 0xbfffee18, [128]) = -1 ENOTCONN (Transport
>endpointis not connected)
>[pid 3697] read(3, 0xbfffee13, 1) = -1 ECONNREFUSED (Connection
>refused)
>[pid 3697] shutdown(3, 2 /* send and receive */) = -1 ENOTCONN (Transport
>endpoint is not connected)
>
>Which might be generating those timeouts or deadlocks you observer. I think
>this is a configuration issue on your side (or on another package). Maybe
>providing more information on your environment and on the scripts that are
>getting run by run-parts would help in locating the problem.
>
>
There are no scripts run by run-parts - it invokes ldap even
when there is nothing at all to do. I can provide a guest
account for those interested in looking at the configuration.
There is nothing to see in /etc/network/if-down.d (or if-post-down.d)
though.

There are many possibilities for a bug here:
* should run-parts really invoke ldap? Isn't it supposed to work
   before ldap is up or after it is down?
* or is run-parts the wrong tool for "ifdown"?
* or am I not supposed to use ldap? It is advertised as a user database...

Keeping ldap running for a longer time (stopping it after the network)
won't help because the network script uses run-parts _after_ killing
the interfaces.

So in my opinion - either run-parts have a bug (should avoid PAM),
or ifdown is buggy for using run-parts. Pick one . . .

Helge Hafting