new software on the server, ..., almost done

Carter Bullard carter at qosient.com
Wed Sep 5 20:15:24 EDT 2007


While we should be testing the clients with .threads, and argus without,
the clients still need to compile if the tag file is not there, ...,  
so, ...

The best fix for the missing defines with the .threads tag removed, is
to move the tcount and the ArgusRemote arrays outside of the
#ifdef ARGUS_THREADS in ./include/argus_parser.h.  Here is a patch:

==== //depot/argus/clients/include/argus_parser.h#31 - /home/carter/ 
argus/clients/include/argus_parser.h ====
172a173
 > struct ArgusRemoteStruct {
174d174
< struct ArgusRemoteStruct {
176a177
 > #endif
179d179
< #endif
203a204,206
 >    pthread_t input, output, dns;
 > #endif /* ARGUS_THREADS */
 >
205d207
<    pthread_t input, output, dns;
207d208
< #endif /* ARGUS_THREADS */


It compiles fine this way and  closes without any issues.  Give it a  
try,
I'll have a new clients up on the server later tonight.

Was there a problem with the .threads support for the clients?

Carter



On Sep 5, 2007, at 7:09 PM, K K wrote:

> On 9/5/07, Carter Bullard <carter at qosient.com> wrote:
>> Gentle people,
>> There are new packages for argus and its clients on the dev server.
>
> Compiling on OpenBSD requires adding one line into to argus_main.c  
> and ratop.c:
> #include <sched.h>
>
> Compiling argus-clients fails with threads disabled (by removing
> .threads). Multiple areas reference tcount as a member of struct
> ArgusInput.  Wrapping these blocks in #if defined(ARGUS_THREADS) ...
> #endif is necessary to compile without threads.
>
> With or without threads, I get core dumps under OpenBSD:
>
> $ pwd
> /usr/local/src/argus/argus-clients-3.0.0.rc.51
> $  time bin/ra -nn -r argus.2007.09.05.15.00.01.gz |wc -l
> ra in free(): error: free_pages: pointer to wrong page
>  1211618
> Abort (core dumped)
>         34.680u 5.140s 0:45.74 87.0%    0+0k 457+222io 62pf+0w
> $ gdb bin/ra ./ra.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 "i386-unknown-openbsd3.9"...
> Core was generated by `ra'.
> Program terminated with signal 6, Aborted.
> Reading symbols from /usr/lib/libm.so.2.1...done.
> Loaded symbols for /usr/lib/libm.so.2.1
> Reading symbols from /usr/lib/libreadline.so.3.0...done.
> Loaded symbols for /usr/lib/libreadline.so.3.0
> Reading symbols from /usr/lib/libtermcap.so.10.0...done.
> Loaded symbols for /usr/lib/libtermcap.so.10.0
> Reading symbols from /usr/lib/libc.so.39.0...done.
> Loaded symbols for /usr/lib/libc.so.39.0
> Reading symbols from /usr/libexec/ld.so...done.
> Loaded symbols for /usr/libexec/ld.so
> #0  0x0471c995 in kill () from /usr/lib/libc.so.39.0
> (gdb) bt
> #0  0x0471c995 in kill () from /usr/lib/libc.so.39.0
> #1  0x0475906f in abort () at /usr/src/lib/libc/stdlib/abort.c:65
> #2  0x0473ca5a in wrterror (p=0x246eb460 "free_pages: pointer to  
> wrong page")
>     at /usr/src/lib/libc/stdlib/malloc.c:434
> #3  0x0473cb1b in wrtwarning (p=0x246eb460 "free_pages: pointer to  
> wrong page")
>     at /usr/src/lib/libc/stdlib/malloc.c:444
> #4  0x0473df87 in free_pages (ptr=0x3c003080, index=245775, info=0x0)
>     at /usr/src/lib/libc/stdlib/malloc.c:1307
> #5  0x0473da50 in ifree (ptr=0x3c003080)
>     at /usr/src/lib/libc/stdlib/malloc.c:1728
> #6  0x0473dc0d in free (ptr=0x3c003080) at
> /usr/src/lib/libc/stdlib/malloc.c:1791
> #7  0x1c035da5 in ArgusCloseParser ()
> #8  0x1c002b91 in main ()
> (gdb)
>



More information about the argus mailing list