Bug#324900: nscd: umount /var fails (unclean shutdowns)
GOTO Masanori <gotom@debian.or.jp> writes:
> At Wed, 24 Aug 2005 20:14:43 +0200,
> Zlatko Calusic wrote:
>> With the latest changes in nscd functionality, namely using persistent
>> database in /var/db/nscd, /var partition can't be cleanly umounted. I
>> tried to avoid the problem by disabling persistent database, but even
>> that didn't help because nscd keeps open descriptor to a deleted file
>> in /var/run, and somehow /etc/init.d/rc inherits it.
>>
>> This is the relevant part of the lsof output fired just before the
>> umount line in /etc/init.d/umountfs:
>>
>> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
>> rc 2470 root DEL REG 3,9 1093449 /var/run/nscd/dbUUHtCX
>
> Why didn't your nscd shutdown before /etc/init.d/umountfs was invoked?
> Under my standard sid environment, such problem does not occur because
> nscd is stopped before umount is executed.
>
But it DID! To prove it, here's full lsof output, there's no
mentioning of nscd running. I'm also confused how that one reference
leaks to /etc/init.d/rc. But it happens on three machines, so it is
very repeatable here.
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
init 1 root cwd DIR 3,5 4096 2 /
init 1 root rtd DIR 3,5 4096 2 /
init 1 root txt REG 3,5 29664 95095 /sbin/init
init 1 root mem REG 0,0 0 [heap] (stat: No such file or directory)
init 1 root mem REG 3,5 90028 94966 /lib/ld-2.3.5.so
init 1 root mem REG 3,5 1268116 94997 /lib/tls/i686/cmov/libc-2.3.5.so
init 1 root 10u FIFO 3,5 31808 /dev/initctl
migration 2 root cwd DIR 3,5 4096 2 /
migration 2 root rtd DIR 3,5 4096 2 /
migration 2 root txt unknown /proc/2/exe
ksoftirqd 3 root cwd DIR 3,5 4096 2 /
ksoftirqd 3 root rtd DIR 3,5 4096 2 /
ksoftirqd 3 root txt unknown /proc/3/exe
migration 4 root cwd DIR 3,5 4096 2 /
migration 4 root rtd DIR 3,5 4096 2 /
migration 4 root txt unknown /proc/4/exe
ksoftirqd 5 root cwd DIR 3,5 4096 2 /
ksoftirqd 5 root rtd DIR 3,5 4096 2 /
ksoftirqd 5 root txt unknown /proc/5/exe
events/0 6 root cwd DIR 3,5 4096 2 /
events/0 6 root rtd DIR 3,5 4096 2 /
events/0 6 root txt unknown /proc/6/exe
events/1 7 root cwd DIR 3,5 4096 2 /
events/1 7 root rtd DIR 3,5 4096 2 /
events/1 7 root txt unknown /proc/7/exe
khelper 8 root cwd DIR 3,5 4096 2 /
khelper 8 root rtd DIR 3,5 4096 2 /
khelper 8 root txt unknown /proc/8/exe
kthread 9 root cwd DIR 3,5 4096 2 /
kthread 9 root rtd DIR 3,5 4096 2 /
kthread 9 root txt unknown /proc/9/exe
kacpid 10 root cwd DIR 3,5 4096 2 /
kacpid 10 root rtd DIR 3,5 4096 2 /
kacpid 10 root txt unknown /proc/10/exe
kblockd/0 11 root cwd DIR 3,5 4096 2 /
kblockd/0 11 root rtd DIR 3,5 4096 2 /
kblockd/0 11 root txt unknown /proc/11/exe
kblockd/1 12 root cwd DIR 3,5 4096 2 /
kblockd/1 12 root rtd DIR 3,5 4096 2 /
kblockd/1 12 root txt unknown /proc/12/exe
pdflush 13 root cwd DIR 3,5 4096 2 /
pdflush 13 root rtd DIR 3,5 4096 2 /
pdflush 13 root txt unknown /proc/13/exe
pdflush 14 root cwd DIR 3,5 4096 2 /
pdflush 14 root rtd DIR 3,5 4096 2 /
pdflush 14 root txt unknown /proc/14/exe
kswapd0 15 root cwd DIR 3,5 4096 2 /
kswapd0 15 root rtd DIR 3,5 4096 2 /
kswapd0 15 root txt unknown /proc/15/exe
aio/0 16 root cwd DIR 3,5 4096 2 /
aio/0 16 root rtd DIR 3,5 4096 2 /
aio/0 16 root txt unknown /proc/16/exe
aio/1 17 root cwd DIR 3,5 4096 2 /
aio/1 17 root rtd DIR 3,5 4096 2 /
aio/1 17 root txt unknown /proc/17/exe
kseriod 18 root cwd DIR 3,5 4096 2 /
kseriod 18 root rtd DIR 3,5 4096 2 /
kseriod 18 root txt unknown /proc/18/exe
saa7134[0 19 root cwd DIR 3,5 4096 2 /
saa7134[0 19 root rtd DIR 3,5 4096 2 /
saa7134[0 19 root txt unknown /proc/19/exe
kcryptd/0 20 root cwd DIR 3,5 4096 2 /
kcryptd/0 20 root rtd DIR 3,5 4096 2 /
kcryptd/0 20 root txt unknown /proc/20/exe
kcryptd/1 21 root cwd DIR 3,5 4096 2 /
kcryptd/1 21 root rtd DIR 3,5 4096 2 /
kcryptd/1 21 root txt unknown /proc/21/exe
kmirrord 22 root cwd DIR 3,5 4096 2 /
kmirrord 22 root rtd DIR 3,5 4096 2 /
kmirrord 22 root txt unknown /proc/22/exe
kirqd 23 root cwd DIR 3,5 4096 2 /
kirqd 23 root rtd DIR 3,5 4096 2 /
kirqd 23 root txt unknown /proc/23/exe
kjournald 24 root cwd DIR 3,5 4096 2 /
kjournald 24 root rtd DIR 3,5 4096 2 /
kjournald 24 root txt unknown /proc/24/exe
kjournald 150 root cwd DIR 3,5 4096 2 /
kjournald 150 root rtd DIR 3,5 4096 2 /
kjournald 150 root txt unknown /proc/150/exe
kjournald 151 root cwd DIR 3,5 4096 2 /
kjournald 151 root rtd DIR 3,5 4096 2 /
kjournald 151 root txt unknown /proc/151/exe
kjournald 152 root cwd DIR 3,5 4096 2 /
kjournald 152 root rtd DIR 3,5 4096 2 /
kjournald 152 root txt unknown /proc/152/exe
kjournald 153 root cwd DIR 3,5 4096 2 /
kjournald 153 root rtd DIR 3,5 4096 2 /
kjournald 153 root txt unknown /proc/153/exe
kjournald 154 root cwd DIR 3,5 4096 2 /
kjournald 154 root rtd DIR 3,5 4096 2 /
kjournald 154 root txt unknown /proc/154/exe
kjournald 155 root cwd DIR 3,5 4096 2 /
kjournald 155 root rtd DIR 3,5 4096 2 /
kjournald 155 root txt unknown /proc/155/exe
kjournald 156 root cwd DIR 3,5 4096 2 /
kjournald 156 root rtd DIR 3,5 4096 2 /
kjournald 156 root txt unknown /proc/156/exe
rc 2470 root cwd DIR 3,5 4096 2 /
rc 2470 root rtd DIR 3,5 4096 2 /
rc 2470 root txt REG 3,5 667340 75 /bin/bash
rc 2470 root mem REG 0,0 0 [heap] (stat: No such file or directory)
rc 2470 root mem REG 3,5 90028 94966 /lib/ld-2.3.5.so
rc 2470 root mem REG 3,5 1268116 94997 /lib/tls/i686/cmov/libc-2.3.5.so
rc 2470 root mem REG 3,5 11176 94998 /lib/tls/i686/cmov/libdl-2.3.5.so
rc 2470 root DEL REG 3,9 1093449 /var/run/nscd/dbUUHtCX
rc 2470 root mem REG 3,5 266956 95089 /lib/libncurses.so.5.4
rc 2470 root 0u CHR 5,1 32957 /dev/console
rc 2470 root 1u CHR 5,1 32957 /dev/console
rc 2470 root 2u CHR 5,1 32957 /dev/console
rc 2470 root 255r REG 3,5 2235 64133 /etc/init.d/rc
S40umount 2804 root cwd DIR 3,5 4096 2 /
S40umount 2804 root rtd DIR 3,5 4096 2 /
S40umount 2804 root txt REG 3,5 667340 75 /bin/bash
S40umount 2804 root mem REG 0,0 0 [heap] (stat: No such file or directory)
S40umount 2804 root mem REG 3,5 90028 94966 /lib/ld-2.3.5.so
S40umount 2804 root mem REG 3,5 1268116 94997 /lib/tls/i686/cmov/libc-2.3.5.so
S40umount 2804 root mem REG 3,5 11176 94998 /lib/tls/i686/cmov/libdl-2.3.5.so
S40umount 2804 root mem REG 3,5 78412 95296 /lib/tls/i686/cmov/libnsl-2.3.5.so
S40umount 2804 root mem REG 3,5 42528 95484 /lib/tls/i686/cmov/libnss_files-2.3.5.so
S40umount 2804 root mem REG 3,5 38448 95488 /lib/tls/i686/cmov/libnss_nis-2.3.5.so
S40umount 2804 root mem REG 3,5 30428 95480 /lib/tls/i686/cmov/libnss_compat-2.3.5.so
S40umount 2804 root mem REG 3,5 266956 95089 /lib/libncurses.so.5.4
S40umount 2804 root 0u CHR 5,1 32957 /dev/console
S40umount 2804 root 1u CHR 5,1 32957 /dev/console
S40umount 2804 root 2u CHR 5,1 32957 /dev/console
S40umount 2804 root 255r REG 3,5 529 66752 /etc/init.d/umountfs
lsof 2807 root cwd DIR 3,5 4096 2 /
lsof 2807 root rtd DIR 3,5 4096 2 /
lsof 2807 root txt REG 3,8 126648 615328 /usr/bin/lsof
lsof 2807 root mem REG 0,0 0 [heap] (stat: No such file or directory)
lsof 2807 root mem REG 3,5 90028 94966 /lib/ld-2.3.5.so
lsof 2807 root mem REG 3,5 1268116 94997 /lib/tls/i686/cmov/libc-2.3.5.so
lsof 2807 root 0u CHR 5,1 32957 /dev/console
lsof 2807 root 1w REG 3,9 0 864962 /var/tmp/LSOF
lsof 2807 root 2u CHR 5,1 32957 /dev/console
lsof 2807 root 3r DIR 0,3 0 1 /proc
lsof 2807 root 4r DIR 0,3 0 183959562 /proc/2807/fd
lsof 2807 root 5w FIFO 0,6 19205 pipe
lsof 2807 root 6r FIFO 0,6 19206 pipe
lsof 2808 root cwd DIR 3,5 4096 2 /
lsof 2808 root rtd DIR 3,5 4096 2 /
lsof 2808 root txt REG 3,8 126648 615328 /usr/bin/lsof
lsof 2808 root mem REG 0,0 0 [heap] (stat: No such file or directory)
lsof 2808 root mem REG 3,5 90028 94966 /lib/ld-2.3.5.so
lsof 2808 root mem REG 3,5 1268116 94997 /lib/tls/i686/cmov/libc-2.3.5.so
lsof 2808 root 4r FIFO 0,6 19205 pipe
lsof 2808 root 7w FIFO 0,6 19206 pipe
--
Zlatko
Reply to: