KlausT / ccminer-cryptonight

Software for mining various cryptocoins, like Monero (pool mining only)
GNU General Public License v3.0
133 stars 30 forks source link

Segmentation fault (core dumped) #19

Open Fornax96 opened 7 years ago

Fornax96 commented 7 years ago

Finally found a ccminer fork that compiles on Ubuntu 16.10, and now this...

I pulled it through valgrind for you:

==13725== Memcheck, a memory error detector
==13725== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==13725== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==13725== Command: ccminer -a cryptonight -d 0 -o stratum+tcp://cryptonight.eu.nicehash.com:3355 -u 1CF44cPB7vr7CvSpj3ZGrdgDbNg3WPCBpd -p x
==13725== 
    *** ccminer-cryptonight 2.00 (64 bit) for nVidia GPUs by tsiv and KlausT 
    *** Built with GCC 6.2 using the Nvidia CUDA Toolkit 8.0

 tsiv's BTC donation address:   1JHDKp59t1RhHFXsTw2UQpR3F9BBz3R3cs
 KlausT's BTC donation address: 1QHH2dibyYL5iyMDk3UN4PVvFVtrWD8QKp
 for more donation addresses please read the README.txt
-----------------------------------------------------------------
==13725== Warning: noted but unhandled ioctl 0x30000001 with no size/direction hints.
==13725==    This could cause spurious value errors to appear.
==13725==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==13725== Warning: noted but unhandled ioctl 0x27 with no size/direction hints.
==13725==    This could cause spurious value errors to appear.
==13725==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==13725== Warning: noted but unhandled ioctl 0x7ff with no size/direction hints.
==13725==    This could cause spurious value errors to appear.
==13725==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==13725== Warning: noted but unhandled ioctl 0x25 with no size/direction hints.
==13725==    This could cause spurious value errors to appear.
==13725==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==13725== Warning: noted but unhandled ioctl 0x17 with no size/direction hints.
==13725==    This could cause spurious value errors to appear.
==13725==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==13725== Warning: set address range perms: large range [0x1000000000, 0x1700000000) (noaccess)
==13725== Warning: set address range perms: large range [0x200000000, 0x500000000) (noaccess)
==13725== Invalid read of size 1
==13725==    at 0x10F766: applog (util.c:159)
==13725==    by 0x10E754: parse_arg (cpu-miner.c:1479)
==13725==    by 0x10B00D: parse_cmdline (cpu-miner.c:1816)
==13725==    by 0x10B00D: main (cpu-miner.c:1917)
==13725==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==13725== 
==13725== 
==13725== Process terminating with default action of signal 11 (SIGSEGV)
==13725==  Access not within mapped region at address 0x0
==13725==    at 0x10F766: applog (util.c:159)
==13725==    by 0x10E754: parse_arg (cpu-miner.c:1479)
==13725==    by 0x10B00D: parse_cmdline (cpu-miner.c:1816)
==13725==    by 0x10B00D: main (cpu-miner.c:1917)
==13725==  If you believe this happened as a result of a stack
==13725==  overflow in your program's main thread (unlikely but
==13725==  possible), you can try to increase the size of the
==13725==  main thread stack using the --main-stacksize= flag.
==13725==  The main thread stack size used in this run was 8388608.
==13725== 
==13725== HEAP SUMMARY:
==13725==     in use at exit: 479,092 bytes in 904 blocks
==13725==   total heap usage: 1,912 allocs, 1,008 frees, 620,058 bytes allocated
==13725== 
==13725== LEAK SUMMARY:
==13725==    definitely lost: 0 bytes in 0 blocks
==13725==    indirectly lost: 0 bytes in 0 blocks
==13725==      possibly lost: 3,088 bytes in 22 blocks
==13725==    still reachable: 476,004 bytes in 882 blocks
==13725==         suppressed: 0 bytes in 0 blocks
==13725== Rerun with --leak-check=full to see details of leaked memory
==13725== 
==13725== For counts of detected and suppressed errors, rerun with: -v
==13725== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Killed

System: OS: Ubuntu 16.10 GPU: GTX 980 Ti CPU: Intel Core i5-4690K Nvidia: 367.57 CUDA: 8.0

KlausT commented 7 years ago

I don't think that I can help you there. I'm actually surprised that it compiles with gcc 6.2, because CUDA 8 is not compatible with it

Fornax96 commented 7 years ago

You know, I tried 6 different forks of ccminer-cryptonight. This is the only one that even compiles without errors.... And then it segfaults.

Is it just impossible to mine cryptonight on a Nvidia card?

KlausT commented 7 years ago

Using the latest gcc version is always a problem with CUDA on Linux. According to Nvidia it works with Ubuntu 16.04 which has gcc 5.3.1 (I think). Maybe you could ask other Linux users to compile it for you.

Fornax96 commented 7 years ago

Thanks, I'll ask around. If I find one that works I'll put a download link here.

kth5 commented 7 years ago

I have the same issue on Archlinux with Cuda 8.0.61 and using the AUR gcc5 package (5.4.0). The latest master (a5d0c3d5bdd0e8f97ffed62068ec72044cf9de68 / v2.01) compiles fine but then segfaults in much the same way.

@Fornax96 If you just want to mine cryptonight on Nvidia try Nicehash's fork [1]. Works fine on the same config with Cuda 7.5.18 / GCC 5.4.0. I myself just wanted to give this fork a go to see if there are any significant differences in speed.

[1] https://github.com/nicehash/ccminer-cryptonight.git