This directly relates to the whole libusb monologue I've been having in here over the last month
That specifically means your libusb on your mac is bugged - the timeout option when doing I/O isn't working
The README says how to build with a working libusb and it works on Linux and Windows - no idea about a Mac ...
Tell whoever Karin is to read the README ...
Karin, read the README
I'm Karin!
I keep a very close eye on the readme's (even following their changes on github), and I've tried using rc10 but if I recall it had no effect on this bug on Macs, so I instead include the latest libusb in my builds.
Kano makes it sounds like the error confidently lies within libusb, so I'll do a full spectrum of tests with various libusb versions. If I can find a version that works I will update
cgminer for Mac OS X and
Asteroid (my Mac GUI to cgminer) accordingly.
Otherwise, we'll have to dig deeper into libusb, and any errors generated from cgminer (and what the community can help with) would be our best bet in figuring out the issue with libusb + Macs. I'll try and do these test builds tonight and will post back with what I find.
Yes the problem is clearly libusb.
As I have already stated, I can run two different libusb versions on the same architecture and one works while the other doesn't.
The test problem that I've mentioned in here a few times is standalone code (bits and pieces of the code I've written in cgminer - but modified) and that shows if timeouts are working ... and if they are matching the expected values also.
https://bitcointalk.org/index.php?topic=28402.msg2817682;topicseen#msg2817682https://bitcointalk.org/index.php?topic=28402.msg2846296;topicseen#msg2846296https://bitcointalk.org/index.php?topic=28402.msg2938585;topicseen#msg2938585That specific version - libusb-1.0.16-rc10 - works on Linux and Windows
I've seen other 1.0.16 versions that don't work ... thus using the 'latest' libusb is not guaranteed to solve it.
Also, libusb has 2 sources: libusb and libusbx, and some OSs provide libusbx instead of libusb
The README also states how to use the libusb mentioned
Okay, I've solved this problem on Mac OS X by using
libusb-1.0.2. Unfortunately, this version is from 2009, but it has worked well in testing with my own admittedly limited gear (one USB block erupter, one GPU).
I ran 44 test cases to determine this: 22 versions of libusb, 20 versions of libusbx, and a few alternates I located around the web. They span every official release and release candidate of the two libusb branches since 2009.
6 would not configure, 1 would not compile, 4 would not link with cgminer, 5 would not successfully access the USB device, 28 exhibited "TIMEOUT GetResults took 2000ms but was 100ms" errors, and only one worked without errors and generated the correct output (
libusb-1.0.2). I could not get kano's usbfail.c to compile, so I simply built 44 versions of cgminer statically linked to the different libusb builds and ran my tests over 10 minutes of runtime each.
I've updated my
cgminer for Mac OS X universal binaries as of a few moments ago, and will be submitting my findings to the other Mac cgminer projects (asteroid, xgminer, multiminer, macminer) for their own testing.
If this does indeed work for others, then the next step would be to approach the libusbx people and/or dig into the code myself, so that we can get a newer libusb/libusbx but with the correct operability of v1.0.2. Or perhaps 1.0.2 is fine.