URL: https://github.com/SSSD/sssd/pull/107
Title: #107: WATCHDOG: Avoid non async-signal-safe from the signal_handler

fidencio commented:
"""
On Mon, Dec 12, 2016 at 1:50 PM, Pavel Březina <notificati...@github.com>
wrote:

> *@pbrezina* commented on this pull request.
> ------------------------------
>
> In src/util/util_watchdog.c
> <https://github.com/SSSD/sssd/pull/107#pullrequestreview-12447634>:
>
> > +         *
> +         * As restarting the watchdog from the signal_handler may
> +         * lead sssd_be to a deadlock due to the use of non async-
> +         * signal-safe function. let's just (re)set the timer's
> +         * time.
> +         */
> +
> +        /* As done when setting up the watchdog handler,
> +         * we give 1 second head start to the watchdog event */
> +        its.it_value.tv_sec = watchdog_ctx.interval.tv_sec + 1;
> +        its.it_value.tv_nsec = 0;
> +        its.it_interval.tv_sec = watchdog_ctx.interval.tv_sec;
> +        its.it_interval.tv_nsec = 0;
> +        ret = timer_settime(watchdog_ctx.timerid, 0, &its, NULL);
> +        if (ret == -1) {
> +            _exit(1);
>
> This is not sufficient because we need to reset the tevent timer. I think
> watchdog itself is actually fired in the right time because the timer clock
> is adjusted. The problematic timer is the tevent one, which needs to be
> rescheduled.
>

Okay. I guess I see what you mean.
Even with this timeout being reset the watchdog would end up killing the
process due to the tevent timeout, is it?
Considering that's the case I'd say there's nothing much that can be done
from our side apart from ignoring the ticks on those cases. At least till
we have it changed/fixed on tevent's side. And suggestions are welcome!


> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/SSSD/sssd/pull/107#pullrequestreview-12447634>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAG4ehq9DnuKDBXQwCWLtnxBLhHl90yUks5rHUMRgaJpZM4LKVED>
> .
>
Thanks for the review!
--
Fabiano Fidêncio

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/107#issuecomment-266431337
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to