Time Issue on OpenBSD 4.2 with rc.69 (Was: Re: Sparc64 OpenBSD4.1 Compile issue)

Eric Pancer epancer at pobox.com
Sun Feb 10 02:10:13 EST 2008


On Sat, 2008-02-09 at 15:08:23 -0500, Carter Bullard proclaimed...

> So you see the problem!!!!
> Argus is generating good time numbers and the clients are not
> unpacking them correctly.
> 
> So in ra() set another break point in ArgusGenerateRecordStruct(),
> so we can see what is going wrong.

$ 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 ArgusGenerateRecordStruct
2559
2560    struct ArgusRecordStruct ArgusGenerateRecordBuffer;
2561
2562    struct ArgusRecordStruct *
2563    ArgusGenerateRecordStruct (struct ArgusParserStruct *parser, struct
ArgusInput *input, struct ArgusRecord *argus)
2564    {
2565       struct ArgusRecordStruct *retn = NULL;
2566       unsigned int ArgusReverse = 0, status = 0;
2567
2568       if (argus == NULL) {
(gdb) break 2938
Breakpoint 1 at 0x1c04e5e1: file argus_client.c, line 2938.
(gdb) run -S 10.15.223.177
Starting program: /usr/local/argus/bin/ra -S 10.15.223.177
[Switching to process 18461, thread 0x7e0c5000]

Breakpoint 1, ArgusGenerateRecordStruct (parser=0x7d9bf01c,
input=0x7c6e401c,
    argus=0x8858001c) at argus_client.c:2938
2938                         if (subtype & 0x78) {
(gdb) x/12x dsr
0x88580044:     0x03180903      0x00071229      0x0000003c      0x02060110
0x88580054:     0x003c0001      0x01000030      0x03000020      0x00000002
0x88580064:     0x00000000      0x00000000      0x00000000      0x00000000
(gdb) n
2939                            unsigned int *tptr = (unsigned int *) (dsr +
1);
(gdb) n
2940                            unsigned int *tval = NULL;
(gdb) n
2941                            int tlen = 2, sindex = -1, tind = 0;
(gdb) n
2943                            if (!(subtype & (ARGUS_TIME_SRC_START |
ARGUS_TI
ME_DST_START)))
(gdb) n
2946                            ctime->hdr = time->hdr;
(gdb) n
2948                            for (i = 0; i < 4; i++) {
(gdb) n
2949                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2950                                  tind++;
(gdb) n
2948                            for (i = 0; i < 4; i++) {
(gdb) n
2949                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2948                            for (i = 0; i < 4; i++) {
(gdb) n
2949                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2948                            for (i = 0; i < 4; i++) {
(gdb) n
2949                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2948                            for (i = 0; i < 4; i++) {
(gdb) n
2953                            if (tind != num) {
(gdb) n
2976                            sindex = (subtype & ARGUS_TIME_SRC_START) ?
0 :
2;
(gdb) n
2978                            for (i = 0; i < 4; i++) {
(gdb) n
2979                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2980                                  switch (ARGUS_TIME_SRC_START << i) {
(gdb) n
2982                                        tval = (unsigned int
*)&ctime->src.start;
(gdb) n
2983                                        break;
(gdb) n
2998                                  if (tval && tlen) {
(gdb) n
2999                                     switch (subtype & 0x07) {
(gdb) n
3003                                           for (y = 0; y < tlen; y++)
(gdb) n
3004                                              *tval++ = (*(unsigned int
*)tptr++);
(gdb) n
3003                                           for (y = 0; y < tlen; y++)
(gdb) n
3004                                              *tval++ = (*(unsigned int
*)tptr++);
(gdb) n
3003                                           for (y = 0; y < tlen; y++)
(gdb) n
2978                            for (i = 0; i < 4; i++) {
(gdb) n
2979                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2978                            for (i = 0; i < 4; i++) {
(gdb) n
2979                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2978                            for (i = 0; i < 4; i++) {
(gdb) n
2979                               if (subtype & (ARGUS_TIME_SRC_START <<
i)) {
(gdb) n
2978                            for (i = 0; i < 4; i++) {
(gdb) n
3027                            if (ctime->src.start.tv_sec == 0)
(gdb) n
3030                            if (ctime->src.end.tv_sec == 0)
(gdb) n
3031                               ctime->src.end = ctime->src.start;
(gdb) n
3032                            if (ctime->dst.end.tv_sec == 0)
(gdb) n
3033                               ctime->dst.end = ctime->dst.start;
(gdb) n
3079                         retn->dsrs[ARGUS_TIME_INDEX] = (struct
ArgusDSRHeader*) &retn->canon.time;
(gdb) print retn->canon.time
$1 = {hdr = {type = 3 '\003', subtype = 9 '\t', dsr_un = {fl = {data = 792},
      vl8 = {qual = 24 '\030', len = 3 '\003'}, vl16 = {len = 792}}}, src =
{
    start = {tv_sec = 463401, tv_usec = 60}, end = {tv_sec = 463401,
      tv_usec = 60}}, dst = {start = {tv_sec = 0, tv_usec = 0}, end = {
      tv_sec = 0, tv_usec = 0}}}


END OF GDB REPORT



More information about the argus mailing list