<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 20, 2015, at 6:11 AM, ndn ndn <<a href="mailto:ndn@sqh.me" class="">ndn@sqh.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello Alex,<div class="">Thanks for your answer, I realize that I put nun::face create in a for loops, the face object will deconstruct when my program exit, not the face class deconstruct.So it cause this problem.<div class="">After do that, I find the nfd not crashed and it looks work well.Thanks for your help.</div><div class=""><br class=""></div><div class="">But I also wonder, Does nun::face class is thread-safety?Can I use face in different thread?</div></div></div></div></blockquote><div><br class=""></div><div>Hi Qihan,</div><div><br class=""></div><div>Yes, ndn::Face class is thread-safe and you can call expressInterest, put, registerPrefix, etc. methods from any other thread.  However, processEvents method (or the underlying run() method of boost::asio::io_service object) must be called in exactly one thread, which is usually a main thread of the application.</div><div><br class=""></div><div>--</div><div>Alex</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><br class=""></div><div class="">Yours, qihan.</div><div class="">  </div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2015-09-19 6:51 GMT+08:00 Alex Afanasyev <span dir="ltr" class=""><<a href="mailto:aa@cs.ucla.edu" target="_blank" class="">aa@cs.ucla.edu</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Hi Qihan,</div><div class=""><br class=""></div><div class="">This is an interesting error that we haven't seen before.  However, it is directly related to user-limit on number of open files.  You can check this thread <a href="https://forums.gentoo.org/viewtopic-t-464088-start-0.html" target="_blank" class="">https://forums.gentoo.org/viewtopic-t-464088-start-0.html</a> that has a similar error and has a suggested solution.</div><div class=""><br class=""></div><div class="">From the log I see that your application (or applications) keep connecting to NFD, with ~1023 (before crash) active apps.  I wonder, is it your real intention or it is a some sort of an accident?  I mean, do you really want that many applications to be active?</div><div class=""><br class=""></div><div class="">---</div><div class="">Alex</div><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Sep 18, 2015, at 12:20 AM, ndn ndn <<a href="mailto:ndn@sqh.me" target="_blank" class="">ndn@sqh.me</a>> wrote:</div><br class=""></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class=""><span style="font-size:14px" class="">Dear JunXiao,</span><div style="font-size:14px" class="">   After I use the Head version in NFD, but it not works.</div><div style="font-size:14px" class="">   At my program beginning, NFD print log like this:</div><div style="font-size:14px" class=""><br class=""></div><div style="font-size:14px" class="">   1442558776.874014 INFO: [UnixStreamFace] [id=-1,local=<a class="">unix:///run/nfd.sock,remote=fd://1022]</a> Creating face</div><div style="font-size:14px" class="">   1442558776.875411 INFO: [FaceTable] Added face id=1255 remote=<a class="">fd://1022</a> local=<a class="">unix:///run/nfd.sock</a></div><div style="font-size:14px" class="">   1442558776.893996 INFO: [UnixStreamFace] [id=-1,local=<a class="">unix:///run/nfd.sock,remote=fd://1023]</a> Creating face</div><div style="font-size:14px" class="">   1442558776.895382 INFO: [FaceTable] Added face id=1256 remote=<a class="">fd://1023</a> local=<a class="">unix:///run/nfd.sock</a></div><div style="font-size:14px" class=""><br class=""></div><div style="font-size:14px" class=""><br class=""></div><div style="font-size:14px" class="">   When the number raise to 1023, the NFD is crashed. NFD-log tells me:</div><div style="font-size:14px" class="">    442559257.847426 FATAL: [NFD] OS_Rng: open /dev/urandom operation failed with error 24<br class=""></div><div style="font-size:14px" class=""><br class=""></div><div style="font-size:14px" class="">    I don't know what happen in NFD? seems random number generator broken when I send a small file, the NFD isn't crashed.</div><div style="font-size:14px" class=""><br class=""></div><div style="font-size:14px" class="">Yours, Qihan</div></div></div></div>
_______________________________________________<br class="">Ndn-interest mailing list<br class=""><a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank" class="">Ndn-interest@lists.cs.ucla.edu</a><br class=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" target="_blank" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>