<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;">On Jan 28, 2015, at 2:29 AM, Ryan Sizemore <<a href="mailto:ryan.sizemore@gmail.com">ryan.sizemore@gmail.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;"><div><div class="h5"><blockquote type="cite" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><div> <span class="Apple-converted-space"> </span>32.813233     Read error : 109</div><div> <span class="Apple-converted-space"> </span>34.094483     upsdrv_updateinfo...</div><div> <span class="Apple-converted-space"> </span>34.110249     Got 2 HID objects...</div><div> <span class="Apple-converted-space"> </span>34.141355     Full update...</div></div><div><br></div><div>I'm not sure if the 'Read error' is indicative of anything, but it occurs exactly when upsd crashes with the 'Out of memory' error.</div></div></blockquote><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div></div><div>Does the driver keep going after that?</div><div><br></div></div></blockquote><div><br></div><div>Yes, the driver keeps running. It prints out "Read error : 109", which I am guessing is the value of errno that is set after calling select() on line 560 of upsclient.c. I could be wrong though.</div></div></div></div></div></blockquote><div><br></div><div>Actually, there is another instance of the "Read error :" string, with a space before the colon:</div><div><br></div><div><a href="https://github.com/networkupstools/nut/blob/WindowsPort-v2.6.5-6/drivers/dstate.c#L623">https://github.com/networkupstools/nut/blob/WindowsPort-v2.6.5-6/drivers/dstate.c#L623</a></div><div><br></div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap: break-word;"><div></div><div>This is a bit of a shot in the dark (especially because your ProductID of 0002 is one of the less-broken ones) but do you still get the read error if you add the "pollonly" option to the UPS-specific part of ups.conf (i.e. after [xs1500])?</div></div></blockquote><div><br></div><div>Sadly, no, that doesn't seem to improve the outcome. If feels like upsd fails during a malloc or something similar resulting from the read failure in the driver. If I can get the sources building on my on computer, I will try to debug and see where the exact point of failure is at.</div></div></div></div></div><br class="Apple-interchange-newline"></blockquote><br></div><div>I wonder if the failed malloc() is trying to allocate zero bytes? Otherwise, I would think the out-of-memory condition would be affecting other parts of the system.</div><div><br></div><div>That might be triggered by an error coming back from inet_ntopW():</div><div><br></div><div><a href="https://github.com/networkupstools/nut/blob/WindowsPort-v2.6.5-6/server/upsd.c#L524">https://github.com/networkupstools/nut/blob/WindowsPort-v2.6.5-6/server/upsd.c#L524</a></div><div><br></div><div>I don't know how well the IPv6 code was tested on Windows. If you try running 'upsc <a href="mailto:xs1500@127.0.0.1">xs1500@127.0.0.1</a>' or try upsc from another machine, do you get the same error from upsd?</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>