Your message dated Wed, 6 Apr 2011 14:27:09 +0200
with message-id <[email protected]>
and subject line Re: Bug#621079: /sbin/udevd: fails to close inherited file 
handles when daemonizing
has caused the Debian Bug report #621079,
regarding /sbin/udevd: fails to close inherited file handles when daemonizing
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
621079: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621079
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: udev
Version: 167-1
Severity: important
File: /sbin/udevd

udevd doesn't properly close all inherited open file handles when it's 
restarted,
causing unattended-upgrades to fail, subsequently causing anacron to hang 
"forever"

Please see bug #379645 for context, but do note that leaving open file handles
is a real bug in udevd.


Situation after unattended-ugrades upgraded udevd to 167-1.  anacron is hanging
waiting for the stderr and stdout pipes opened by run-parts to be closed:

root      2140  0.0  0.6  12332   840 ?        Ss   07:30   0:00 
/usr/sbin/anacron -s
root      2142  0.0  0.4   4004   552 ?        S    07:35   0:00  \_ /bin/sh -c 
nice run-parts --report /etc/cron.daily
root      2143  0.0  0.4   3904   552 ?        SN   07:35   0:00      \_ 
run-parts --report /etc/cron.daily
root      2147  0.0  0.0      0     0 ?        ZN   07:35   0:00          \_ 
[apt] <defunct>
root      3395  0.0  0.4  21068   560 ?        S<s  07:48   0:00 udevd --daemon
root      3495  0.0  0.9  49476  1124 ?        SNs  07:48   0:00 /usr/sbin/sshd

The log shows that two daemons were among the upgraded, udevd and sshd (also 
shown in
the partial ps output above):

frtest3:~# cat /var/log/unattended-upgrades/unattended-upgrades.log 
2011-04-02 07:52:06,607 INFO Initial blacklisted packages: 
2011-04-02 07:52:06,609 INFO Starting unattended upgrades script
2011-04-02 07:52:06,609 INFO Allowed origins are: ['o=Debian,a=unstable', 
'origin=Debian,label=Debian-Security,archive=stable']
2011-04-02 07:52:11,118 INFO Packages that are upgraded: cpp gcc libgeoip1 
libssl0.9.8 tzdata
2011-04-02 07:52:11,120 INFO Writing dpkg log to 
'/var/log/unattended-upgrades/unattended-upgrades-dpkg_2011-04-02_07:52:11.120101.log'
2011-04-02 07:52:24,610 INFO All upgrades installed
2011-04-03 07:39:55,924 INFO Initial blacklisted packages: 
2011-04-03 07:39:55,946 INFO Starting unattended upgrades script
2011-04-03 07:39:55,946 INFO Allowed origins are: ['o=Debian,a=unstable', 
'origin=Debian,label=Debian-Security,archive=stable']
2011-04-03 07:40:14,560 INFO Packages that are upgraded: apt apt-utils dpkg 
ethtool openssl x11-common
2011-04-03 07:40:14,562 INFO Writing dpkg log to 
'/var/log/unattended-upgrades/unattended-upgrades-dpkg_2011-04-03_07:40:14.561908.log'
2011-04-03 07:40:45,825 INFO All upgrades installed
2011-04-06 07:46:48,907 INFO Initial blacklisted packages: 
2011-04-06 07:46:48,917 INFO Starting unattended upgrades script
2011-04-06 07:46:48,918 INFO Allowed origins are: ['o=Debian,a=unstable', 
'origin=Debian,label=Debian-Security,archive=stable']
2011-04-06 07:47:06,148 INFO Packages that are upgraded: apt apt-utils 
base-files dpkg libltdl7 libudev0 m4 openssh-client openssh-server 
popularity-contest python-apt python-apt-common ssh udev
2011-04-06 07:47:06,149 INFO Writing dpkg log to 
'/var/log/unattended-upgrades/unattended-upgrades-dpkg_2011-04-06_07:47:06.149576.log'
2011-04-06 07:49:01,937 INFO All upgrades installed

Looking at the sshd open files shows no unexpected handles:


