Created attachment 461099 [details] GDB trace of "iftop -i eth0 -i eth1" Description of problem: iftop segfaults when providing multiple -i Version-Release number of selected component (if applicable): iftop-0.17-11.fc14.x86_64 glibc-2.12.90-19.x86_64 glibc-debuginfo-2.12.90-19.x86_64 How reproducible: Everytime Steps to Reproduce: 1. run "iftop -i eth0 -i eth1" 2. 3. Actual results: iftop segfaults Expected results: It should run and listen only to the latest provided interface (eth1) Additional info: "iftop -i eth0 -i eth1 -i eth2" additionally print *** glibc detected *** /usr/sbin/iftop: double free or corruption (fasttop): 0x000000000060dfe0 *** The same rebuild package fails the same way on RHEL5.5.
Created attachment 461100 [details] GDB trace of "iftop -i eth0 -i eth1 -i eth2"
Reproducible here: full backtrace Thread 1 (Thread 0x7ffff7fd3720 (LWP 3952)): #0 0x0000003adcc77e15 in malloc_consolidate (av=0x3adcf9f180) at malloc.c:5169 fb = <value optimized out> maxfb = <value optimized out> p = 0x60d9b0 nextp = 0x0 unsorted_bin = 0x3adcf9f1d8 first_unsorted = <value optimized out> nextchunk = 0x60da10 size = 96 nextsize = <value optimized out> prevsize = <value optimized out> nextinuse = <value optimized out> bck = 0x0 fwd = 0x0 __func__ = "malloc_consolidate" #1 0x0000003adcc798e8 in _int_malloc (av=0x3adcf9f180, bytes=2048) at malloc.c:4373 nb = 2064 idx = 80 bin = <value optimized out> victim = <value optimized out> size = <value optimized out> victim_index = <value optimized out> remainder = <value optimized out> remainder_size = <value optimized out> block = <value optimized out> bit = <value optimized out> map = <value optimized out> fwd = <value optimized out> bck = <value optimized out> errstr = 0x0 __func__ = "_int_malloc" #2 0x0000003adcc7c932 in __libc_malloc (bytes=2048) at malloc.c:3660 ar_ptr = <value optimized out> victim = <value optimized out> hook = <value optimized out> __func__ = "__libc_malloc" #3 0x00000000004074b9 in xmalloc (n=<value optimized out>) at util.c:26 v = 0x0 #4 0x0000000000407a0e in read_config_file (f=0x60d9f0 "/home/fedora/.iftoprc", whinge=0) at cfgfile.c:70 ret = 0 fp = <value optimized out> line = <value optimized out> i = 1 #5 0x0000000000403828 in main (argc=5, argv=0x7fffffffe128) at iftop.c:575 thread = 4203328 ---Type <return> to continue, or q <return> to quit--- sa = {__sigaction_handler = {sa_handler = 0, sa_sigaction = 0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0} -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
Does one of you already have a patch for this?
I believe this has been patched in Debian. I will try and dig it up and post here. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
Yes, looks like Debian addressed this issue in October 2010 ("Fix segfault when using the same command line argument multiple time"). I'll have a look to it and synchronize patches as needed.
Created attachment 461397 [details] Proposed patch as lifted from debian
The patch does not allow you to monitor more than one interface - it simply overwrites any previously read parameters which is in line with the man page. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
Thanks for your patch, unfortunately there's a piece in stringmap.c missing. I'll add the complete fix to iftop package soon.
iftop-0.17-12.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/iftop-0.17-12.fc14
iftop-0.17-12.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/iftop-0.17-12.fc13
iftop-0.17-12.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/iftop-0.17-12.fc12
iftop-0.17-12.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/iftop-0.17-12.el5
iftop-0.17-12.el4 has been submitted as an update for Fedora EPEL 4. https://admin.fedoraproject.org/updates/iftop-0.17-12.el4
iftop-0.17-12.el4 has been pushed to the Fedora EPEL 4 stable repository. If problems still persist, please make note of it in this bug report.
iftop-0.17-12.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
iftop-0.17-12.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
iftop-0.17-12.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.