Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 222. (Read 5806004 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I am on MacOSX 10.6.8 (Snow Leopard) with the Mac Ports collection installed.
SNIP

Only the release tarball will compile on osx. What I'm saying, though, is if you have a 3.4.3 release, it IS using the latest libusb - statically compiled - regardless of who compiled it for you unless they've gone in and hacked the code to dynamically link the library because there is no way for it to use a dynamic library any more.
erk
hero member
Activity: 826
Merit: 500
Unofficial Mac binaries updated to 3.4.3 at http://spaceman.ca/cgminer.
Cheesy

Just tried them on a Mac Mini with Snow Leopard and a single Block Erupter USB, give the USB timeout errors:

Code:
 [2013-09-17 14:00:28] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:30] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:32] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:34] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:36] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:37] Stratum from pool 0 detected new block
 [2013-09-17 14:00:38] AMU0: TIMEOUT GetResults took 1998ms but was 100ms
Was there ever a version this didn't happen on? If not, we're kinda screwed until a better libusb for osx comes out since this is a libusb bug which is mostly addressed in the linux and windows versions, yet you're compiling against the same libusb version now (which is included statically in the cgminer source tree now).

I have a stack of libusb libraries, no idea where they come from. There are even ones with the binary cgminer from http://spaceman.ca/cgminer though I can't see them linked with otool -L

Quote
root % otool -L cgminer
cgminer:
   /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.44.0)
   /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
   @executable_path/dependencies/lib/libcurl.4.dylib (compatibility version 8.0.0, current version 8.0.0)
   /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.Cool
   /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.Cool
   /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.2.0)
   /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
   /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL (compatibility version 1.0.0, current version 1.0.0)
   /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
   /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)

Perhaps I need some other command to see which USB library is being used.

Here is a list of the libusb stuff on my Mac

Code:
/usr/lib/libusb-1.0.0.dylib
/usr/lib/libusb-1.0.a
/usr/lib/libusb-1.0.la
/opt/local/bin/libusb-config
/opt/local/i386-mingw32/lib/libusbcamd.a
/opt/local/i386-mingw32/lib/libusbcamd2.a
/opt/local/include/libusb-1.0
/opt/local/include/libusb-1.0/libusb.h
/opt/local/lib/libusb-0.1.4.dylib
/opt/local/lib/libusb-1.0.0.dylib
/opt/local/lib/libusb-1.0.a
/opt/local/lib/libusb-1.0.dylib
/opt/local/lib/libusb-1.0.la
/opt/local/lib/libusb.a
/opt/local/lib/libusb.dylib
/opt/local/lib/libusb.la
/opt/local/lib/pkgconfig/libusb-1.0.pc
/opt/local/lib/pkgconfig/libusb.pc
/opt/local/var/macports/software/libusb
/opt/local/var/macports/software/libusb/libusb-1.0.8_0.darwin_10.x86_64.tbz2


I haven't been able to get the cgminer github source to compile myself, not from lack of trying! So I am dependent on the pre-compiled binaries I can find.

A fresh attempt yeilds:

Code:
root % ./autogen.sh 
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
Running autoreconf -if...
./autogen.sh: line 12: libtoolize: command not found
configure.ac:24: installing './compile'
configure.ac:17: installing './config.guess'
configure.ac:17: installing './config.sub'
configure.ac:22: installing './install-sh'
configure.ac:53: error: required file './ltmain.sh' not found
configure.ac:22: installing './missing'
Makefile.am:21: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Makefile.am: installing './depcomp'
autoreconf: 'configure.ac' or 'configure.in' is required
Configuring...
./autogen.sh: line 21: /configure: No such file or directory

I know the Mac uses glibtoolize not libtoolize so if I patch autogen.sh to use glibtoolize it then gives:

Code:
root % ./autogen.sh 
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
Running autoreconf -if...
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./config.guess'
glibtoolize: copying file `./config.sub'
glibtoolize: copying file `./install-sh'
glibtoolize: copying file `./ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
glibtoolize: copying file `m4/libtool.m4'
glibtoolize: copying file `m4/ltoptions.m4'
glibtoolize: copying file `m4/ltsugar.m4'
glibtoolize: copying file `m4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
Makefile.am:21: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
autoreconf: 'configure.ac' or 'configure.in' is required
Configuring...
./autogen.sh: line 21: /configure: No such file or directory
root %
A  configure file is actually created and runs to completion with
CFLAGS="-O2" ./configure --enable-icarus


However when I try to make I get:

Code:
root % make
make  all-recursive
Making all in lib
  GEN      arg-nonnull.h
  GEN      c++defs.h
  GEN      warn-on-use.h
  GEN      signal.h
  GEN      stdint.h
  GEN      string.h
make  all-recursive
  CC       dummy.o
  CC       memmem.o
  AR       libgnu.a
/opt/local/bin/ranlib: file: libgnu.a(dummy.o) has no symbols
ranlib: file: libgnu.a(dummy.o) has no symbols
Making all in compat
Making all in jansson
  CC       dump.o
  CC       error.o
  CC       hashtable.o
  CC       load.o
  CC       memory.o
  CC       pack_unpack.o
  CC       strbuffer.o
  CC       strconv.o
  CC       utf.o
  CC       value.o
  AR       libjansson.a
Making all in libusb-1.0
make[3]: *** No rule to make target `all'.  Stop.
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
root %

