Segfault when running possibly silly command line options
Carter Bullard
carter at qosient.com
Mon Oct 1 21:24:26 EDT 2012
Hey Jesse,
Here is a patch that fixes the bug you reported.
Sorry for the delay. This will be in the official argus-clients-3.0.7.2 that I'll put up later this week.
If you find anything else, holler !!!!
Carter
osiris:common carter$ diff -c argus_util.c.orig argus_util.c
*** argus_util.c.orig Mon Oct 1 21:22:57 2012
--- argus_util.c Mon Oct 1 21:21:16 2012
***************
*** 4198,4210 ****
} else {
struct ArgusTimeObject *dtime = (struct ArgusTimeObject *)argus->dsrs[ARGUS_TIME_INDEX];
! if (parser->ArgusStartTimeVal.tv_sec == 0) {
! parser->ArgusStartTimeVal.tv_sec = dtime->src.start.tv_sec;
! parser->ArgusStartTimeVal.tv_usec = dtime->src.start.tv_usec;
! }
- if (dtime != NULL)
RaDiffTime ((struct timeval *)&dtime->src.start, &parser->ArgusStartTimeVal, tvp);
}
bzero(tbuf, sizeof(tbuf));
--- 4198,4211 ----
} else {
struct ArgusTimeObject *dtime = (struct ArgusTimeObject *)argus->dsrs[ARGUS_TIME_INDEX];
! if (dtime != NULL) {
! if (parser->ArgusStartTimeVal.tv_sec == 0) {
! parser->ArgusStartTimeVal.tv_sec = dtime->src.start.tv_sec;
! parser->ArgusStartTimeVal.tv_usec = dtime->src.start.tv_usec;
! }
RaDiffTime ((struct timeval *)&dtime->src.start, &parser->ArgusStartTimeVal, tvp);
+ }
}
bzero(tbuf, sizeof(tbuf));
On Sep 27, 2012, at 10:06 AM, Jesse Bowling <jessebowling at gmail.com> wrote:
> Unfortunately, that does not affect the bug, except to remove the printing of the management record...
>
> (gdb) run -F /usr/local/src/argus-clients-3.0.6.2/support/Config/rarc.print.all.conf -r argus.2012.09.13.15.15.00 -L -1 -N 1 -M dsrs=flow - not man
> Starting program: /usr/local/bin/ra -F /usr/local/src/argus-clients-3.0.6.2/support/Config/rarc.print.all.conf -r argus.2012.09.13.15.15.00 -L -1 -N 1 -M dsrs=flow - not man
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000419530 in ArgusPrintRelativeDate (parser=0x7ffff7e9f010, buf=0x7ffffff9d7c0 "", argus=0x7ffff7e3d620, len=12) at ./argus_util.c:4202
> 4202 parser->ArgusStartTimeVal.tv_sec = dtime->src.start.tv_sec;
> (gdb) print dtime->src.start.tv_sec
> Cannot access memory at address 0x4
> (gdb) print parser->ArgusStartTimeVal.tv_sec
> $1 = 0
>
> However, perhaps this is a case of bad data? I notice that when I add in another DSR, I do not get a segfault, but I do get some garbage characters:
>
> $ ra -F /usr/local/src/argus-clients-3.0.6.2/support/Config/rarc.print.all.conf -r argus.2012.09.13.15.15.00 -L -1 -N 1 -M dsrs=flow,time - not man
> pM^`�,1,,0,15:15:00.014730,15:15:00.060119,0.045389,1348754304.000000,15:15:00.060119,15:15:00.060119,0.000000,0.000000,15:15:00.014730,15:15:00.014730,258210486.37500,128,,,1, ,0.045389,0.000000,0.045389,0.045389,0.045389,10.10.0.0,10.10.10.15,,74.0.0.0,74.125.228.21,tcp,56456,https,US,US,,,,,,,,,,,,,,,,,,,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0.000000,0.000000,0.000000,0,0,0,0.000000,0.000000,0.000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,INT,Status,,,,,,,,,,,,,,,0.000000,,,,0.000000,,,,,,,,,,,,,,,0.000000,0.000000,,,,,,,,,0.000000,0.000000,0.000000,,,,,
>
> Let me know what I can do to help troubleshoot...
>
> Cheers,
>
> Jesse
>
> On Wed, Sep 26, 2012 at 6:05 PM, Carter Bullard <carter at qosient.com> wrote:
> Hey Jesse,
> Excellent, a bug report ;O) It's having problems with the first management record trying to print one of the obscure time attributes. How does it do without the man records ? Can you run it with the filter " - not man " ?
>
> I try to fix this tonight when I can get to the code.
>
> Carter
>
> On Sep 26, 2012, at 11:29 AM, Jesse Bowling <jessebowling at gmail.com> wrote:
>
> > In trying to explore what data the various dsrs contain, I ran across a segfault. It's possible that no one would actually want to run with the options I'm using, but I'll report this just to make the issue known...
> >
> > Starting program: /usr/local/bin/ra -F /usr/local/src/argus-clients-3.0.6.2/support/Config/rarc.print.all.conf -r argus.2012.09.13.15.15.00.gz -M dsrs=flow -L -1 -N 1
> > [Thread debugging using libthread_db enabled]
> > 10.10.10.10,,0,0,06:43:33.213730,06:43:31.623988,0.000000,,06:43:31.623988,06:43:33.213730,0.000000,0.000000,06:43:31.623988,06:43:33.213730,1347533013.21373,0,,,, ,,,,,,0,0,,0,0,man,0,0,,,,,,,,,,,,,0,0,0,0,0,0,0,0,0,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0.000000,0.000000,0.000000,0,0,0,0.000000,0.000000,0.000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,STA,Start,,,,,,,,,,,,,,,,0.000000,,,,0.000000,,,,,,,,,,,,,,,0.000000,0.000000,,,,,,,,,0.000000,0.000000,0.000000,,,,,
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x0000000000419530 in ArgusPrintRelativeDate (parser=0x7ffff7e9f010, buf=0x7ffffff9d7e0 "", argus=0x7ffff7e3d620, len=12) at ./argus_util.c:4202
> > 4202 parser->ArgusStartTimeVal.tv_sec = dtime->src.start.tv_sec;
> > (gdb) print parser->ArgusStartTimeVal.tv_sec
> > $1 = 0
> > (gdb) print dtime->src.start.tv_sec
> > Cannot access memory at address 0x4
> >
> > Cheers,
> >
> > Jesse
> >
> > --
> > Jesse Bowling
> >
> >
>
>
>
> --
> Jesse Bowling
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20121001/d7f83112/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2589 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20121001/d7f83112/attachment.bin>
More information about the argus
mailing list