<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Apr 4, 2015, at 8:53 PM, Richard Flint <<a href="mailto:richard.flint@gmail.com">richard.flint@gmail.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I have used the truss command as directed. I have attached both the driver output and the last few sections of truss output leading to the hang. Both outputs end at the CTRL+C i pressed when i was forced to end the processes.</div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hope this is helpful. Please bear with me if i didn't run it with the right options etc - as I mentioned, I'm a little new to Solaris.</div></blockquote><div><br class="Apple-interchange-newline"></div><div>Well, it did provide some information, but I'll be honest that I don't know what else we can get from truss.</div><div><br></div><div>Stepping back a bit, here is the stack:</div><div><br></div><div>upsc --- upsd --- nutdrv_qx --- libusb -+- Solaris kernel --- UPS</div></div><div><br></div><div>truss is tracing at the "+" sign: the boundary between user space and kernel space.</div><div><br></div><div>When the driver gets a valid response, the truss log looks like this:</div><div><br></div><div><div><font face="Courier New">5834: Q u i c k u p d a t e . . .</font></div><div><font face="Courier New">5834: write(2, "\n", 1) = 1</font></div><div><font face="Courier New">5834: write(5, 0x082DA320, 16) = 16</font></div><div><font face="Courier New">5834: !\t\002\0\0\b\0 Q S\r\0\0\0\0\0</font></div><div><font face="Courier New">5834: write(2, " 1 6 1", 4) = 4</font></div><div><font face="Courier New">5834: write(2, " .", 1) = 1</font></div><div><font face="Courier New">5834: write(2, " 3 9 5 1 0 8", 6) = 6</font></div><div><font face="Courier New">5834: write(2, "\t", 1) = 1</font></div><div><font face="Courier New">5834: write(2, " s e n d : Q S", 8) = 8</font></div><div><font face="Courier New">5834: write(2, "\n", 1) = 1</font></div><div><font face="Courier New">5834: open("/dev/usb/665.5161/0/if0in1stat", O_RDWR) = 8</font></div><div><font face="Courier New">5834: write(8, "01", 1) = 1</font></div><div><font face="Courier New">5834: open("/dev/usb/665.5161/0/if0in1", O_RDONLY) = 9</font></div><div><font face="Courier New"><b>5834: read(9, " ( 2 4 5 . 4 2", 8) = 8</b></font></div><div><font face="Courier New">5834: close(9) = 0</font></div><div><font face="Courier New">5834: close(8) = 0</font></div><div>...</div><div><br></div><div>The failed poll at the end looks like this:</div><div><br></div><div><font face="Courier New">5834: Q u i c k u p d a t e . . .</font></div><div><font face="Courier New">5834: write(2, "\n", 1) = 1</font></div><div><font face="Courier New">5834: write(5, 0x082DA320, 16) (sleeping...)</font></div><div><font face="Courier New">5834: write(5, 0x082DA320, 16) = 16</font></div><div><font face="Courier New">5834: !\t\002\0\0\b\0 Q S\r\0\0\0\0\0</font></div><div><font face="Courier New">5834: write(2, " 1 6 9", 4) = 4</font></div><div><font face="Courier New">5834: write(2, " .", 1) = 1</font></div><div><font face="Courier New">5834: write(2, " 8 5 8 9 3 0", 6) = 6</font></div><div><font face="Courier New">5834: write(2, "\t", 1) = 1</font></div><div><font face="Courier New">5834: write(2, " s e n d : Q S", 8) = 8</font></div><div><font face="Courier New">5834: write(2, "\n", 1) = 1</font></div><div><font face="Courier New">5834: open("/dev/usb/665.5161/0/if0in1stat", O_RDWR) = 8</font></div><div><font face="Courier New">5834: write(8, "01", 1) = 1</font></div><div><font face="Courier New">5834: open("/dev/usb/665.5161/0/if0in1", O_RDONLY) = 9</font></div><div><font face="Courier New"><b>5834: read(9, 0xFC9BC650, 8) (sleeping...)</b></font></div><div>^C</div></div><div><br></div><div>I did run across a comment in the NUT configure.ac that says "dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification)". This is unfortunate, since other libusb platforms will time out after ~5 seconds, and most of the drivers have retry logic to handle that.</div><div><br></div><div>I couldn't find any relevant source code when searching for Solaris libusb 0.1.7 with Google. Do you have any other information about the libusb that is installed there?</div><div><br></div><div>There is also this fork of libusb that claims to support Solaris, and the code seems to have timeouts: <a href="http://sourceforge.net/projects/openusb/">http://sourceforge.net/projects/openusb/</a></div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>