fireice-uk / xmr-stak-amd

Monero AMD miner
GNU General Public License v3.0
193 stars 114 forks source link

no hash or gpu activity seen (question) #46

Closed Cheb57 closed 7 years ago

Cheb57 commented 7 years ago

Hello,

Firstly thank you for your shared code and build to allow us mining on AMD platforms... I'm experiencing an issue that i did not understand and did not see on others topics as the hash mining is displaying zero every time on my side.

the display of hash result stays at zero, connection is here but after a certain time (variable) the code did not reply but not crash). No gpu activity monitored and i have no idea if GPU threads are still working.

ex here when the process simply hangs: [2017-06-11 10:08:01] : Starting GPU thread, no affinity. [2017-06-11 10:08:01] : Connecting to pool xmr.crypto-pool.fr:3333 ... [2017-06-11 10:08:01] : Connected. Logging in... [2017-06-11 10:08:01] : Difficulty changed. Now: 18000. [2017-06-11 10:08:01] : New block detected. [2017-06-11 10:08:30] : New block detected.

The IGP is coming with a cheap C-70 APU but i'm starting the mining here with this device for educational purposes...(no benefit with this hw config).

i ran Win8.1 x86_64 with last catalyst driver (legacy 15.x) and AMD app sdk rev3.0 (x86_64). If needed i can start to try building using gcc/mingw64 with debug options.

Attached the clinfo output. Pastebin link

config.txt parameters used: "gpu_thread_num" : 1, "gpu_threads_conf" : [ { "index" : 0, "intensity" : 100, "worksize" : 1, "affine_to_cpu" : false }, ], "platform_index" : 0, "use_tls" : false, "tls_secure_algo" : false, "tls_fingerprint" : "", "call_timeout" : 10, "retry_time" : 10, "giveup_limit" : 0,

for my configuration, what could be the intensity/worksize parameter to use as my gpu is using 256MB of system RAM? I entered 100/1 as 100x1x2 (2MB) is lower than 256MB. Is it correct? Thank you.

fireice-uk commented 7 years ago

I would start with intensity of 50 and worksize of 1-4, see if that works and build from there.

Cheb57 commented 7 years ago

@fireice-uk,

I followed your note and change setting by "intensity" : 50, "worksize" : 2, values. Others worksize values above will trig this error: [2017-06-12 20:20:11] : Error CL_INVALID_WORK_GROUP_SIZE when calling clEnqueueNDRangeKernel for kernel 0.

On each tentative, the program hangs after the second message about "new block detected". On this test step and before the hang, i requested the hash report value, it indicates zero: [2017-06-12 20:22:41] : Starting GPU thread, no affinity. [2017-06-12 20:22:41] : Connecting to pool xmr.crypto-pool.fr:3333 ... [2017-06-12 20:22:41] : Connected. Logging in... [2017-06-12 20:22:41] : Difficulty changed. Now: 18000. [2017-06-12 20:22:41] : New block detected. [2017-06-12 20:23:01] : New block detected. HASHRATE REPORT | ID | 10s | 60s | 15m | | 0 | (na) | (na) | (na) |

Totals: (na) (na) (na) H/s Highest: 0.0 H/s

Then after some second later, the program hangs and no request is taken in consideration. Even the httpd port (if set) will not reply.

When the program is running, the connection seems to be ok even if the ping value is not present (ICMP request/reply allowed on my firewall, that's strange). Network error log: Yay! No errors. CONNECTION REPORT Connected since : 2017-06-13 08:37:10 Pool ping time : (n/a)

What do you think about this behavior, do you know if the apu/gpu driver or the opencl interface could be the problem? Should I build with debug options in order to see where the program hangs? I'm using your last release found on your repo for information. Thank you.

fireice-uk commented 7 years ago

@psychocrypt what do you think of this one? The output suggests that the processing of the first batch of the results never completes.

psychocrypt commented 7 years ago

@fireice-uk Mhh could be, will check if it is possible in OpenCL to get verbose output with information about each kernel start to validate if you are right.

pokefun commented 7 years ago

I'm actually having the exact same problem as this with an xfx Radeon HD 6870 1GB. Funny part is I thought it was hashing fine a few days ago with intensity 256 worksize 8.

Cheb57 commented 7 years ago

@fireice-uk, @psychocrypt,

Hello, I just noticed that the cmakelist file is requesting the compiler to use AES-NI instructions as it contains "-maes" for CXX and C Flags, my cpu can not handle theses instructions. I also check the release build using "objdump -D xmr-stak-amd.exe | grep -i aes" and see aesenc and aeskeygenassist instructions by example.

Is it possible that my problem appears owing aes instructions?

Please note that there is no crash when running the exe file (Windows is not able to detect illegal instructions?). I will install deps and try to build shared object libs and then your latest release I'm using without AES-NI, to see if it is the problem.

thank you.

cpuinfo extract (msys2): vendor_id : AuthenticAMD cpu family : 20 model : 2 model name : AMD C-70 APU with Radeon(tm) HD Graphics flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt

psychocrypt commented 7 years ago

@Cheb57 The miner is always compiled with aes-ni but we have a switch where we only use the aes-ni code if the cpu supports the instruction set, else we switching back to an alternative code path.

psychocrypt commented 7 years ago

@Cheb57 Can you please post the full output of clinfo

Cheb57 commented 7 years ago

@psychocrypt,

yes i built a debug version of your release and noticed that the problem was mainly due to the Timeout Detection Recovery used by the WDDM on Windows.

This implementation on my side, with a slowest card, will reset the GPU and then cancel kernel tasks sent by the host.

My problem is solved, as i'm able know to see hashrates values and associated variables using gdb. I set in the Win registry for the Dword TdrLevel the 0 value, to disable the TDR implementation. This can be dangerous if the GPU will freeze as the software watchdog used will not restart the card or his driver.

I think we can close the topic. Hoping it can help Windows users with a similar problem. A quick note in the readme could help. About the clinfo output, a pastebin link is present into this discussion thread. Thank you for your help everybody, and congrat. for your code.

For more details: tdr-registry-keys

psychocrypt commented 7 years ago

@Cheb57 thx for sharing the solution with us.

issue is solved -- close --

psychocrypt commented 7 years ago

I forget to ask: Could you please post the has rate of this APU

Cheb57 commented 7 years ago

Sure, this is the extract log txt file using unfortunately the debug build. Actually this laptop is in use. I'm remember that the hashrate value was equal to 9h/sec with the releae build.... poor GPU :)

debug build: [2017-06-25 23:10:45] : Connecting to dev pool... [2017-06-25 23:10:48] : Dev pool logged in. Switching work. [2017-06-25 23:11:48] : Switching back to user pool. [2017-06-26 00:45:08] : Starting GPU thread, no affinity. [2017-06-26 00:45:08] : Connecting to pool xmr.crypto-pool.fr:3333 ... [2017-06-26 00:45:08] : Connected. Logging in... [2017-06-26 00:45:08] : Difficulty changed. Now: 18000. [2017-06-26 00:45:08] : New block detected. [2017-06-26 00:47:19] : New block detected. HASHRATE REPORT | ID | 10s | 60s | 15m | | 0 | (na) | 4.9 | (na) |

Totals: (na) 4.9 (na) H/s Highest: 0.0 H/s [2017-06-26 00:48:57] : New block detected. [2017-06-26 00:49:28] : New block detected. HASHRATE REPORT | ID | 10s | 60s | 15m | | 0 | (na) | 4.9 | (na) |

Totals: (na) 4.9 (na) H/s