Package: lsof
Version: 4.77.dfsg.1-3
Severity: normal

Using lsof -i, I cannot see the listening socket for postgrey.
Other services are shown as expected.

I run lsof as root, below is the output from my diagnostics so far.
The listening socket is definately open and accepting connections, it is fd
4 for the application, and an lsof -p for the proc shows errors accessing
fd/4 - readlink: Permission denied

Other perhaps relevant information, this is running on a user mode linux
guest system at bytemark.co.uk

[EMAIL PROTECTED]:~$ sudo lsof -i | grep :60000.*LISTEN
[EMAIL PROTECTED]:~$ sudo netstat -an | grep :60000.*LISTEN
tcp        0      0 127.0.0.1:60000         0.0.0.0:*               LISTEN     
[EMAIL PROTECTED]:~$ sudo ps aux | grep [p]ostgrey
postgrey 15900  0.0  9.9  12168  7648 ?        Ss   00:37   0:00
/usr/sbin/postgrey --pidfile=/var/run/postgrey.pid --daemonize
--inet=127.0.0.1:60000 
[EMAIL PROTECTED]:~$ sudo lsof -p 15900
COMMAND    PID     USER   FD      TYPE DEVICE    SIZE   NODE NAME
postgrey 15900 postgrey  cwd       DIR  98,32    4096      2 /
postgrey 15900 postgrey  rtd       DIR  98,32    4096      2 /
postgrey 15900 postgrey  txt       REG  98,32 1061700 245992 /usr/bin/perl
postgrey 15900 postgrey  mem       REG    0,0              0 [heap] (stat:
No such file or directory)
postgrey 15900 postgrey  mem       REG  98,32   88164   1653
/lib/ld-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32   19764 281105
//usr/lib/perl/5.8.8/auto/Socket/Socket.so
postgrey 15900 postgrey  mem       REG  98,32    9592   1880
/lib/tls/libdl-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32  145136   1881
//lib/tls/libm-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32   85010   1871
/lib/tls/libpthread-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32 1241580   1874
//lib/tls/libc-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32   21868   1877
/lib/tls/libcrypt-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32 1683008  32892
//usr/lib/locale/locale-archive
postgrey 15900 postgrey  mem       REG  98,32   15640 281055
/usr/lib/perl/5.8.8/auto/IO/IO.so
postgrey 15900 postgrey  mem       REG  98,32  111304 281100
//usr/lib/perl/5.8.8/auto/POSIX/POSIX.so
postgrey 15900 postgrey  mem       REG  98,32   11784 281015
/usr/lib/perl/5.8.8/auto/Fcntl/Fcntl.so
postgrey 15900 postgrey  mem       REG  98,32   18680 282198
//usr/lib/perl/5.8.8/auto/Time/HiRes/HiRes.so
postgrey 15900 postgrey  mem       REG  98,32  265480 508251
/usr/lib/perl5/auto/BerkeleyDB/BerkeleyDB.so
postgrey 15900 postgrey  mem       REG  98,32    5916 282191
//usr/lib/perl/5.8.8/auto/Sys/Hostname/Hostname.so
postgrey 15900 postgrey  mem       REG  98,32 1023476 345968
/usr/lib/libdb-4.4.so
postgrey 15900 postgrey  mem       REG  98,32   13744 282194
//usr/lib/perl/5.8.8/auto/Sys/Syslog/Syslog.so
postgrey 15900 postgrey  mem       REG  98,32   24576  49378
/var/lib/postgrey/__db.001
postgrey 15900 postgrey  mem       REG  98,32   38372   1893
//lib/tls/libnss_files-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32   30428   1889
/lib/tls/libnss_compat-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32   76548   1886
//lib/tls/libnsl-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32   34320   1901
/lib/tls/libnss_nis-2.3.6.so
postgrey 15900 postgrey  mem       REG  98,32  131072  49738
//var/lib/postgrey/__db.002
postgrey 15900 postgrey  mem       REG  98,32  270336  49740
/var/lib/postgrey/__db.003
postgrey 15900 postgrey  mem       REG  98,32   98304  49741
//var/lib/postgrey/__db.004
postgrey 15900 postgrey  mem       REG  98,32   16384  49742
/var/lib/postgrey/__db.005
postgrey 15900 postgrey    0   unknown
//proc/15900/fd/0 (readlink: Permission denied)
postgrey 15900 postgrey    1   unknown
/proc/15900/fd/1 (readlink: Permission denied)
postgrey 15900 postgrey    2   unknown
//proc/15900/fd/2 (readlink: Permission denied)
postgrey 15900 postgrey    3   unknown
/proc/15900/fd/3 (readlink: Permission denied)
postgrey 15900 postgrey    4   unknown
//proc/15900/fd/4 (readlink: Permission denied)
postgrey 15900 postgrey    5   unknown
/proc/15900/fd/5 (readlink: Permission denied)
postgrey 15900 postgrey    6   unknown
//proc/15900/fd/6 (readlink: Permission denied)
postgrey 15900 postgrey    7   unknown
/proc/15900/fd/7 (readlink: Permission denied)
postgrey 15900 postgrey    8   unknown
//proc/15900/fd/8 (readlink: Permission denied)
postgrey 15900 postgrey    9   unknown
/proc/15900/fd/9 (readlink: Permission denied)
postgrey 15900 postgrey   11   unknown
//proc/15900/fd/11 (readlink: Permission denied)
postgrey 15900 postgrey   12   unknown
/proc/15900/fd/12 (readlink: Permission denied)


An strace of postgrey relating to the listening socket

socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf67c418) = -1 EINVAL (Invalid
argument)
_llseek(4, 0, 0xbf67c460, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf67c418) = -1 EINVAL (Invalid
argument)
_llseek(4, 0, 0xbf67c460, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(60000),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
listen(4, 128)                          = 0
pread64(7, "\0\0\0\0\1\0\0\0\0\0\0\0b1\5\0\t\0\0\0\0\20\0\0\0\t\0\0"...,
4096, 0) = 4096
pread64(8, "\0\0\0\0\1\0\0\0\0\0\0\0b1\5\0\t\0\0\0\0\20\0\0\0\t\0\0"...,
4096, 0) = 4096
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
getsockopt(4, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
select(8, [4], NULL, NULL, NULL)        = ? ERESTARTNOHAND (To be restarted)
select(8, [4], NULL, NULL, NULL)        = ? ERESTARTNOHAND (To be restarted)
select(8, [4], NULL, NULL, NULL)        = ? ERESTARTNOHAND (To be restarted)
select(8, [4], NULL, NULL, NULL)        = 1 (in [4])
accept(4, {sa_family=AF_INET, sin_port=htons(2778),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 8
getsockopt(8, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
select(16, [4], [], NULL, NULL)         = 1 (in [4])
accept(4, {sa_family=AF_INET, sin_port=htons(2779),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 8
getsockopt(8, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
select(16, [4], [], NULL, NULL)         = 1 (in [4])
accept(4, {sa_family=AF_INET, sin_port=htons(2780),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 8
getsockopt(8, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
select(16, [4], [], NULL, NULL)         = ? ERESTARTNOHAND (To be restarted)



-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.27-bytemark2-small-bytemark-uml-20060817-1-small
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages lsof depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries

lsof recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to