<div dir="ltr"><div><div><div><div>Hello all,<br><br></div>With a really fast lookup, I think it is probably a problem of NSS initialization (key loading...) .<br></div>As the problem occurs only when upsd is forked and as nss is initialized (<a href="https://github.com/networkupstools/nut/blob/master/server/upsd.c#L1008)before">https://github.com/networkupstools/nut/blob/master/server/upsd.c#L1008)before</a> upsd deamonify (<a href="https://github.com/networkupstools/nut/blob/master/server/upsd.c#L1035">https://github.com/networkupstools/nut/blob/master/server/upsd.c#L1035</a>), I suspect NSS to not be fork-safe.<br></div><br></div>I will intend to look more deeply.<br><div><br></div><div>Best regards,<br><br></div><div>Emilien<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-13 13:30 GMT+01:00 Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mar 12, 2015, at 11:55 PM, Melkor Lord <<a href="mailto:melkor.lord@gmail.com">melkor.lord@gmail.com</a>> wrote:<br>
<br>
><br>
> On Mon, Mar 2, 2015 at 2:39 AM, Charles Lepple <<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>> wrote:<br>
><br>
> > I thought start-stop-daemon was involved because it closes stdin/stdout file<br>
> > descriptors after exec()'ing the daemon. I tried "--no-close" option to no<br>
> > avail. After that, I validated the init script working fine with<br>
> > UPSD_OPTIONS="-D" in /etc/nut/nut.conf.<br>
><br>
> Not strictly the same as closing the file descriptors, but I tried the<br>
> following:<br>
><br>
>   /sbin/upsd -D >/dev/null 2>&1 < /dev/null<br>
><br>
> And it still worked. So I need to recompile with debugging symbols -<br>
> the Ubuntu packages did not have them.<br>
><br>
> Sorry to bug you again with this issue but is there any improvement on the matter?<br>
<br>
</div></div>No, not yet.<br>
<br>
Recompiling with debugging symbols did not reveal anything new. We have reached out to the engineer who wrote the NSS code for NUT.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Charles Lepple<br>
clepple@gmail<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@lists.alioth.debian.org">Nut-upsuser@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</div></div></blockquote></div><br></div>