[Nut-upsuser] upsd crashes with a "broken pipe" error

Arnaud Quette aquette.dev at gmail.com
Wed Jan 19 07:51:12 UTC 2011


2011/1/16 Zach La Celle <lacelle at roboticresearch.com>

>  On 01/11/2011 03:38 AM, Arnaud Quette wrote:
>
> Hi Zach,
>
> 2011/1/10 Zach La Celle <lacelle at roboticresearch.com>
>
>>   On 01/06/2011 08:06 AM, Arnaud Quette wrote:
>>
>>
>> 2011/1/5 Zach La Celle <lacelle at roboticresearch.com>
>>
>>>   On 01/04/2011 08:20 AM, Arnaud Quette wrote:
>>>
>>>
>>> 2011/1/4 Charles Lepple <clepple at gmail.com>
>>>
>>>> On Mon, Jan 3, 2011 at 8:29 AM, Zach La Celle
>>>> <lacelle at roboticresearch.com> wrote:
>>>> > On 12/29/2010 10:00 AM, Zach La Celle wrote:
>>>> >>
>>>> >> On 12/29/2010 08:34 AM, Charles Lepple wrote:
>>>> >>>
>>>> >>> On Dec 27, 2010, at 9:36 AM, Zach La Celle wrote:
>>>> >>>
>>>> >>>> I ran this in debug mode and captures the backtrace.
>>>> >>>>
>>>> >>>> root@*********:/etc/nut# upsd -D
>>>> >>>> Network UPS Tools upsd 2.4.3
>>>> >>>>  0.000000     listening on 0.0.0.0 port 3493
>>>> >>>>  0.000354     Connected to UPS [rack1ups]: apcsmart-rack1ups
>>>> >>>>  2.550554     User upsmon at 127.0.0.1 logged into UPS [rack1ups]
>>>> >>>> *** glibc detected *** upsd: free(): invalid next size (fast):
>>>> >>>> 0x00000000012c9870 ***
>>>> >>>
>>>> >>> Can you give us some background information about this system? What
>>>> OS
>>>> >>> and version, who built the package, etc.
>>>>
>>>>  Just to be sure, are you running the Ubuntu-provided package, or
>>>> something from another package repository? Which version of Ubuntu?
>>>>
>>>> Running valgrind might produce similarly opaque results without debug
>>>> symbols (which you can enable if you build from source).
>>>
>>>
>>> debug syms are available as separate debs.
>>> As an example, for Ubuntu, look here:
>>> https://wiki.kubuntu.org/DebuggingProgramCrash
>>>
>>> then look for installing {nut,libupsclient}-dbgsym and others if needed
>>> otherwise...
>>>
>>>  That is a bit
>>>> more involved, though (especially if you want to keep the installed
>>>> files in the same place) so I'd try that after Arjen's suggestion with
>>>> "-DDD".
>>>>
>>>
>>> seconded for a first run.
>>>
>>> cheers,
>>> Arnaud
>>> --
>>> Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
>>> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
>>> Debian Developer - http://www.debian.org
>>> Free Software Developer - http://arnaud.quette.free.fr/
>>>
>>>   The only extra package I could find is the "dev" package.  I'm not
>>> sure if that contains debugging symbols.
>>>
>>> I'm running with the "-DDD" option now.  It hasn't crashed over the
>>> weekend, so we'll see how long it takes to crash now.  I'm getting source to
>>> try and rebuild it so that I can walk through in GDB if necessary.
>>>
>>
>> have you looked at the pointer I've sent, *and* applied the various
>> mentioned actions (adding key and repository, refresh apt cache, ...)?
>>
>> otherwise, you won't see these packages!
>> I still fail to see what is your exact system (Ubuntu? which version?)
>> apart from the arch which is x86_64...
>>
>> cheers,
>> Arnaud
>> --
>> Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
>> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
>> Debian Developer - http://www.debian.org
>> Free Software Developer - http://arnaud.quette.free.fr/
>>
>>   I'm having trouble finding the upsd source code, or maybe I just don't
>> understand how to run it properly.  The source I have for ubuntu/lucid seems
>> to either be for a different UPSD project, or to run very differently than
>> the version off of the Ubuntu repositories.  Can you point me to the correct
>> source for upsd?
>>
>
> to get the one for your binary, check that you have a "deb-src" line for
> main in your /etc/apt/sources.list
> then "apt-get source nut"
> or get the source here: http://packages.ubuntu.com/maverick/nut
>
> note that upsd package is a completely different project.
>
> cheers,
> Arnaud
> --
> Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
> Debian Developer - http://www.debian.org
> Free Software Developer - http://arnaud.quette.free.fr/
>
>  I now have the upsd source package installed and built for debug, but when
> I run upsd I get errors connecting to my UPS.  I copied all of the
> configuration files from my normal config directory (/etc/nut) into the new
> directory (/usr/local/ups/etc/), but I get an "Error; cannot find rack1ups;
> no such file or directory" or something along those lines.  I've tried to
> fix this myself but it just doesn't seem to be working.  Any idea?
>

in order to have a source compilation working in a Debian / derivative env.,
you need to configure using the following flags:
./configure --prefix=/usr \
            --exec-prefix=/ \
            --sysconfdir=/etc/nut \
            --mandir=/usr/share/man \
            --libdir=/lib \
            --includedir=/usr/include \
            --without-ssl \
            --with-hal \
            --with-cgi \
            --with-dev \
            --enable-static \
            --with-statepath=/var/run/nut \
            --with-altpidpath=/var/run/nut \
            --with-drvpath=/lib/nut \
            --with-cgipath=/usr/lib/cgi-bin/nut \
            --with-htmlpath=/usr/share/nut/www \
            --with-pidpath=/var/run/nut \
            --datadir=/usr/share/nut \
            --with-pkgconfig-dir=/usr/lib/pkgconfig \
            --with-user=nut --with-group=nut

This is the official line from the Debian packages.
You can however disable a few to avoid installing build dependencies, ie
--without-hal, --without-cgi, ...

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110119/e7a047b0/attachment.htm>


More information about the Nut-upsuser mailing list