[Nut-upsuser] upds crash with 'Out of memory'
Charles Lepple
clepple at gmail.com
Wed Jan 28 13:08:55 UTC 2015
On Jan 28, 2015, at 2:29 AM, Ryan Sizemore <ryan.sizemore at gmail.com> wrote:
>> 32.813233 Read error : 109
>> 34.094483 upsdrv_updateinfo...
>> 34.110249 Got 2 HID objects...
>> 34.141355 Full update...
>>
>> 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.
>
> Does the driver keep going after that?
>
>
> 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.
Actually, there is another instance of the "Read error :" string, with a space before the colon:
https://github.com/networkupstools/nut/blob/WindowsPort-v2.6.5-6/drivers/dstate.c#L623
>
> 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])?
>
> 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.
>
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.
That might be triggered by an error coming back from inet_ntopW():
https://github.com/networkupstools/nut/blob/WindowsPort-v2.6.5-6/server/upsd.c#L524
I don't know how well the IPv6 code was tested on Windows. If you try running 'upsc xs1500 at 127.0.0.1' or try upsc from another machine, do you get the same error from upsd?
--
Charles Lepple
clepple at gmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150128/c179bb2e/attachment.html>
More information about the Nut-upsuser
mailing list