tcpdump mailing list archives
Re: Debugging an issue with pcap_compile/pcap_setfilter
From: Adayadil Thomas <adayadil.thomas () gmail com>
Date: Thu, 18 Feb 2010 16:10:24 -0500
I tried after compiling with -ll and that does not solve the problem. 1. Is pcap_setfilter and pcap_compile threadsafe? My program runs couple of threads and each makes a call to pcap_setfilter and pcap_compile. 2. Running under valgrind gave this a. reports that there is no symbol table for libpcap b. an error about uninitialized bytes in setsockopt call Is this relevant? --3794-- Reading syms from /usr/lib/libpcap.so.0.9.4 (0x400F000) --3794-- object doesn't have a symbol table --3794-- Reading syms from /lib/libpthread-2.5.so (0x4DECC000) ==3794== Thread 3: ==3794== Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s) ==3794== at 0x4DDF05D7: setsockopt (in /lib/libc-2.5.so) ==3794== by 0x4014C68: pcap_setfilter (in /usr/lib/libpcap.so.0.9.4) ==3794== by 0x804C207: PacketFunc (program.c:1069) ==3794== by 0x4DED149A: start_thread (in /lib/libpthread-2.5.so) ==3794== by 0x4DDEF42D: clone (in /lib/libc-2.5.so) ==3794== Address 0x683B232 is on thread 3's stack Please advice, Thanks On Fri, Oct 30, 2009 at 2:34 PM, Adayadil Thomas <adayadil.thomas () gmail com> wrote:
I did not use the -ll option. I can try with that. However, the problem cannot be easily replicated. I see the issue only rarely. I don't know if that makes sense. With the same filter "tcp[13]&7!=0" I can run the program many times and not see the issue. And once in a while I see the issue. If it is related to the -ll the problem should be seen every time, right? On Fri, Oct 30, 2009 at 3:21 PM, Guy Harris <guy () alum mit edu> wrote:On Oct 29, 2009, at 8:23 AM, Adayadil Thomas wrote:symbol lookup error: /usr/lib/libpcap.so.0.9.4: undefined symbol: lex_cleanupWhen you built your program, did you link it with the "-ll" option? If not, try rebuilding it, and linking with "-ll", and let us know whether that fixes the problem. - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: Debugging an issue with pcap_compile/pcap_setfilter Adayadil Thomas (Feb 19)