[LEDE-DEV] [PATCH] uloop: use a waker for notifying sigchld and loop cancel events

Hans Dedecker dedeckeh at gmail.com
Thu Jun 16 00:26:58 PDT 2016


On Wed, Jun 15, 2016 at 4:54 PM, Mats Karrman <mats.dev.list at gmail.com> wrote:
>
> On 2016-06-15 15:16, Felix Fietkau wrote:
>>
>> On 2016-06-15 15:13, Hans Dedecker wrote:  >> On Wed, Jun 15, 2016 at
>> 11:58 AM, Felix Fietkau <nbd at nbd.name> >>
>
> wrote: >>> On 2016-06-15 11:39, Conor O'Gorman wrote: >>>> On 09/06/16
> 03:20, Yousong Zhou wrote: >>>>> Fix a race condition when do_sigchld,
> uloop_cancelled were >>>>> set just before epoll_wait(timeout=-1), resulting
> the loop >>>>> stuck in the syscall without noticing the events just >>>>>
> happened >>>>> >>>>> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com> ---
>>>>>> uloop-epoll.c  |  2 +- uloop-kqueue.c |  2 +- uloop.c >>>>> | 65 >>>>>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 >>>>> files
> changed, 63 insertions(+), 6 deletions(-) >>>>> >>>> Why not change the
> timeout? >>> Changing the timeout would not fix the race, and it would lead
>>>> to unnecessary process wakeups and extra latency for signal >>>
> processing. >>> >>> - Felix >>> >>>
> _______________________________________________ Lede-dev mailing >>> list
> Lede-dev at lists.infradead.org >>>
> http://lists.infradead.org/mailman/listinfo/lede-dev >> Could it be that the
> wiker_pipe does not get properly initialized >> as waker_pipe never is
> assigned a fd value ? > I accidentally dropped that in a copy&paste screwup.
> Fix pushed to > git. > > Thanks, > > - Felix
> Ran 118 reboots with this fix without any problem so there is a good chance
> that
> the latest version of libubox (c2f2c47f3e9a2d709ec82a79f6fadd3124c18781)
> finally fixed the issue.
> :-) // Mats
>
Same result here after a night of testing; no hanging reboots observed anymore.

Thx,
Hans



More information about the Lede-dev mailing list