[Nfd-dev] NFD crashes after local application exits

Zhongda Xia zhongda.hit at gmail.com
Fri Aug 16 02:54:39 PDT 2019


Hi Junxiao,

Thank you so much! Setting $HOME variable works like a charm (sudo
HOME=/tmp nfd -c /usr/local/etc/ndn/nfd.conf). I didn't generate a key for
NFD but everything is fine, maybe because I have disabled command
authorization.

Spent several days trying to debug this, and nothing made sense (after
signature verification is bypassed, the corresponding ValidatorState is
indeterminate when it is destroyed, and thus the error), I guess the
inconsistency may have caused memory leakage somewhere.

Thanks again for the tip!

Junxiao Shi <shijunxiao at email.arizona.edu> 于2019年8月15日周四 下午9:54写道:

> Hi Zhongda
>
> This appears to be a KeyChain conflict.
>
> NFD needs to run from an isolated KeyChain ($HOME environment variable).
> If it shares a KeyChain with another app that modifies the KeyChain,
> modifications could make NFD's view of the KeyChain inconsistent with
> what's in the filesystem, and eventually cause a crash.
>
> Also, you must manually generate a key inside that KeyChain. Otherwise,
> NFD would generate a key first time it's needed. Depending on timing
> between NFD's two threads, one of these can occur: (1) RIB thread generates
> a key then main thread drops root privilege, future signing fails because
> key is inaccessible; (2) two threads try to generate keys simultaneously,
> causing a conflict; (3) main thread drops root privilege then RIB thread
> generates a key as non-root, and everything works. Thus, always generate
> the key yourself and make it accessible by NFD's euid.
>
> Yours, Junxiao
>
> On Thu, Aug 8, 2019, 05:30 Zhongda Xia via Nfd-dev <
> nfd-dev at lists.cs.ucla.edu> wrote:
>
>> Hi all,
>>
>> My NFD crashes after a local application exits (producer applications
>> like "ndnpingserver"), showing the following error messages:
>>
>> 1565242734.292879 DEBUG: [nfd.FibUpdater] Failed to apply FibUpdate(
>> Name: /rv, faceId: 263, action: REMOVE_NEXTHOP) (code: 10021, error:
>> Internal implementation error (Validator/policy did not invoke success or
>> failure callback))
>> terminate called after throwing an instance of
>> 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<nfd::rib::FibUpdater::Error>
>> >'
>>   what():  Non-recoverable error: Internal implementation error
>> (Validator/policy did not invoke success or failure callback) code: 10021
>>
>> I am still trying to debug this, and my setup is a little complicated
>> (working on a dev branch), so I'm hoping someone has seen something similar
>> before, and could give me a hint on what to check first. Thanks!
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20190816/5504eb72/attachment.html>


More information about the Nfd-dev mailing list