Re: [LEDE-DEV] [PATCH] ubus cli: wait_for: fix race causing false timeouts

2016-10-12 Thread Zefir Kurtisi
On 10/07/2016 03:19 PM, Zefir Kurtisi wrote: > On 10/07/2016 02:15 PM, Alexandru Ardelean wrote: >> On Fri, Oct 7, 2016 at 3:09 PM, Felix Fietkau wrote: >>> Instead of introducing yet another timer, wouldn't it also be possible >>> to close this race window by registering the event

Re: [LEDE-DEV] [PATCH] ubus cli: wait_for: fix race causing false timeouts

2016-10-07 Thread Zefir Kurtisi
On 10/07/2016 02:15 PM, Alexandru Ardelean wrote: > On Fri, Oct 7, 2016 at 3:09 PM, Felix Fietkau wrote: >> Instead of introducing yet another timer, wouldn't it also be possible >> to close this race window by registering the event handler before >> attempting the lookup? >> >> -

Re: [LEDE-DEV] [PATCH] ubus cli: wait_for: fix race causing false timeouts

2016-10-07 Thread Alexandru Ardelean
On Fri, Oct 7, 2016 at 3:09 PM, Felix Fietkau wrote: > On 2016-10-07 13:57, Zefir Kurtisi wrote: >> In ubus_cli_wait_for() there is a critical section between >> initially checking for the requested services and the >> following handling of 'ubus.object.add' events. >> >> In our

Re: [LEDE-DEV] [PATCH] ubus cli: wait_for: fix race causing false timeouts

2016-10-07 Thread Felix Fietkau
On 2016-10-07 13:57, Zefir Kurtisi wrote: > In ubus_cli_wait_for() there is a critical section between > initially checking for the requested services and the > following handling of 'ubus.object.add' events. > > In our system we let procd (re)start services and synchronize > inter-service