Re: [Nut-upsuser] UPS/NUT with openSUSE 13.1

2015-09-15 Thread Charles Lepple
On Sep 15, 2015, at 5:12 PM, Rob Groner  wrote:
> 
> Charles,
>  
> Trying to track down the source of the problem, I checked Yast to make sure I 
> had at least 0.1.8 version for libusb.  I saw this (attached photo).  Is it 
> then actually using –compat instead of the “real” libusb?  And is that a 
> problem?

You're right, both the -compat and real libusb packages will use the same 
libusb-0.1.so* name.

It's not necessarily a problem, but it does mean that there is different code 
between your driver and the kernel. Most of the NUT testing has been done with 
the original libusb.

> I just thought of something else that has changed since the last time I was 
> trying this  I am now using the "--with-pidpath=/var/run/ups" 
> configuration parameter to change where everything keeps the pid files.  I 
> wasn't doing that before.  Since that's mounted to tmpfs, is it possible 
> that's getting unmounted before the shutdown command happens (and thus not 
> finding the .pid file, it tries to start it instead)?

You might be on to something, but if so, the race happens earlier than the 
"usbhid-ups -k" invocation. Because the "-k" flag is meant to be called at the 
end of the shutdown sequence, it doesn't assume /var is mounted, and 
consequently, it doesn't check for other PID files. However, if a driver 
happens to still be running, it could cause the "-k" option to report a busy 
error.

https://github.com/networkupstools/nut/blob/master/drivers/main.c#L588

-- 
Charles Lepple
clepple@gmail




___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] UPS/NUT with openSUSE 13.1

2015-09-15 Thread Rob Groner
I just thought of something else that has changed since the last time I was 
trying this  I am now using the "--with-pidpath=/var/run/ups" configuration 
parameter to change where everything keeps the pid files.  I wasn't doing that 
before.  Since that's mounted to tmpfs, is it possible that's getting unmounted 
before the shutdown command happens (and thus not finding the .pid file, it 
tries to start it instead)?

I think I'm going to try going through the install process solely as root to 
see if that makes things works reliably.


Rob Groner
Software Engineer Level II

RTD Embedded Technologies, Inc.
ISO 9001 and AS9100 Certified
Ph: +1 814-234-8087
www.rtd.com

-Original Message-
From: Charles Lepple [mailto:clep...@gmail.com] 
Sent: Thursday, September 10, 2015 9:44 AM
To: Rob Groner 
Cc: Roger Price ; nut-upsuser Mailing List 

Subject: Re: [Nut-upsuser] UPS/NUT with openSUSE 13.1

On Sep 10, 2015, at 8:49 AM, Rob Groner  wrote:
> 
> Charles,
>  
> 3.16.6.-2-desktop

I think that corresponds to this file: 
http://lxr.free-electrons.com/source/drivers/usb/core/devio.c?v=3.16 (but I 
don't see anything obvious there)

What does "lsusb -vvv -d 2a37:" return? Usually I'd say run that as root when 
the driver isn't running, but I'm looking for the device descriptor, which 
should be available regardless.

The version number of your driver says "2.7.2.6_RTD". Which Git revision does 
that correspond to in the NUT repository (aside from your changes)? I'm curious 
because somewhere (af5f84c5) between 2.7.2 and 2.7.3, I removed a spurious 
usb_set_altinterface() call, and I'm wondering if that changes the claim/detach 
error messages.

-- 
Charles Lepple
clepple@gmail




___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser