From regnauld at nsrc.org Wed Jul 21 17:41:34 2010 From: regnauld at nsrc.org (Phil Regnauld) Date: Wed, 21 Jul 2010 23:11:34 +0530 Subject: [dsc] Problem with dsc on Ubuntu Linux Message-ID: <20100721174127.GE18955@macbook.catpipe.net> Hi, Trying to setup DSC to work on Ubuntu Linux, but am seeing the collector dying immediately with a malloc error when trying to run it. See the output further down. Note that the collector runs if -d is specified, and exits as planned after the first write. Version: dsc-200912101623 OS: Ubuntu, Linux 2.6.31-14-generic-pae i686 The collector configuration is the dsc.conf.sample, with the following changes: local_address 192.168.50.116; run_dir "/usr/local/dsc/run/localhost"; interface eth0; Here's the output of the crash. I can provide any additonal info as required. Thanks, Phil # /usr/local/dsc/bin/dsc -f /usr/local/dsc/etc/dsc.conf *** glibc detected *** /usr/local/dsc/bin/dsc: malloc(): memory corruption: 0x08f97048 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb75aa0d1] /lib/tls/i686/cmov/libc.so.6[0xb75accc3] /lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x58)[0xb75ae978] /usr/lib/libstdc++.so.6(_Znwj+0x27)[0xb7782bb7] /usr/lib/libstdc++.so.6(_ZNSs4_Rep9_S_createEjjRKSaIcE+0x66)[0xb775e436] /usr/lib/libstdc++.so.6[0xb775f661] /usr/lib/libstdc++.so.6(_ZNSsC1ERKSsjj+0x52)[0xb775f8d2] /usr/local/dsc/bin/dsc[0x8064b03] /usr/local/dsc/bin/dsc[0x805acf3] /usr/local/dsc/bin/dsc[0x805ad0f] /usr/local/dsc/bin/dsc[0x8053490] /usr/local/dsc/bin/dsc[0x8053f37] /usr/local/dsc/bin/dsc[0x8053f37] /usr/local/dsc/bin/dsc[0x8053f37] /usr/local/dsc/bin/dsc[0x80568b4] /usr/local/dsc/bin/dsc[0x804fde0] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb7555b56] /usr/local/dsc/bin/dsc[0x804b031] ======= Memory map: ======== 08048000-0806f000 r-xp 00000000 08:01 40633 /usr/local/dsc/bin/dsc 0806f000-08070000 r--p 00026000 08:01 40633 /usr/local/dsc/bin/dsc 08070000-08071000 rw-p 00027000 08:01 40633 /usr/local/dsc/bin/dsc 08071000-08112000 rw-p 00000000 00:00 0 08f66000-08fa8000 rw-p 00000000 00:00 0 [heap] b7400000-b7421000 rw-p 00000000 00:00 0 b7421000-b7500000 ---p 00000000 00:00 0 b753d000-b753f000 rw-p 00000000 00:00 0 b753f000-b767d000 r-xp 00000000 08:01 927 /lib/tls/i686/cmov/libc-2.10.1.so b767d000-b767e000 ---p 0013e000 08:01 927 /lib/tls/i686/cmov/libc-2.10.1.so b767e000-b7680000 r--p 0013e000 08:01 927 /lib/tls/i686/cmov/libc-2.10.1.so b7680000-b7681000 rw-p 00140000 08:01 927 /lib/tls/i686/cmov/libc-2.10.1.so b7681000-b7684000 rw-p 00000000 00:00 0 b7684000-b76a0000 r-xp 00000000 08:01 2719 /lib/libgcc_s.so.1 b76a0000-b76a1000 r--p 0001b000 08:01 2719 /lib/libgcc_s.so.1 b76a1000-b76a2000 rw-p 0001c000 08:01 2719 /lib/libgcc_s.so.1 b76a2000-b76c6000 r-xp 00000000 08:01 931 /lib/tls/i686/cmov/libm-2.10.1.so b76c6000-b76c7000 r--p 00023000 08:01 931 /lib/tls/i686/cmov/libm-2.10.1.so b76c7000-b76c8000 rw-p 00024000 08:01 931 /lib/tls/i686/cmov/libm-2.10.1.so b76c8000-b77ae000 r-xp 00000000 08:01 2758 /usr/lib/libstdc++.so.6.0.13 b77ae000-b77b2000 r--p 000e6000 08:01 2758 /usr/lib/libstdc++.so.6.0.13 b77b2000-b77b3000 rw-p 000ea000 08:01 2758 /usr/lib/libstdc++.so.6.0.13 b77b3000-b77ba000 rw-p 00000000 00:00 0 b77ba000-b77ca000 r-xp 00000000 08:01 2704 /lib/tls/i686/cmov/libresolv-2.10.1.so b77ca000-b77cb000 r--p 00010000 08:01 2704 /lib/tls/i686/cmov/libresolv-2.10.1.so b77cb000-b77cc000 rw-p 00011000 08:01 2704 /lib/tls/i686/cmov/libresolv-2.10.1.so b77cc000-b77cf000 rw-p 00000000 00:00 0 b77cf000-b77e2000 r-xp 00000000 08:01 934 /lib/tls/i686/cmov/libnsl-2.10.1.so b77e2000-b77e3000 r--p 00012000 08:01 934 /lib/tls/i686/cmov/libnsl-2.10.1.so b77e3000-b77e4000 rw-p 00013000 08:01 934 /lib/tls/i686/cmov/libnsl-2.10.1.so b77e4000-b77e6000 rw-p 00000000 00:00 0 b77e6000-b7817000 r-xp 00000000 08:01 39037 /usr/lib/libpcap.so.1.0.0 b7817000-b7818000 r--p 00031000 08:01 39037 /usr/lib/libpcap.so.1.0.0 b7818000-b7819000 rw-p 00032000 08:01 39037 /usr/lib/libpcap.so.1.0.0 b781e000-b7820000 rw-p 00000000 00:00 0 b7820000-b7821000 r-xp 00000000 00:00 0 [vdso] b7821000-b783c000 r-xp 00000000 08:01 2446 /lib/ld-2.10.1.so b783c000-b783d000 r--p 0001a000 08:01 2446 /lib/ld-2.10.1.so b783d000-b783e000 rw-p 0001b000 08:01 2446 /lib/ld-2.10.1.so bfe89000-bfe9e000 rw-p 00000000 00:00 0 [stack] Aborted From stephan.lagerholm at secure64.com Wed Jul 28 19:45:40 2010 From: stephan.lagerholm at secure64.com (Stephan Lagerholm) Date: Wed, 28 Jul 2010 13:45:40 -0600 Subject: [dsc] Compile errors Message-ID: I can not get the collector to compile. Any ideas on how to fix? root at netbook:/home/stephan/dsc/dsc-200911111630/collector# uname -a Linux netbook 2.6.31-22-generic #60-Ubuntu SMP Thu May 27 00:22:23 UTC 2010 i686 GNU/Linux root at netbook:/home/stephan/dsc/dsc-200911111630/collector# make (cd dsc; test -s Makefile || ./configure ; make all) make[1]: Entering directory `/home/stephan/dsc/dsc-200911111630/collector/dsc' cc -g -Wall -g -Wall -c -o pcap.o pcap.c pcap.c:17:18: error: pcap.h: No such file or directory pcap.c:95: error: expected specifier-qualifier-list before ?pcap_t? pcap.c:907: warning: ?struct pcap_pkthdr? declared inside parameter list pcap.c:907: warning: its scope is only this definition or declaration, which is probably not what you want Thanks in advance, S ---------------------------------------------------------------------- Stephan Lagerholm Senior DNS Architect, M.Sc. ,CISSP Secure64 Software Corporation, www.secure64.com Cell: 469-834-3940 From alexandre.chapellon at mana.pf Wed Jul 28 20:18:49 2010 From: alexandre.chapellon at mana.pf (Alexandre Chapellon) Date: Wed, 28 Jul 2010 10:18:49 -1000 Subject: [dsc] Compile errors In-Reply-To: References: Message-ID: <1280348329.5768.2.camel@mcbain.mana.lan> Sounds like you're missing libcap developement headers. sudo apt-get install libpcap0.8-dev Le mercredi 28 juillet 2010 ? 13:45 -0600, Stephan Lagerholm a ?crit : > I can not get the collector to compile. Any ideas on how to fix? > > > > root at netbook:/home/stephan/dsc/dsc-200911111630/collector# uname -a > > Linux netbook 2.6.31-22-generic #60-Ubuntu SMP Thu May 27 00:22:23 UTC 2010 i686 GNU/Linux > > > > root at netbook:/home/stephan/dsc/dsc-200911111630/collector# make > > (cd dsc; test -s Makefile || ./configure ; make all) > > make[1]: Entering directory `/home/stephan/dsc/dsc-200911111630/collector/dsc' > > cc -g -Wall -g -Wall -c -o pcap.o pcap.c > > pcap.c:17:18: error: pcap.h: No such file or directory > > pcap.c:95: error: expected specifier-qualifier-list before ?pcap_t? > > pcap.c:907: warning: ?struct pcap_pkthdr? declared inside parameter list > > pcap.c:907: warning: its scope is only this definition or declaration, which is probably not what you want > > > > Thanks in advance, S > > ---------------------------------------------------------------------- > > Stephan Lagerholm > > Senior DNS Architect, M.Sc. ,CISSP > > Secure64 Software Corporation, www.secure64.com > > Cell: 469-834-3940 > > > > _______________________________________________ > dsc mailing list > dsc at measurement-factory.com > http://www.measurement-factory.com/mailman/listinfo/dsc From stephan.lagerholm at secure64.com Wed Jul 28 21:32:58 2010 From: stephan.lagerholm at secure64.com (Stephan Lagerholm) Date: Wed, 28 Jul 2010 15:32:58 -0600 Subject: [dsc] Compile errors In-Reply-To: <1280348329.5768.2.camel@mcbain.mana.lan> References: <1280348329.5768.2.camel@mcbain.mana.lan> Message-ID: Hi Alexandre and thanks that worked. Is it possible to setup dsc to read from a previously recorded pcap file instead of directly from an interface? /S ---------------------------------------------------------------------- Stephan Lagerholm Senior DNS Architect, M.Sc. ,CISSP Secure64 Software Corporation, www.secure64.com Cell: 469-834-3940 > -----Original Message----- > From: Alexandre Chapellon [mailto:alexandre.chapellon at mana.pf] > Sent: Wednesday, July 28, 2010 3:19 PM > To: Stephan Lagerholm > Cc: dsc at measurement-factory.com > Subject: Re: [dsc] Compile errors > > Sounds like you're missing libcap developement headers. > sudo apt-get install libpcap0.8-dev > > Le mercredi 28 juillet 2010 ? 13:45 -0600, Stephan Lagerholm a ?crit : > > > I can not get the collector to compile. Any ideas on how to fix? > > > > root at netbook:/home/stephan/dsc/dsc-200911111630/collector# uname -a > > Linux netbook 2.6.31-22-generic #60-Ubuntu SMP Thu May 27 00:22:23 > UTC 2010 i686 GNU/Linux > > > > root at netbook:/home/stephan/dsc/dsc-200911111630/collector# make > > (cd dsc; test -s Makefile || ./configure ; make all) > > make[1]: Entering directory `/home/stephan/dsc/dsc- > 200911111630/collector/dsc' > > cc -g -Wall -g -Wall -c -o pcap.o pcap.c > > pcap.c:17:18: error: pcap.h: No such file or directory > > pcap.c:95: error: expected specifier-qualifier-list before ?pcap_t? > > pcap.c:907: warning: ?struct pcap_pkthdr? declared inside parameter > list > > pcap.c:907: warning: its scope is only this definition or > declaration, which is probably not what you want > > > > Thanks in advance, S > > -------------------------------------------------------------------- > -- > > Stephan Lagerholm > > Senior DNS Architect, M.Sc. ,CISSP > > Secure64 Software Corporation, www.secure64.com > > Cell: 469-834-3940 > > > > _______________________________________________ > dsc mailing list > dsc at measurement-factory.com > http://www.measurement-factory.com/mailman/listinfo/dsc > From wessels at measurement-factory.com Wed Jul 28 23:36:53 2010 From: wessels at measurement-factory.com (Duane Wessels) Date: Wed, 28 Jul 2010 17:36:53 -0600 (MDT) Subject: [dsc] Compile errors In-Reply-To: References: <1280348329.5768.2.camel@mcbain.mana.lan> Message-ID: On Wed, 28 Jul 2010, Stephan Lagerholm wrote: > Is it possible to setup dsc to read from a previously recorded pcap file instead of directly from an interface? Unfortunately, no. DSC assumes that it is reading packets in "real-time". In other words, it assumes that the packet timestamp is close to the current time. DW From stephan.lagerholm at secure64.com Thu Jul 29 00:51:30 2010 From: stephan.lagerholm at secure64.com (Stephan Lagerholm) Date: Wed, 28 Jul 2010 18:51:30 -0600 Subject: [dsc] Compile errors In-Reply-To: References: <1280348329.5768.2.camel@mcbain.mana.lan> Message-ID: Hi Duane and thanks for your response, The collector will not easily run on the DNS server in question but I can get a pcap file from it that I can scp out. What will happen if I hack the DSC source to read from a file instead? Will the statistics get all screwed up? /S ---------------------------------------------------------------------- Stephan Lagerholm Senior DNS Architect, M.Sc. ,CISSP Secure64 Software Corporation, www.secure64.com Cell: 469-834-3940 > -----Original Message----- > From: Duane Wessels [mailto:wessels at measurement-factory.com] > Sent: Wednesday, July 28, 2010 6:37 PM > To: Stephan Lagerholm > Cc: dsc at measurement-factory.com > Subject: Re: [dsc] Compile errors > > > > > On Wed, 28 Jul 2010, Stephan Lagerholm wrote: > > > Is it possible to setup dsc to read from a previously recorded pcap file > instead of directly from an interface? > > Unfortunately, no. DSC assumes that it is reading packets in "real-time". > In > other words, it assumes that the packet timestamp is close to the current > time. > > DW