[Nut-upsdev] newhidups (2.03-pre2) not working with APC Back-UPS

Charlie Brady charlieb-nut-upsdev at e-smith.com
Mon Feb 6 17:12:08 UTC 2006


On Mon, 6 Feb 2006, Charlie Brady wrote:

> Running the driver under ltrace led to something interesting:
> 
> ...
> strcmp("Outlet", "PowerSummary")                                 = -1
> strcmp("OutletID", "PowerSummary")                               = -1
> strcmp("PowerSummary", "PowerSummary")                           = 0
> strchr("RunTimeToEmpty", '.')                                    = NULL
> strcmp("APCGeneralCollection", "RunTimeToEmpty")                 = -1
> strcmp("APCBattReplaceDate", "RunTimeToEmpty" <unfinished ...>
> --- SIGINT (Interrupt) ---
> --- SIGSEGV (Segmentation fault) ---
> +++ killed by SIGSEGV +++
> [root at test7 ~]#
> ...

Here's what valgrind tells us. I'm not sure how interesting this actually
is, since the driver doesn't actually run, apparently for permission
reasons:

chmod(/var/run/nut/newhidups-auto, 0660) failed: Operation not permitted
==19662==
==19662== ERROR SUMMARY: 30000 errors from 164 contexts (suppressed: 15 
from 2)
==19662== malloc/free: in use at exit: 36287 bytes in 128 blocks.
==19662== malloc/free: 190 allocs, 62 frees, 61300 bytes allocated.
==19662== For counts of detected errors, rerun with: -v
==19662== searching for pointers to 128 not-freed blocks.
==19662== checked 1502000 bytes.
==19662==
==19662==
==19662== 68 bytes in 3 blocks are definitely lost in loss record 8 of 15
==19662==    at 0x1B902984: malloc (vg_replace_malloc.c:131)
==19662==    by 0x276B9F: strdup (in /lib/tls/libc-2.3.4.so)
==19662==    by 0x804FEF4: libusb_open (in /sbin/newhidups)
==19662==    by 0x804ECBC: HIDOpenDevice (in /sbin/newhidups)
==19662==
==19662== LEAK SUMMARY:
==19662==    definitely lost: 68 bytes in 3 blocks.
==19662==    possibly lost:   0 bytes in 0 blocks.
==19662==    still reachable: 36219 bytes in 125 blocks.
==19662==         suppressed: 0 bytes in 0 blocks.
==19662== Reachable blocks (those to which a pointer was found) are not 
shown.
==19662== To see them, rerun with: --show-reachable=yes

--
Charlie




More information about the Nut-upsdev mailing list