And that's where I get stuck. Any suggestions on how to proceed?

I am on MacOSX 10.6.8 (Snow Leopard) with the Mac Ports collection installed.







newbie
Activity: 17
Merit: 0
Really? Sad
How about this? Are you able to reproduce this?
Running 3.4.3 but notice now (it seems this issue goes back a few versions) that the accepted blocks field now shows the latest difficulty (x number of blocks found it seems) instead of total block count? Anyone got a fix for this?

Not sure what coin you're mining, but on the bitcoin network, cgminer now shows the number of "diff 1 shares" found for the accepted field.  So, if you're pool has a higher share difficulty, the counter will increase by whatever the difficulty of the associated job was each time a share is found.

That's not a bug.  If you really want the number of actual shares found (even though they are not as useful in a world that is moving towards variable difficulty mining), you can get them from the API.
I would like to point out that there is A BUG ASSOCIATED WITH THAT FEATURE.
And that is, that as soon as the "Number of accepted Shares" reaches 10 Million, CGMiner crashes/stops working. I mine on an LTC-Pool with high difficulty and I have to restart CGMiner on a regular basis to make sure the miner just doesn't stop working because it has reached 10 Million diff 1 shares again.

Is there an "official" way to report bugs or is ckolivas going to read this?
I read it. I read all bug reports - that doesn't mean I instantly respond. It was probably coincidence and an unrelated crash since I went to 50 million shares without a problem. Try a debug build.
Thank you very much!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Really? Sad
How about this? Are you able to reproduce this?
Running 3.4.3 but notice now (it seems this issue goes back a few versions) that the accepted blocks field now shows the latest difficulty (x number of blocks found it seems) instead of total block count? Anyone got a fix for this?

Not sure what coin you're mining, but on the bitcoin network, cgminer now shows the number of "diff 1 shares" found for the accepted field.  So, if you're pool has a higher share difficulty, the counter will increase by whatever the difficulty of the associated job was each time a share is found.

That's not a bug.  If you really want the number of actual shares found (even though they are not as useful in a world that is moving towards variable difficulty mining), you can get them from the API.
I would like to point out that there is A BUG ASSOCIATED WITH THAT FEATURE.
And that is, that as soon as the "Number of accepted Shares" reaches 10 Million, CGMiner crashes/stops working. I mine on an LTC-Pool with high difficulty and I have to restart CGMiner on a regular basis to make sure the miner just doesn't stop working because it has reached 10 Million diff 1 shares again.

Is there an "official" way to report bugs or is ckolivas going to read this?
I read it. I read all bug reports - that doesn't mean I instantly respond. It was probably coincidence and an unrelated crash since I went to 50 million shares without a problem. Try a debug build.
newbie
Activity: 17
Merit: 0

New debug executables uploaded.

All done and started, now we just have to play the waiting game.

I haven't seen it crash for at least 2-3 days on 3.4.3
Appreciated. That's no problem as no new release is scheduled any time soon unless I find some hotfix bug worth fixing.

I'm currently swamped with other work and probably need a small break from regular cgminer coding anyway.
Really? Sad
How about this? Are you able to reproduce this?
Running 3.4.3 but notice now (it seems this issue goes back a few versions) that the accepted blocks field now shows the latest difficulty (x number of blocks found it seems) instead of total block count? Anyone got a fix for this?

Not sure what coin you're mining, but on the bitcoin network, cgminer now shows the number of "diff 1 shares" found for the accepted field.  So, if you're pool has a higher share difficulty, the counter will increase by whatever the difficulty of the associated job was each time a share is found.

That's not a bug.  If you really want the number of actual shares found (even though they are not as useful in a world that is moving towards variable difficulty mining), you can get them from the API.
I would like to point out that there is A BUG ASSOCIATED WITH THAT FEATURE.
And that is, that as soon as the "Number of accepted Shares" reaches 10 Million, CGMiner crashes/stops working. I mine on an LTC-Pool with high difficulty and I have to restart CGMiner on a regular basis to make sure the miner just doesn't stop working because it has reached 10 Million diff 1 shares again.

Is there an "official" way to report bugs or is ckolivas going to read this?
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/

New debug executables uploaded.

All done and started, now we just have to play the waiting game.

I haven't seen it crash for at least 2-3 days on 3.4.3
Appreciated. That's no problem as no new release is scheduled any time soon unless I find some hotfix bug worth fixing.

I'm currently swamped with other work and probably need a small break from regular cgminer coding anyway.
newbie
Activity: 50
Merit: 0

New debug executables uploaded.

All done and started, now we just have to play the waiting game.

I haven't seen it crash for at least 2-3 days on 3.4.3
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
No worries - I've done this before for you, happy to do it again.

Let me know when you have 3.4.3 ready
New debug executables uploaded.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Unofficial Mac binaries updated to 3.4.3 at http://spaceman.ca/cgminer.
Cheesy

Just tried them on a Mac Mini with Snow Leopard and a single Block Erupter USB, give the USB timeout errors:

Code:
 [2013-09-17 14:00:28] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:30] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:32] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:34] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:36] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:37] Stratum from pool 0 detected new block
 [2013-09-17 14:00:38] AMU0: TIMEOUT GetResults took 1998ms but was 100ms
Was there ever a version this didn't happen on? If not, we're kinda screwed until a better libusb for osx comes out since this is a libusb bug which is mostly addressed in the linux and windows versions, yet you're compiling against the same libusb version now (which is included statically in the cgminer source tree now).
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
No doubt my usbfail.c test would show that libusb not working either ....
erk
hero member
Activity: 826
Merit: 500
Unofficial Mac binaries updated to 3.4.3 at http://spaceman.ca/cgminer.
Cheesy

Just tried them on a Mac Mini with Snow Leopard and a single Block Erupter USB, give the USB timeout errors:

Code:
 [2013-09-17 14:00:28] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:30] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:32] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:34] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:36] AMU0: TIMEOUT GetResults took 1999ms but was 100ms
 [2013-09-17 14:00:37] Stratum from pool 0 detected new block
 [2013-09-17 14:00:38] AMU0: TIMEOUT GetResults took 1998ms but was 100ms


Hardware is ok with bfgminer compiled from github.

newbie
Activity: 50
Merit: 0
No worries - I've done this before for you, happy to do it again.

Let me know when you have 3.4.3 ready
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Is there anything I can help with?
I do experience that crash where it just says "cgminer has stopped working". A quick reboot and its up again.
Thanks. I'll keep you posted when I upload the latest debug build and I'll get you to follow the instructions on how to get debugging information from it.

You can read the instructions and get prepared here, but they're only cgminer 3.4.2 for the moment:
http://ck.kolivas.org/apps/cgminer/debug/
newbie
Activity: 50
Merit: 0
Is there anything I can help with?

I know you're a big fan of Linux, but you've done extremely well with the windows version of cgminer. The reason I am running windows is because I have a HP N40L server with a remote access card that doesn't support the linux GUI at all so it was extremely slow.

The HP N40L server ($200 micro server) is a great little unit, the remote access card allows me to remote into it even if it is switched off, or hard locked.

Its running Windows 7 x64 and cgminer 3.4.3.

Once windows was installed, I didn't even need to install drivers because they are all natively supported and there are none to install.

I copied on cgminer, and create a quick batch file, and boom, 25 block erupters and a Butterfly labs 7gh/s unit all work without an issue.

I do experience that crash where it just says "cgminer has stopped working". A quick reboot and its up again.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
So... would it be useful to run w/o a backup pool to see if the problem persists? 
It certainly would not hurt to try. I have yet to upload debug builds of 3.4.3 and will do so later today, but the underlying stratum code has not changed since 3.4.2, it just had added features rather than changing the codebase.
legendary
Activity: 1540
Merit: 1001
I'm not sure of the threading level within stratum when on a single pool.
ckolivas will know the answer to that.
All writes are done from one thread. All reads are done from one thread. Therefore there is no chance of there being a race on reads or a race on writes. I very much doubt windows has an issue of writing and reading the same socket at the same time, nor would there be a problem using two different sockets at the same time. Debugging points to something in socket code, possibly on reconnecting or trying to communicate with a backup pool. I keep auditing the code and come up none the wiser, but I will continue to do so, or give up entirely and stop supporting windows (yeah right, 85% of cgminer users are on windows sigh).