frtest3:~# lsof -p 3495
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
sshd    3495 root  cwd    DIR    8,1     4096     2 /
sshd    3495 root  rtd    DIR    8,1     4096     2 /
sshd    3495 root  txt    REG    8,1   516928 57532 /usr/sbin/sshd
sshd    3495 root  mem    REG    8,1    47616 82932 /lib/libnss_files-2.11.2.so
sshd    3495 root  mem    REG    8,1    43552 82161 /lib/libnss_nis-2.11.2.so
sshd    3495 root  mem    REG    8,1    31616 83524 /lib/libnss_compat-2.11.2.so
sshd    3495 root  mem    REG    8,1   131260 82972 /lib/libpthread-2.11.2.so
sshd    3495 root  mem    REG    8,1    80712 82117 /lib/libresolv-2.11.2.so
sshd    3495 root  mem    REG    8,1     8528 81876 /lib/libkeyutils.so.1.3
sshd    3495 root  mem    REG    8,1    32016 58126 
/usr/lib/libkrb5support.so.0.1
sshd    3495 root  mem    REG    8,1   167184 56946 /usr/lib/libk5crypto.so.3.1
sshd    3495 root  mem    REG    8,1    14696 82938 /lib/libdl-2.11.2.so
sshd    3495 root  mem    REG    8,1    89064 83629 /lib/libnsl-2.11.2.so
sshd    3495 root  mem    REG    8,1  1437064 82968 /lib/libc-2.11.2.so
sshd    3495 root  mem    REG    8,1    12336 81317 /lib/libcom_err.so.2.1
sshd    3495 root  mem    REG    8,1   836392 58009 /usr/lib/libkrb5.so.3.3
sshd    3495 root  mem    REG    8,1   246008 57375 
/usr/lib/libgssapi_krb5.so.2.2
sshd    3495 root  mem    REG    8,1    35104 83633 /lib/libcrypt-2.11.2.so
sshd    3495 root  mem    REG    8,1    93936 59079 /usr/lib/libz.so.1.2.3.4
sshd    3495 root  mem    REG    8,1    10648 82226 /lib/libutil-2.11.2.so
sshd    3495 root  mem    REG    8,1  1853320 57046 /usr/lib/libcrypto.so.1.0.0
sshd    3495 root  mem    REG    8,1   121976 81206 /lib/libselinux.so.1
sshd    3495 root  mem    REG    8,1    49712 81842 /lib/libpam.so.0.82.3
sshd    3495 root  mem    REG    8,1    36360 97738 /lib/libwrap.so.0.7.6
sshd    3495 root  mem    REG    8,1   128744 83634 /lib/ld-2.11.2.so
sshd    3495 root    0u   CHR    1,3      0t0   872 /dev/null
sshd    3495 root    1u   CHR    1,3      0t0   872 /dev/null
sshd    3495 root    2u   CHR    1,3      0t0   872 /dev/null
sshd    3495 root    3u  IPv4   8807      0t0   TCP *:ssh (LISTEN)
sshd    3495 root    4u  IPv6   8809      0t0   TCP *:ssh (LISTEN)


udevd however, have several files open which are obviously inherited from
the unattended-upgrades/apt process which started it:

