<div dir="ltr">Hey <br><div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-09 1:46 GMT+02:00 Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">On Apr 8, 2015, at 2:04 PM, Eric Cobb <<a href="mailto:Eric_Cobb@tripplite.com" target="_blank">Eric_Cobb@tripplite.com</a>> wrote:<br><div><br><blockquote type="cite"><div link="blue" vlink="purple" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" lang="EN-US"><div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Charles and list,<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">If I leave the driver alone it does not eventually start.  It continues to report that it is unable to connect.  I have to perform a upsdrvctl stop ; upsdrvctl start (I actually just perform a init stop and start so that upsd and upsmon both restart) for the driver to actually connect to the ups.<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I have attached an strace of the upsdrvctl start command when it is ran at boot time via the init script. I'll let the experts make their assessment of what is going wrong.<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Here is the exact line out of the /etc/init.d/ups that i ran (I added -D and -u nut on the latest runs, I get the same issue with or without it) Let me know if you would like any further symptoms or output.<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">start() {<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">        echo -n $"Starting UPS Driver:"<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">        echo "UPS DRIVER START" > /var/log/upslog<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">        strace -f -o /var/log/nut/strace.log /usr/sbin/upsdrvctl -D -u nut start >> /var/log/upslog 2>&1 && success || failure<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">        RETVAL=$?<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">        Echo<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"> </span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Eric Cobb<u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><a href="mailto:ekcobb@tripplite.com" style="color:purple;text-decoration:underline" target="_blank">ekcobb@tripplite.com</a><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><br></div></div></div></blockquote><br></div><div>The mailing list doesn't accept large attachments, so I attached a gzip'd copy of the log in case anyone else wants to take a look.</div><div><br></div><div>It doesn't show timing information, or the content of the URBs, so it is hard to tell what the driver is trying to do at any given point.</div><div><br></div><div>I recognize that it is a slight change of the experiment to remove upsdrvctl, but could you please start the driver directly in the init script with -DDD (path should be in the output of '/usr/sbin/upsdrvctl -D'), and redirect that output to a log file? (We had a reason for why upsdrvctl does not pass '-D' flags through to the driver, but the reason escapes me at the moment.)</div></div></blockquote><div><br></div><div>simply debugging the driver controller in itself, more than passing the debug flags to the driver(s)<br></div><div>that said, this point keeps on getting back, on and on.<br>RFC: we should probably consider for upsdrvctl that -D... is passed to the driver(s) and -d... for upsdrvctl specifics.<br></div><div>there is no big issue with breaking backward compat here, so if that suits you all, we can go on implementing that...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div style="word-wrap:break-word"><div>It would also be useful to have the output of dmesg (or at least the USB-related subset), in case it has additional information on why libusb_get_interrupt() is failing.</div><span class=""></span></div></blockquote></div><br></div><div class="gmail_extra">2nded, along with your comment that I don't see any difference between drivers startup process at boot time or later on, WRT to the mentioned context.<br></div><div class="gmail_extra">the only point I also see would be some noise (interferences) tied to other processes looking at USB devices.<br><br></div><div class="gmail_extra">Beside from Charles requested test, I would advise you to try increasing the USB_TIMEOUT value (in usb-common.h) to see if it's just an transient lack of responsiveness due to some kind of race to access USB devices...<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers<br clear="all"></div><div class="gmail_extra">Arno<br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr">Eaton Data Center Automation - Opensource Leader<br>NUT (Network UPS Tools) Project Leader - <a href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br><br></div></div>
</div></div></div>