Sparc64 OpenBSD4.1 Compile issue

Eric Pancer epancer at pobox.com
Thu Feb 7 15:57:04 EST 2008


On Feb 7, 2008 10:49 AM, Carter Bullard <carter at qosient.com> wrote:
> There is a bit of confusion here.  Your patches are for
> argus-clients, but your segfault is in argus.

Yes, I apologize about that. Let's move forward assuming argus is
failing and that I've built the clients and installed them
successfully so far.

> Just so we're all on the same page.  Be sure and get the
> latest code off the server.  While the names are the same
> the version on the server is changing constantly.
> The clients are new, rc.69.

I installed them (as well as argus-3.0.0 from today); note that I had
to make a change in clients/ratop/ratop.c to duplicate
!defined(OpenBSD) where Cygwin and sun were undefined, as well.

> Argus has Threads support turned off by default, so it
> doesn't need any patching, to get around the compile issue
> you're seeing.
>
> Please give the new argus a try asap, as I'm trying to get it
> released as soon as I can.
>
> I don't have access to any OpenBSD machines.
> I put in some ./configure support to deal with missing
> sched() routines, so that should help.  Grab this version
> and see how far you get on the compiles.

Great, thanks for the change. Now onto my problems :-)

Argus dumps core with a segmentation fault on startup.

argus[20517]: 31 Dec 69 18:00:00.018954 ArgusNewList () returning 0x40854040
argus[20517]: 31 Dec 69 18:00:00.034308 ArgusNewHashTable (65536)
returning 0x4cc2a000
argus[20517]: 31 Dec 69 18:00:00.034933 ArgusNewQueue () returning 0x40854080
argus[20517]: 31 Dec 69 18:00:00.035062 ArgusNewModeler() returning 0x4816c000
argus[20517]: 31 Dec 69 18:00:00.042180 ArgusNewSource() returning 0x4fcba000
argus[20517]: 31 Dec 69 18:00:00.042697 ArgusNewQueue () returning 0x408540c0
argus[20517]: 31 Dec 69 18:00:00.042815 ArgusNewOutput() returning
retn 0x49aa8000
argus[20517]: 31 Dec 69 18:00:00.043131 setArgusMarReportInterval(60) returning
argus[20517]: 31 Dec 69 18:00:00.043427 setArgusID(0x4816c000, 0x0) done
argus[20517]: 31 Dec 69 18:00:00.043548 ArgusDeleteList (0x0, 2) returning
argus[20517]: 31 Dec 69 18:00:00.043662 clearArgusDevice(0x4fcba000) returning
argus[20517]: 31 Dec 69 18:00:00.043772 setArgusPortNum(0) returning
argus[20517]: 31 Dec 69 18:00:00.043892 setArgusMarReportInterval(60) returning
argus[20517]: 31 Dec 69 18:00:00.044005 clearArgusConfiguration () returning
argus[20517]: 31 Dec 69 18:00:00.045560 setArgusPortNum(561) returning
argus[20517]: 31 Dec 69 18:00:00.046354 ArgusParseResourceFile:
ArgusBindAddr "(null)"
argus[20517]: 31 Dec 69 18:00:00.046653 setArgusMarReportInterval(300) returning
argus[20517]: 31 Dec 69 18:00:00.046784 ArgusParseResourceFile
(/etc/argus.conf) returning
argus[20517]: 31 Dec 69 18:00:00.046909 setArgusInterfaceStatus(1)
argus[20517]: 31 Dec 69 18:00:00.056608 ArgusNewList () returning 0x408543c0
argus[20517]: 31 Dec 69 18:00:00.056757 setArgusDevice(hme0) returning
argus[20517]: 31 Dec 69 18:00:00.058856 ArgusInitSource()
pcap_open_live(hme0) returned 0x4c000a00
argus[20517]: 31 Dec 69 18:00:00.059475 Arguslookup_pcap_callback(1)
returning ArgusEtherPacket(): 0x11d2b4
argus[20517]: 31 Dec 69 18:00:00.059602 ArgusOpenInterface(0x4fcba000,
'hme0') returning
argus[20517]: 31 Dec 69 18:00:00.061891 ArgusInitSource() returning
argus[20517]: 31 Dec 69 18:00:00.062025 ArgusNewList () returning 0x40854440
argus[20517]: 31 Dec 69 18:00:00.062234 ArgusGenerateInitialMar() returning
argus[20517]: 31 Dec 69 18:00:00.062360 ArgusEstablishListen(561,
127.0.0.1" , 0xfffe90d0)
argus[20517]: 31 Dec 69 18:00:00.072842
ArgusEstablishListen(1235910656, 0xfffe90d0) binding: 127.0.0.1" :561
Segmentation fault (core dumped)

Checking it out in gdb shows the following..

# gdb ./argus argus.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 "sparc64-unknown-openbsd4.2"...
Core was generated by `argus'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpcap.so.5.0...done.
Loaded symbols for /usr/lib/libpcap.so.5.0
Reading symbols from /usr/lib/libm.so.2.3...done.
Loaded symbols for /usr/lib/libm.so.2.3
Reading symbols from /usr/lib/libc.so.41.0...done.
Loaded symbols for /usr/lib/libc.so.41.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x000000000012e630 in ArgusEstablishListen (output=0x49aa8000,
    errbuf=0xfffffffffffe90d0 "") at ArgusOutput.c:677
677              if ((s = socket (hp->ai_family, hp->ai_socktype,
hp->ai_protocol)) >= 0) {
(gdb) where
#0  0x000000000012e630 in ArgusEstablishListen (output=0x49aa8000,
    errbuf=0xfffffffffffe90d0 "") at ArgusOutput.c:677
#1  0x000000000012cc1c in ArgusInitOutput (output=0x49aa8000)
    at ArgusOutput.c:170
#2  0x0000000000105ea4 in main (argc=6, argv=0xfffffffffffe9888) at argus.c:547
(gdb)  quit

I'm hitting a wall now. Please let me know where to go from here. I'll
check i386 next.

- Eric



More information about the argus mailing list