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

lacelle at roboticresearch.com lacelle at roboticresearch.com
Mon Jan 10 14:15:10 UTC 2011


> 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 sorry, I'll be more specific.  I'm running Ubuntu Server, 10.04.

The problem has reoccurred with a little more information.  It seems like
a particular query fails, which causes the crash.

I'm sorry to paste the entire printout, but I think it might help.  I'm
not sure what mailing list etiquette is for attaching files.

264490.001405   write: [destfd=6] [len=34] [VAR rack1ups ups.status "TRIM
OL"]
264490.001440   mainloop: polling 3 filedescriptors
264490.338233   mainloop: polling 3 filedescriptors
264492.340332   mainloop: no data available
264492.340379   mainloop: polling 3 filedescriptors
264494.342463   mainloop: no data available
264494.342503   mainloop: polling 3 filedescriptors
264495.001776   write: [destfd=6] [len=34] [VAR rack1ups ups.status "TRIM
OL"]
264495.001817   mainloop: polling 3 filedescriptors
264497.003930   mainloop: no data available
264497.003984   mainloop: polling 3 filedescriptors
264497.148206   mainloop: polling 3 filedescriptors
264499.150306   mainloop: no data available
264499.150356   mainloop: polling 3 filedescriptors
264500.002191   write: [destfd=6] [len=34] [VAR rack1ups ups.status "TRIM
OL"]
264500.002228   mainloop: polling 3 filedescriptors
264502.004317   mainloop: no data available
264502.004371   mainloop: polling 3 filedescriptors
264502.348230   mainloop: polling 3 filedescriptors
264502.407564   Connect from **.**.**.**
264502.407607   mainloop: polling 4 filedescriptors
264502.407654   write: [destfd=7] [len=21] [ERR INVALID-ARGUMENT]
264502.407675   write: [destfd=7] [len=20] [ERR UNKNOWN-COMMAND]
264502.407690   mainloop: polling 4 filedescriptors
264503.118172   mainloop: polling 4 filedescriptors
264504.409126   Disconnect **.**.**.** (no data available)
264504.409170   Disconnect from **.**.**.**
264504.409209   mainloop: polling 3 filedescriptors
264505.002641   write: [destfd=6] [len=34] [VAR rack1ups ups.status "TRIM
OL"]
264505.002672   mainloop: polling 3 filedescriptors
264505.168211   mainloop: polling 3 filedescriptors
264506.218088   mainloop: polling 3 filedescriptors
264508.208199   mainloop: polling 3 filedescriptors
264509.148184   mainloop: polling 3 filedescriptors
264510.003107   write: [destfd=6] [len=34] [VAR rack1ups ups.status "TRIM
OL"]
264510.003153   mainloop: polling 3 filedescriptors
264510.198141   mainloop: polling 3 filedescriptors
264511.148199   mainloop: polling 3 filedescriptors
264512.198153   mainloop: polling 3 filedescriptors
264512.596018   Connect from **.**.**.**
264512.596048   mainloop: polling 4 filedescriptors
*** glibc detected *** upsd: malloc(): memory corruption:
0x00000000009bf300 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7f135126f5b6]
/lib/libc.so.6(+0x7b6d8)[0x7f13512736d8]
/lib/libc.so.6(__libc_malloc+0x6e)[0x7f135127458e]
upsd[0x408fd9]
upsd[0x4091a8]
upsd[0x409266]
upsd[0x402996]
upsd[0x4036f9]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f1351216c4d]
upsd[0x401fe9]
======= Memory map: ========
00400000-0040d000 r-xp 00000000 fb:00 8806442                           
/sbin/upsd
0060c000-0060d000 r--p 0000c000 fb:00 8806442                           
/sbin/upsd
0060d000-0060e000 rw-p 0000d000 fb:00 8806442                           
/sbin/upsd
009af000-009d0000 rw-p 00000000 00:00 0                                 
[heap]
7f134c000000-7f134c021000 rw-p 00000000 00:00 0
7f134c021000-7f1350000000 ---p 00000000 00:00 0
7f13509c0000-7f13509d6000 r-xp 00000000 fb:00 9093248                   
/lib/libgcc_s.so.1
7f13509d6000-7f1350bd5000 ---p 00016000 fb:00 9093248                   
/lib/libgcc_s.so.1
7f1350bd5000-7f1350bd6000 r--p 00015000 fb:00 9093248                   
/lib/libgcc_s.so.1
7f1350bd6000-7f1350bd7000 rw-p 00016000 fb:00 9093248                   
/lib/libgcc_s.so.1
7f1350bd7000-7f1350be3000 r-xp 00000000 fb:00 9093407                   
/lib/libnss_files-2.11.1.so
7f1350be3000-7f1350de2000 ---p 0000c000 fb:00 9093407                   
/lib/libnss_files-2.11.1.so
7f1350de2000-7f1350de3000 r--p 0000b000 fb:00 9093407                   
/lib/libnss_files-2.11.1.so
7f1350de3000-7f1350de4000 rw-p 0000c000 fb:00 9093407                   
/lib/libnss_files-2.11.1.so
7f1350de4000-7f1350dee000 r-xp 00000000 fb:00 9093362                   
/lib/libnss_nis-2.11.1.so
7f1350dee000-7f1350fed000 ---p 0000a000 fb:00 9093362                   
/lib/libnss_nis-2.11.1.so
7f1350fed000-7f1350fee000 r--p 00009000 fb:00 9093362                   
/lib/libnss_nis-2.11.1.so
7f1350fee000-7f1350fef000 rw-p 0000a000 fb:00 9093362                   
/lib/libnss_nis-2.11.1.so
7f1350fef000-7f1350ff7000 r-xp 00000000 fb:00 9093361                   
/lib/libnss_compat-2.11.1.so
7f1350ff7000-7f13511f6000 ---p 00008000 fb:00 9093361                   
/lib/libnss_compat-2.11.1.so
7f13511f6000-7f13511f7000 r--p 00007000 fb:00 9093361                   
/lib/libnss_compat-2.11.1.so
7f13511f7000-7f13511f8000 rw-p 00008000 fb:00 9093361                   
/lib/libnss_compat-2.11.1.so
7f13511f8000-7f1351372000 r-xp 00000000 fb:00 9093404                   
/lib/libc-2.11.1.so
7f1351372000-7f1351571000 ---p 0017a000 fb:00 9093404                   
/lib/libc-2.11.1.so
7f1351571000-7f1351575000 r--p 00179000 fb:00 9093404                   
/lib/libc-2.11.1.so
7f1351575000-7f1351576000 rw-p 0017d000 fb:00 9093404                   
/lib/libc-2.11.1.so
7f1351576000-7f135157b000 rw-p 00000000 00:00 0
7f135157b000-7f1351584000 r-xp 00000000 fb:00 9093205                   
/lib/libwrap.so.0.7.6
7f1351584000-7f1351783000 ---p 00009000 fb:00 9093205                   
/lib/libwrap.so.0.7.6
7f1351783000-7f1351784000 r--p 00008000 fb:00 9093205                   
/lib/libwrap.so.0.7.6
7f1351784000-7f1351785000 rw-p 00009000 fb:00 9093205                   
/lib/libwrap.so.0.7.6
7f1351785000-7f1351786000 rw-p 00000000 00:00 0
7f1351786000-7f135179d000 r-xp 00000000 fb:00 9093353                   
/lib/libnsl-2.11.1.so
7f135179d000-7f135199c000 ---p 00017000 fb:00 9093353                   
/lib/libnsl-2.11.1.so
7f135199c000-7f135199d000 r--p 00016000 fb:00 9093353                   
/lib/libnsl-2.11.1.so
7f135199d000-7f135199e000 rw-p 00017000 fb:00 9093353                   
/lib/libnsl-2.11.1.so
7f135199e000-7f13519a0000 rw-p 00000000 00:00 0
7f13519a0000-7f13519c0000 r-xp 00000000 fb:00 9093354                   
/lib/ld-2.11.1.so
7f1351bb2000-7f1351bb5000 rw-p 00000000 00:00 0
7f1351bbc000-7f1351bbf000 rw-p 00000000 00:00 0
7f1351bbf000-7f1351bc0000 r--p 0001f000 fb:00 9093354                   
/lib/ld-2.11.1.so
7f1351bc0000-7f1351bc1000 rw-p 00020000 fb:00 9093354                   
/lib/ld-2.11.1.so
7f1351bc1000-7f1351bc2000 rw-p 00000000 00:00 0
7fffcabf0000-7fffcac05000 rw-p 00000000 00:00 0                         
[stack]
7fffcacef000-7fffcacf0000 r-xp 00000000 00:00 0                         
[vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
[vsyscall]
Aborted

That [INVALID-ARGUMENT] only happens once, right before the driver crashes.

I'm just going to get the upsd source and build debugging symbols from there.

Thanks.




More information about the Nut-upsuser mailing list