Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106063 - flow-tools: bug in flow-report
Summary: flow-tools: bug in flow-report
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-15 06:11 UTC by Molchanov Alexander
Modified: 2005-09-16 04:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
flow-tools-0.68-fix-flow-report-coredump.diff (flow-tools-0.68-fix-flow-report-coredump.diff,606 bytes, patch)
2005-09-15 06:12 UTC, Molchanov Alexander
Details | Diff
and new ebuild for it (flow-tools-0.68-r1) (flow-tools-0.68-r1.ebuild,3.35 KB, text/plain)
2005-09-15 06:12 UTC, Molchanov Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Molchanov Alexander 2005-09-15 06:11:25 UTC
Then i upgrade flow-tools version from 0.67 to 0.68-r1 "flow-report" begins core 
dumped:

$ /usr/bin/flow-report -s/tmp/report.cfg.24047 -S custom-report-24047 < /home/
db/flow-tools/tmknn/ft-v05.2005-09-10.000000+0400 
Segmentation fault
...
$ gdb ./flow-report /root/core

GNU gdb 6.3
Copyright 2004 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 "i686-pc-linux-gnu"...Using host libthread_db library 
"/lib/libthread_db.so.1".


warning: exec file is newer than core file.
Core was generated by `/usr/bin/flow-report -s/tmp/report.cfg.24047 -S custom-
report-24047'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libwrap.so.0...done.
Loaded symbols for /lib/libwrap.so.0
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x080a1ea9 in ftchash_sort (ftch=0x80b4060, offset=-1234989048, flags=34) at 
ftchash.c:385
385         ftch->sorted_recs[x++] = (struct ftchash_rec_gen*)rec;
(gdb) bt
#0  0x080a1ea9 in ftchash_sort (ftch=0x80b4060, offset=-1234989048, flags=34) at 
ftchash.c:385
#1  0x080922c5 in chash_prefix2_dump (fp=0x80c2dc8, rpt=0x80b41c8, 
ftch=0x80b4060)
    at ftstat.c:13472
#2  0x08064710 in ftstat_rpt_17_dump (fp=0x80c2dc8, ftio=0xbfbe5650, 
rpt=0x80b41c8)
    at ftstat.c:6412
#3  0x08057638 in ftstat_def_dump (ftio=0xbfbe5650, active_def=0x80b43a8) at 
ftstat.c:3313
#4  0x08049a21 in main (argc=134955944, argv=0xbfbe5854) at flow-report.c:197
(gdb)  


Bug in next changed strings:

    /* more entries in this chunk *? */
    if  ((char*)ftch->traverse_rec <
      (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) {
      char *p = (char *)ftch->traverse_rec;

      ret = ftch->traverse_rec;
      p += ftch->d_size;
      return ret;


Next pacth fix this bug (some rollback, but without compilation warning strings)
Comment 1 Molchanov Alexander 2005-09-15 06:12:08 UTC
Created attachment 68506 [details, diff]
flow-tools-0.68-fix-flow-report-coredump.diff
Comment 2 Molchanov Alexander 2005-09-15 06:12:48 UTC
Created attachment 68507 [details]
and new ebuild for it (flow-tools-0.68-r1)
Comment 3 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2005-09-16 02:58:44 UTC
This should be sent upstream
Comment 4 Molchanov Alexander 2005-09-16 03:26:30 UTC
This is not porblem of flow-tools packages... I yet has found this broken fix in 
gentoo patch /usr/portage/net-analyzer/flow-tools/files/0.68/flow-tools-0.68-
fix-a-zillion-warnings.diff

diff --exclude='*~' --exclude='.*' -I '$Id:' -urN flow-tools-0.68.orig/lib/
ftchash.c flow-tools-0.68/lib/ftchash.c
--- flow-tools-0.68.orig/lib/ftchash.c  2003-08-12 14:04:25.000000000 -0400
+++ flow-tools-0.68/lib/ftchash.c       2005-05-14 00:07:59.000000000 -0400
@@ -324,9 +324,10 @@ 
     /* more entries in this chunk *? */
     if  ((char*)ftch->traverse_rec <
       (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) {
+      char *p = (char *)ftch->traverse_rec;

       ret = ftch->traverse_rec;
-      (char*)ftch->traverse_rec += ftch->d_size;
+      p += ftch->d_size;
       return ret;

     } else {
... [skiped]

Require fix (remove this strings) this bug patch or use my patch after this 
patching.
Comment 5 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2005-09-16 03:42:01 UTC
I will make the changes shortly then, apologies as I thought this was part of
the core flow-tools package ( you didn't state otherwise in your original bug).
Comment 6 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2005-09-16 04:00:06 UTC
netmon has modified the warnings patch so that it won't make the changes in the
first place. Thanks for the report Alexander. (this should be committed shortly
by someone other then me as I can't get to my commit box atm. Thanks ka0tic).