[ARGUS] tv_nsec potentially invalid value
Ming Fu via Argus-info
argus-info at lists.andrew.cmu.edu
Mon Nov 25 22:29:23 EST 2024
Hi Carter,
Great! I only looked at the header. Didn't notice the 5.0.2 branch is newer.
Thanks
Ming
-----Original Message-----
From: Carter Bullard <carter at qosient.com>
Sent: Monday, November 25, 2024 10:27 PM
To: Ming Fu <Ming.Fu at esentire.com>
Cc: argus-info at lists.andrew.cmu.edu
Subject: Re: [ARGUS] tv_nsec potentially invalid value
Yes !!! We fixed this in 5.0.2 which was released last week ... should be there ...
Carter
> On Nov 25, 2024, at 9:56 PM, Ming Fu via Argus-info <argus-info at lists.andrew.cmu.edu> wrote:
>
> Hi,
>
> I noticed a few argus 5.0.0 unexpected stops. Very hard to reproduce, but I think the problem is here:
>
> https://github.com/openargus/argus/blob/main/argus/ArgusSource.c#L4856
>
> tts->tv_sec = tvp->tv_sec + 0;
> tts->tv_nsec = (tvp->tv_usec * 1000) + 250000000;
> if (tts->tv_nsec > 1000000000) {
> tts->tv_sec++;
> tts->tv_nsec -= 1000000000;
> }
> if ((retn = pthread_cond_timedwait(&stask->cond, &stask->lock, tts))) {
> ....
>
> The error log is:
> argus-rt[2591]: ArgusSourceProcess: pthread_cond_timedwait() error EINVAL
>
> The compare at line 4856 should be
> if (tts->tv_nsec >= 1000000000) {
>
> 1000000000 is an invalid nsec number.
>
> Regards,
> Ming
More information about the argus
mailing list