Greetings,
As part of /etc/cron.daily, msec is run. As part of msec, "netstat -pvlA
inet"" is run and seg faults. The seg faults first occurred July 5 (while
I was on vacation) and have occurred every day since then.
Here're the first few lines of the email sent by Cron Daemon:
error running postrotate script
run-parts: /etc/cron.daily/logrotate exited with return code 1
/etc/cron.daily/msec: line 130: 14467 Segmentation fault netstat -pvlA
inet 2>/dev/null >${OPEN_PORT_TODAY}
Running "netstat -pvlA inet" by hand gives the segmentation fault - right
after the last "tcp" line. Running under gdb, I've learned that the
problem is in strcpy().
To learn more about what is going on, I downloaded the
net-tools-1.60-2mdk.src.rpm and rebuilt the executable. Naturally this
works properly.
Anybody know what's going on?
Thanks.
David
P.S. Here are the outputs from the two versions of netstat:
###### Running official Mandrake 8.2 version, i.e. /bin/netstat, under gdb
######
[root@nic /]# cd /bin
[root@nic bin]# ls -l netstat
-rwxr-xr-x 1 root root 89052 Jun 21 2001 /bin/netstat*
[root@nic bin]# gdb netstat
Current directory is /bin/
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...(no debugging symbols
found)...
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign
Address State PID/Program name
tcp 0 0
*:login *:* LISTEN 31398/xinetd
tcp 0 0
*:shell *:* LISTEN 31398/xinetd
tcp 0 0
*:trivnet1 *:* LISTEN
20944/httpd-perl
tcp 0 0 nic.osagesoftware.:5865
*:* LISTEN 10705/junkbuster
tcp 0 0
*:netbios-ssn *:* LISTEN -
tcp 0 0
*:pop3 *:* LISTEN 31398/xinetd
tcp 0 0
*:sunrpc *:* LISTEN 677/portmap
tcp 0 0
*:http *:* LISTEN 20961/httpd
tcp 0 0 www-ext.osagesof:domain
*:* LISTEN 31294/named
tcp 0 0 nic.osagesoftwar:domain
*:* LISTEN 31294/named
tcp 0 0 localhost.osages:domain
*:* LISTEN 31294/named
tcp 0 0
*:ftp *:* LISTEN 1283/proftpd
(accep
tcp 0 0
*:ssh *:* LISTEN 5723/sshd
tcp 0 0
*:telnet *:* LISTEN 31398/xinetd
tcp 0 0
*:3128 *:* LISTEN 10786/(squid)
tcp 0 0 localhost.osagesoft:953
*:* LISTEN 31294/named
tcp 0 0
*:smtp *:* LISTEN 3903/master
tcp 0 0
*:https *:* LISTEN 20961/httpd
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0804a020 in strcpy ()
(gdb) where
#0 0x0804a020 in strcpy ()
#1 0x00000000 in ?? ()
(gdb) q
The program is running. Exit anyway? (y or n) y
Debugger finished
###### Running netstat, built from net-tools-1.60-2mdk.src.rpm ######
[root@nic /]# cd /usr/src/RPM/BUILD/net-tools-1.60/netstat
[root@nic net-tools-1.60]# ll netstat
-rwxr-x--x 1 root root 90380 Jul 14 09:42
/usr/src/RPM/BUILD/net-tools-1.60/netstat*
[root@nic net-tools-1.60]# ./netstat -pvlA inet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign
Address State PID/Program name
tcp 0 0
*:login *:* LISTEN 31398/xinetd
tcp 0 0
*:shell *:* LISTEN 31398/xinetd
tcp 0 0
*:trivnet1 *:* LISTEN
20944/httpd-perl
tcp 0 0 nic.osagesoftware.:5865
*:* LISTEN 10705/junkbuster
tcp 0 0
*:netbios-ssn *:* LISTEN -
tcp 0 0
*:pop3 *:* LISTEN 31398/xinetd
tcp 0 0
*:sunrpc *:* LISTEN 677/portmap
tcp 0 0
*:http *:* LISTEN 20961/httpd
tcp 0 0 www-ext.osagesof:domain
*:* LISTEN 31294/named
tcp 0 0 nic.osagesoftwar:domain
*:* LISTEN 31294/named
tcp 0 0 localhost.osages:domain
*:* LISTEN 31294/named
tcp 0 0
*:ftp *:* LISTEN 1283/proftpd
(accep
tcp 0 0
*:ssh *:* LISTEN 5723/sshd
tcp 0 0
*:telnet *:* LISTEN 31398/xinetd
tcp 0 0
*:3128 *:* LISTEN 10786/(squid)
tcp 0 0 localhost.osagesoft:953
*:* LISTEN 31294/named
tcp 0 0
*:smtp *:* LISTEN 3903/master
tcp 0 0
*:https *:* LISTEN 20961/httpd
udp 0 0 nic.osagesof:netbios-ns
*:* -
udp 0 0 www-ext.osag:netbios-ns
*:* -
udp 0 0
*:netbios-ns *:* -
udp 0 0 nic.osageso:netbios-dgm
*:* -
udp 0 0 www-ext.osa:netbios-dgm
*:* -
udp 0 0
*:netbios-dgm *:* -
udp 0 0
*:nifty-hmi *:* 31294/named
udp 0 0 www-ext.osagesof:domain
*:* 31294/named
udp 0 0 nic.osagesoftwar:domain
*:* 31294/named
udp 0 0 localhost.osages:domain
*:* 31294/named
udp 0 0
*:icpv2 *:* 10786/(squid)
udp 0 0
*:filecast *:* 10786/(squid)
udp 0 0
*:htcp *:* 10786/(squid)
udp 0 0
*:collaborator *:* 31398/xinetd
udp 0 0
*:sunrpc *:* 677/portmap
udp 0 0 www-ext.osagesoftwa:ntp
*:* 28411/ntpd
udp 0 0 nic.osagesoftware.c:ntp
*:* 28411/ntpd
udp 0 0 localhost.osagesoft:ntp
*:* 28411/ntpd
udp 0 0
*:ntp *:* 28411/ntpd
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com