[Nfd-dev] NFD face create race condition at startup

Dehart, John jdd at wustl.edu
Thu Nov 14 09:01:49 PST 2019


Some additional clarification. The nfdc face create command fails if the on-demand face is already there.
It is supposed to upgrade it from on-demand to permanent but it appears that with the new inclusion of the MTU
size this is no longer working.

John

> On Nov 14, 2019, at 10:49 AM, Dehart, John <jdd at wustl.edu> wrote:
> 
> Signed PGP part
> 
> All:
> 
> I believe I have run into a race condition when starting NFD on the NDN Testbed nodes.
> We start NFD with this in its systemd file:
> 
> ExecStart=/usr/bin/nfd --config /etc/ndn/nfd.conf
> ExecStartPost=/bin/sh -ec 'sleep 2; if [ -f /etc/ndn/nfd-init.sh ]; then . /etc/ndn/nfd-init.sh; fi'
> 
> 
> In /etc/ndn/nfd-init.sh we have ‘nfdc face create’ commands to create the faces to the nodes defined neighbors.
> Those look something like this (from WU creating a face to Memphis):
> 
> nfdc face create udp4://141.225.11.173:6363 persistency permanent reliability on mtu 1450
> 
> 
> But what appears to be happening is that while nfd is starting up on WU, other nodes may be in the process of sending
> NDN packets to WU. When those packets arrive the newly started NFD will create an on-demand face and the nfdc face create
> in nfd-init.sh fails and we lose the face parameters we really want.
> 
> I’m currently trying this change:
> 
> set +
> nfdc face destroy  udp4://141.225.11.173:6363; nfdc face create udp4://141.225.11.173:6363 persistency permanent reliability on mtu 1450
> 
> This tells bash to ignore erros and then we destroy the face we are about to create and then create it the way we want it.
> My concern is that even this may not always work. Packets could still arrive between the two nfdc commands.
> 
> Is the only sure way to get this to work to block traffic from that neighbor and then destroy and create the face?
> Something like this:
> 
> set +
> iptables -A INPUT -s 141.225.11.173 -j DROP
> nfdc face destroy  udp4://141.225.11.173:6363;
> nfdc face create udp4://141.225.11.173:6363 persistency permanent reliability on mtu 1450
> iptables -D INPUT -s 141.225.11.173 -j DROP
> 
> Thanks for any help or suggestions.
> 
> John
> 
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20191114/5689214a/attachment.sig>


More information about the Nfd-dev mailing list