On Thu, 18 Mar 2004 21:59:37 +0000 Paul Warren pdw@ex-parrot.com wrote:
The iftoprc is included in the tarball. But even if there is rubbish in the file, iftop should not segfault IMHO ;-)
This is true.
The iftop you're running doesn't appear to have debugging info in it, so I can't tell much from the bt. Can you recompile with debugging info. I think "CFLAGS=-g && make clean && make" should do the trick.
Please just cut and paste the trace into the email - I'll respond quicker that way :-)
Ok, here it is:
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh) Copyright 2003 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-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `/usr/local/sbin/iftop'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libpcap.so.0.6.2...done. Loaded symbols for /usr/lib/libpcap.so.0.6.2 Reading symbols from /lib/tls/libm.so.6...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /usr/lib/libncurses.so.5...done. Loaded symbols for /usr/lib/libncurses.so.5 Reading symbols from /lib/tls/libpthread.so.0...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/libgpm.so.1...done. Loaded symbols for /usr/lib/libgpm.so.1 #0 0x00c39f4a in strcmp () from /lib/tls/libc.so.6 (gdb) where #0 0x00c39f4a in strcmp () from /lib/tls/libc.so.6 #1 0x0804e456 in is_cfgdirective_valid (s=0x96ce178 "port-resolution") at cfgfile.c:50 #2 0x0804e646 in read_config_file (f=0x96ce020 "/root/.iftoprc", #whinge=0) at cfgfile.c:119 #3 0x0804ac20 in main (argc=1, argv=0xbfefbbc4) at iftop.c:531 (gdb) q