frtest3:~# lsof -p 3395
COMMAND  PID USER   FD   TYPE             DEVICE SIZE/OFF  NODE NAME
udevd   3395 root  cwd    DIR                8,1     4096     2 /
udevd   3395 root  rtd    DIR                8,1     4096     2 /
udevd   3395 root  txt    REG                8,1   145472 48698 /sbin/udevd
udevd   3395 root  mem    REG                8,1    47616 82932 
/lib/libnss_files-2.11.2.so
udevd   3395 root  mem    REG                8,1    43552 82161 
/lib/libnss_nis-2.11.2.so
udevd   3395 root  mem    REG                8,1    89064 83629 
/lib/libnsl-2.11.2.so
udevd   3395 root  mem    REG                8,1    31616 83524 
/lib/libnss_compat-2.11.2.so
udevd   3395 root  mem    REG                8,1   131260 82972 
/lib/libpthread-2.11.2.so
udevd   3395 root  mem    REG                8,1    14696 82938 
/lib/libdl-2.11.2.so
udevd   3395 root  mem    REG                8,1  1437064 82968 
/lib/libc-2.11.2.so
udevd   3395 root  mem    REG                8,1    31744 82981 
/lib/librt-2.11.2.so
udevd   3395 root  mem    REG                8,1   121976 81206 
/lib/libselinux.so.1
udevd   3395 root  mem    REG                8,1   128744 83634 
/lib/ld-2.11.2.so
udevd   3395 root    0u   CHR                1,3      0t0   872 /dev/null
udevd   3395 root    1u   CHR                1,3      0t0   872 /dev/null
udevd   3395 root    2u   CHR                1,3      0t0   872 /dev/null
udevd   3395 root    4u  unix 0xffff880004974680      0t0  8675 socket
udevd   3395 root    5u  sock                0,7      0t0  8676 can't identify 
protocol
udevd   3395 root    6r  0000                0,9        0   870 anon_inode
udevd   3395 root    7u  0000                0,9        0   870 anon_inode
udevd   3395 root    8u  unix 0xffff880004974000      0t0  8677 socket
udevd   3395 root    9u  unix 0xffff8800049749c0      0t0  8678 socket
udevd   3395 root   10u   REG                8,1        8 40579 
/run/udev/queue.bin
udevd   3395 root   41r   REG                8,1   447439 75528 
/var/lib/dpkg/status (deleted)
udevd   3395 root   43r   REG                8,1   447439 75528 
/var/lib/dpkg/status (deleted)
udevd   3395 root   44u   CHR                1,3      0t0   872 /dev/null
udevd   3395 root   45u   REG                8,1    12802 97514 
/var/log/unattended-upgrades/unattended-upgrades-dpkg_2011-04-06_07:47:06.149576.log
udevd   3395 root   46w  FIFO                0,8      0t0  7008 pipe
udevd   3395 root   47w  FIFO                0,8      0t0  7009 pipe
udevd   3395 root   49w   REG                8,1     1157 73110 
/var/log/apt/history.log


Among these are the two pipes which run-parts is waiting for:

frtest3:~# lsof -p 2143
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
run-parts 2143 root  cwd    DIR    8,1     4096     2 /
run-parts 2143 root  rtd    DIR    8,1     4096     2 /
run-parts 2143 root  txt    REG    8,1    15592 81341 /bin/run-parts
run-parts 2143 root  mem    REG    8,1  1437064 82968 /lib/libc-2.11.2.so
run-parts 2143 root  mem    REG    8,1   128744 83634 /lib/ld-2.11.2.so
run-parts 2143 root    0r   CHR    1,3      0t0   872 /dev/null
run-parts 2143 root    1u   REG   0,17      522  7005 /tmp/fileZ6Ndbr (deleted)
run-parts 2143 root    2u   REG   0,17      522  7005 /tmp/fileZ6Ndbr (deleted)
run-parts 2143 root    3r   DIR    8,1     4096     2 /
run-parts 2143 root    4r  FIFO    0,8      0t0  7008 pipe
run-parts 2143 root    6r  FIFO    0,8      0t0  7009 pipe



Please fix ASAP.  Leaving inherited file handles open is unwise at best, and
may be considered a security problem by some.

Thanks,
Bjørn

-- System Information:
Debian Release: wheezy/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages udev depends on:
ii  debconf [debconf-2.0]        1.5.38      Debian configuration management sy
ii  libc6                        2.11.2-13   Embedded GNU C Library: Shared lib
ii  libselinux1                  2.0.98-1    SELinux runtime shared libraries
ii  libudev0                     167-1       libudev shared library
ii  libusb-0.1-4                 2:0.1.12-17 userspace USB programming library
ii  lsb-base                     3.2-27      Linux Standard Base 3.2 init scrip
ii  util-linux                   2.17.2-9.1  Miscellaneous system utilities

Versions of packages udev recommends:
ii  pciutils                      1:3.1.7-8  Linux PCI Utilities
ii  usbutils                      1:001-1    Linux USB utilities

udev suggests no packages.

-- debconf information:
  udev/new_kernel_needed: false
  udev/title/upgrade:
  udev/reboot_needed:
  udev/sysfs_deprecated_incompatibility:



--- End Message ---
--- Begin Message ---
On Apr 06, Bjørn Mork <[email protected]> wrote:

> udevd doesn't properly close all inherited open file handles when it's 
> restarted,
The upstream maintainer is not very interested in fixing this and I
agree: it's up to the calling process to provide a sane environment
(which means more than closing fds).
I recommend that you bother the debianutils maintainer to finally fix
run-parts.

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to