So... would it be useful to run w/o a backup pool to see if the problem persists?  FYI I've only had it happen once.  But I regularly only let it run 24 hours before I restart it for one reason or another.  Until recently.  I'm remote from my miners for a bit ... from the looks of things my erupters ran for about 3 days before crashing.  I'm hoping my wife can restart it, but it's asking too much to get a screenshot of the error.  Last time I had the crash it was after 36 hours.  And my machine with only 2 erupters is still running.

M
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I'm not sure of the threading level within stratum when on a single pool.
ckolivas will know the answer to that.
All writes are done from one thread. All reads are done from one thread. Therefore there is no chance of there being a race on reads or a race on writes. I very much doubt windows has an issue of writing and reading the same socket at the same time, nor would there be a problem using two different sockets at the same time. Debugging points to something in socket code, possibly on reconnecting or trying to communicate with a backup pool. I keep auditing the code and come up none the wiser, but I will continue to do so, or give up entirely and stop supporting windows (yeah right, 85% of cgminer users are on windows sigh).
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
I'm not sure of the threading level within stratum when on a single pool.
ckolivas will know the answer to that.
legendary
Activity: 1540
Merit: 1001
Hmm. Thing is, the stratum code is all done raw now, not using any other libraries precisely because I had problems with libcurl and friends. So the code does raw socket calls which directly use winsock calls. So the problem is either in cgminer or the MS dll.

I hate to be the bearer of bad news, but I doubt it's the winsock dll.  A lot of programs use that, and if there was a native problem in there, we'd be getting crashes elsewhere from other apps.
Yes a lot use the winsock dll. Note the issue is in mswsock.dll though, and it is actually very rare that applications use raw sockets on windows so I wouldn't say it's quite the same - firefox only recently started using it and lo and behold it's been getting crashes in the same library. Nonetheless, logically my code which is always in heavy development is far more likely to be at fault than an OS provided library (though we've been burnt by that enough already to know it's not impossible). Every attempt so far to get debugging with a full debug build, it always ends up crashing with an overflow in mswsock.dll though, so not sure where to go next...

Firefox is under continual development as well.  socket coding isn't simple, especially windows socket coding.  I personally have not seen any app crashes with firefox, and that's all I use.  if it is indeed a problem with winsock, for microsoft to address it you'll need to be able to provide poc code that causes the crash. 

Kano: would it help if I changed my cgminer instance to not have any backup pools?  then it's only communicating with one pool. 

M
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
mwsock.dll ... hmm I wonder how many times that's been reported in here ... and your not running the latest version Smiley

I have now updated to 3.4.3. I just searched through this thread and didn't seem to find any solutions for fixing the mwsock.dll issue. Any thoughts?
Unfortunately we have no solution for a microsoft provided dll crashing. It should not be possible for our software to crash the dll unless there's a bug in the dll. The only suggestions are checking you have the latest dll and there are no virus/trojans that have attached to it.

I've been using windows and troubleshooting windows problems long enough to know that the DLL that "crashed" is regularly not the DLL with the problem.  I think the error reporting mechanism from windows is flawed (imagine that), and it's a routine that's calling winsock that is the problem, not winsock.  Thinking through it, a possible example would be a multithreaded app crashing while one thread is in winsock.  Or it could be winsock crashing when trying to perform a requested call back to the owning app.

I've also seen this type of misleading error message when DLL #1 needs DLL #2.  The error message will state DLL #1 isn't found, and when you look, you'll see DLL #1 is there.  The reality is DLL #1 is looking for DLL #2 and not finding it, but the error message only captures part of the info is gives misleading info.

Overall, I don't believe this is a mswinsock issue.  It's probably not a cgminer issue either, per se, but one of the 3rd party DLLs you are using that is calling mswinsock.

M
... of course there are other possibilities as I came across with libusb ...

I am doing something with libusb that ... it would appear ... no one else on the planet does?

Running a multi-threaded application to many devices through the libusb library that states it is thread safe.
However, it is not thread safe.
I found that the comments on the libusb site that stated it was thread safe in fact suggested to me that it wasn't.
One of the libusb fixes was indeed to make libusb calls thread safe in cgminer using locks.

So ... a mining application that is talking to many pools at once through a single dll that "May" be thread safe, might actually NOT be thread safe and since it may be indeed rare for applications to do this on their own, it may be that cgminer is the rare case finding the problem ...

Of course it MAY not be - but certainly no proof to discount it at this stage.

Edit: of course I am replying to this also:
Hmm. Thing is, the stratum code is all done raw now, not using any other libraries precisely because I had problems with libcurl and friends. So the code does raw socket calls which directly use winsock calls. So the problem is either in cgminer or the MS dll.

I hate to be the bearer of bad news, but I doubt it's the winsock dll.  A lot of programs use that, and if there was a native problem in there, we'd be getting crashes elsewhere from other apps.
...
Jump to: