Time Issue on OpenBSD 4.2 with rc.69 (Was: Re: Sparc64 OpenBSD4.1 Compile issue)
Carter Bullard
carter at qosient.com
Mon Feb 11 10:58:56 EST 2008
Hey Eric,
OK, so I think we have a fundamental testing issue. You should
not be in ArgusNtoH if we're testing on the sparc64 machine. I
think testing anywhere else is not going to be fruitful. So lets
move to the sparc64 and see what its doing!!!
The original problem was that the sparc64 machine was
generating poor data.
So we double checked to find the combination of programs that
expressed the problem. You suggested all combinations did,
1) sparc64 argus() -> sparc64 ra() - timestamp problem
2) sparc64 argus() -> intel-32 ra() - timestamp problem
3) intel-32 argus() -> sparc64 ra() - timestamp problem
Is this true? If so, all fingers are pointing to the sparc64 machine?
If you're having problems with other combinations than these, then
there other issues at work that need to be eliminated before we
proceed.
So, in all the conditions above, ra() is directly connecting to
argus(), no radii() anywhere along the path, so we are actually
seeing the actual wire data that argus() generates?
Radium() transforms argus() data. It has to unpack it and then
pack it back up again, so radium() can generate problems just
as easily as argus(), so we definitely don't want any radii in
these investigations. If you're unsure, you can validate that by
matching port numbers (what is the PORT number being used
in the sparc64 /etc/argus.conf?)
OK, assuming that you only get the problem when it is a sparc64
argus(), you should be doing all of these tests on the sparc64
machine. Can you rerun the last test on the sparc64?
Carter
On Feb 11, 2008, at 12:54 AM, Eric Pancer wrote:
> On Sun, 2008-02-10 at 16:33:50 -0500, Carter Bullard proclaimed...
>
>> So in back tracking, this shouldn't be a little endian machine,
>> but the
>> only code that works on this buffer before the routine you looked
>> at, is
>> ArgusNtoH(). To see if its messing things up in ra():
>>
>> So, in gdb()
>> (gdb) l ArgusNtoH
>> (gdb) break 13669
>> (gdb) run
>>
>> to see if we ever break here.
>> If so, do this:
>>
>> (gdb) x/5x dsr
>>
>> then slowly step until you reach the 'break', and print again
>> (gdb) x/5x dsr
>
> Hiya -
>
> Here we go.........
>
> $ gdb ra
> 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-openbsd4.2"...
> (gdb) l ArgusNtoH
> 13465 #endif
> 13466
> 13467
> 13468 void
> 13469 ArgusNtoH (struct ArgusRecord *argus)
> 13470 {
> 13471 #if defined(_LITTLE_ENDIAN)
> 13472 struct ArgusRecordHeader *hdr = &argus->hdr;
> 13473 struct ArgusDSRHeader *dsr = (struct ArgusDSRHeader *)
> (hdr + 1);
> 13474
> (gdb) break 13669
> Breakpoint 1 at 0x1c0348e4: file argus_util.c, line 13669.
> (gdb) run
> Starting program: /usr/local/argus/bin/ra
> [Switching to process 18619, thread 0x8bcde000]
>
> Breakpoint 1, ArgusNtoH (argus=0x84f2e01c) at argus_util.c:13669
> 13669 for (i = 1; i < dsr->argus_dsrvl8.len; i++)
> (gdb) x/5x dsr
> 0x84f2e040: 0x03180903 0x0e480a00 0x4e000000
> 0x02060110
> 0x84f2e050: 0x4e000100
> (gdb) n
> 13670 dtime[i] = ntohl(dtime[i]);
> (gdb) n
> 13669 for (i = 1; i < dsr->argus_dsrvl8.len; i++)
> (gdb) n
> 13670 dtime[i] = ntohl(dtime[i]);
> (gdb) n
> 13669 for (i = 1; i < dsr->argus_dsrvl8.len; i++)
> (gdb) n
> 13965 if (dsr->subtype & ARGUS_LEN_16BITS)
> (gdb) n
> 13968 if ((cnt = (((dsr->type & ARGUS_IMMEDIATE_DATA) ? 1 :
> (gdb) n
> 13971 dsr = (struct ArgusDSRHeader *)((char *)dsr +
> cnt);
> (gdb) n
> 13513 while ((char *) dsr < ((char *) argus + (hdr->len *
> 4))) {
> (gdb) n
> 13514 switch (dsr->type & 0x7F) {
> (gdb) n
> 13675 if (dsr->subtype & ARGUS_METER_PKTS_BYTES) {
> (gdb) n
> 13676 switch (dsr->argus_dsrvl8.qual & 0x0F) {
> (gdb) n
> 13701 ((unsigned short *)(dsr + 1))[0] =
> ntohs(((unsigned short *)(dsr + 1))[0]);
> (gdb) n
> 13702 ((unsigned short *)(dsr + 1))[1] =
> ntohs(((unsigned short *)(dsr + 1))[1]);
> (gdb) n
> 13703 break;
> (gdb) x/5x dsr
> 0x84f2e04c: 0x02060110 0x004e0001 0x05000330
> 0x02000000
> 0x84f2e05c: 0x7b4f9929
>
> Thanks,
>
> - Eric
>
More information about the argus
mailing list