Author

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

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Scrypt mining is still broken in that it can not utilize high thread concurrencies (I need to use a thread concurrency of 24000 for my 7950s to mine effectively).  The bug seems to be with the calculation for memory allocation.  It can be easily duplicated by setting the thread concurrency above 8192, eg 12288.  In reaper, any thread concurrency may be used as long as it is a multiple of 64 and produces a memory padding that fits within the card's memory space.

Using "set GPU_MAX_ALLOC_PERCENT=100" in Windows allows the program to run, but it doesn't hash at all and does not create a memory pad on the GPU.

I reported this several weeks ago and it still hasn't been addressed.
That's cause I have no idea what the problem is. Setting GPU_MAX_ALLOC_PERCENT does nothing on windows, only linux.

Code:
 [2012-10-05 16:01:03] Started cgminer 2.7.6
 [2012-10-05 16:01:03] Started cgminer 2.7.6
 [2012-10-05 16:01:04] Probing for an alive pool
 [2012-10-05 16:01:04] Long-polling activated for http://ltc.kattare.com:9332/LP

 [2012-10-05 16:01:06] LONGPOLL from pool 0 detected new block
 [2012-10-05 16:01:15] Maximum buffer memory device 0 supports says 524288000, your scrypt settings come to 0
 [2012-10-05 16:01:15] Error -61: clCreateBuffer (padbuffer8), decrease CT or increase LG
 [2012-10-05 16:01:15] Failed to init GPU thread 0, disabling device 0
 [2012-10-05 16:01:15] Restarting the GPU from the menu will not fix this.
 [2012-10-05 16:01:15] Try restarting cgminer.
Press enter to continue:

There's the error code for you.

You should be able to easily replicate this just by setting --thread-concurrency 12288 (which works fine on reaper).

I'm pretty sure the problem has to do with these lines,
Code:
clState->padbufsize = bufsize;
clState->padbuffer8 = clCreateBuffer(clState->context, CL_MEM_READ_WRITE, bufsize, NULL, &status);
Right, that is  the code indeed. The fact it's reading zero is worrying, and looks like it might well be a buffer overflow. It will set it to whatever you choose regardless if it can instead of what it detects as the maximum. However clCreateBuffer takes a size_t variable as the buffer size, and by definition that's a 32 bit unsigned integer. The problem with that is it's impossible to be larger than 2^32. Hrm... let's see

size_t bufsize = 128 * ipt * cgpu->thread_concurrency;

ipt is an unsigned integer, but thread_concurrency is a signed one. Maybe that's all there is to the overflow. I'll dick around with it before the next release.

EDIT: and by the way, I can't replicate any of this without windows...
legendary
Activity: 1484
Merit: 1005
Scrypt mining is still broken in that it can not utilize high thread concurrencies (I need to use a thread concurrency of 24000 for my 7950s to mine effectively).  The bug seems to be with the calculation for memory allocation.  It can be easily duplicated by setting the thread concurrency above 8192, eg 12288.  In reaper, any thread concurrency may be used as long as it is a multiple of 64 and produces a memory padding that fits within the card's memory space.

Using "set GPU_MAX_ALLOC_PERCENT=100" in Windows allows the program to run, but it doesn't hash at all and does not create a memory pad on the GPU.

I reported this several weeks ago and it still hasn't been addressed.
That's cause I have no idea what the problem is. Setting GPU_MAX_ALLOC_PERCENT does nothing on windows, only linux.

Code:
 [2012-10-05 16:01:03] Started cgminer 2.7.6
 [2012-10-05 16:01:03] Started cgminer 2.7.6
 [2012-10-05 16:01:04] Probing for an alive pool
 [2012-10-05 16:01:04] Long-polling activated for http://ltc.kattare.com:9332/LP

 [2012-10-05 16:01:06] LONGPOLL from pool 0 detected new block
 [2012-10-05 16:01:15] Maximum buffer memory device 0 supports says 524288000, your scrypt settings come to 0
 [2012-10-05 16:01:15] Error -61: clCreateBuffer (padbuffer8), decrease CT or increase LG
 [2012-10-05 16:01:15] Failed to init GPU thread 0, disabling device 0
 [2012-10-05 16:01:15] Restarting the GPU from the menu will not fix this.
 [2012-10-05 16:01:15] Try restarting cgminer.
Press enter to continue:

There's the error code for you.

You should be able to easily replicate this just by setting --thread-concurrency 12288 (which works fine on reaper).

I'm pretty sure the problem has to do with these lines,
Code:
clState->padbufsize = bufsize;
clState->padbuffer8 = clCreateBuffer(clState->context, CL_MEM_READ_WRITE, bufsize, NULL, &status);

For whatever reason your program is calculating 0 for the bufsize.  You should be able to step through this with a debugger and figure it out pretty easily I would presume.
sr. member
Activity: 467
Merit: 250
 which tag/target in the makefile makes a bundle ready for binary download (precompiled) without .o files, etc?

hero member
Activity: 626
Merit: 500
Mining since May 2011.
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?

What OS?
Windows 7

Try it like this maybe: (Match the COM port up to what you see in Device Manager)
cgminer.exe -S bitforce://./COM4 -o site:port -u worker -p pass

Here it is listed in Device Manager  Port_#0004.Hub_#0003

So enter this whole command in CGminer exe  "[W]rite config file" ?    cgminer.exe -S bitforce://./COM0004 -o site:port -u worker -p pass

Not sure, I just run it like I wrote it above in a batch file. In Device Manager it should show up under Ports. Try the COM port that is shown under that.
newbie
Activity: 15
Merit: 0
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?

What OS?
Windows 7

Try it like this maybe: (Match the COM port up to what you see in Device Manager)
cgminer.exe -S bitforce://./COM4 -o site:port -u worker -p pass

Here it is listed in Device Manager  Port_#0004.Hub_#0003

So enter this whole command in CGminer exe  "[W]rite config file" ?    cgminer.exe -S bitforce://./COM0004 -o site:port -u worker -p pass



Also, make sure you are not running EasyMiner at the same time. Only 1 application at a time can "see" the BFL on the USB port.
sr. member
Activity: 462
Merit: 250
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?

What OS?
Windows 7

Try it like this maybe: (Match the COM port up to what you see in Device Manager)
cgminer.exe -S bitforce://./COM4 -o site:port -u worker -p pass

Here it is listed in Device Manager  Port_#0004.Hub_#0003

So enter this whole command in CGminer exe  "[W]rite config file" ?    cgminer.exe -S bitforce://./COM0004 -o site:port -u worker -p pass

hero member
Activity: 626
Merit: 500
Mining since May 2011.
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?

What OS?
Windows 7

Try it like this maybe: (Match the COM port up to what you see in Device Manager)
cgminer.exe -S bitforce://./COM4 -o site:port -u worker -p pass
sr. member
Activity: 462
Merit: 250
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?

What OS?
Windows 7
hero member
Activity: 626
Merit: 500
Mining since May 2011.
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?

What OS?
sr. member
Activity: 462
Merit: 250
Cant get CG miner to recognize a BFL single

used --scan-serial     in Command to find but not recognized

Any ideas?
hero member
Activity: 684
Merit: 529
optimize please the program under the 7th series for Litecoin
legendary
Activity: 1386
Merit: 1097
Very good, thanks! Fixed in git and hopefully fixes the problem for those who have it.

Fixed for me as well! Thank you both!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
so i didn't go to bed  Tongue

found your bug

cgminer.c:4519

   memcpy(work->target, target, 256);

256 should be 32 (or 33?? prob not)

now i can sleep
Very good, thanks! Fixed in git and hopefully fixes the problem for those who have it.
hero member
Activity: 631
Merit: 500
so i didn't go to bed  Tongue

found your bug

cgminer.c:4519

   memcpy(work->target, target, 256);

256 should be 32 (or 33?? prob not)

now i can sleep
hero member
Activity: 631
Merit: 500

Code:
                    
 [2012-10-05 02:33:12] [thread 0: 4294967295 hashes, 764919.3 khash/sec]                   
 [2012-10-05 02:33:12] Reusing stratum work                    m         
 [2012-10-05 02:33:12] Generated stratum merkle ff12c5f41deeed4e54282e0984e9d44256a82da37a576578773282f7a8753ca3                   
 [2012-10-05 02:33:12] Generated stratum header 00000002858ad41b7ae76b38c49400052ce2dfa185fa1214458430250000057a00000000ff12c5f41deeed4e54282e0984e9d44256a82da37a576578773282f7a8753ca3506ea93d1a057e0800000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000                   
 [2012-10-05 02:33:12] Work job_id 1bff nonce2 03000000 ntime 506ea93d                   
 [2012-10-05 02:33:12] Generated target ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000                   
 [2012-10-05 02:33:12] BFL0: block data: 5bbe470fe37f0754876f628a6fc05d5b091aaccfb6f12a573e09784c8ac627a1a8753ca3506ea93d1a057e08                   
 [2012-10-05 02:33:17] BFL0: Wait time changed to: 4120, waited 4780                   
 [2012-10-05 02:33:17] BFL0: waited 4780ms until NONCE-FOUND:2C890152
                   
 [2012-10-05 02:33:17]  Proof: 000000002474e5b08b1bfa16c0abeae9d9663fcba0e27b9dcea01d91d9165a43
Target: 00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
TrgVal? YES (hash < target)                   
 [2012-10-05 02:33:17] Pushing submit work to work thread                   
 [2012-10-05 02:33:17] [thread 0: 4294967295 hashes, 764624.5 khash/sec]                   
 [2012-10-05 02:33:17] Creating extra submit work thread                   
 [2012-10-05 02:33:17] Submitting share 2474e5b0 to pool 0                   
 [2012-10-05 02:33:17] SEND: {"params": ["xxxxx", "?/h??", "n", "K", "5201892c"], "id": 4, "method": "mining.submit"}                   
 [2012-10-05 02:33:17] Popping work to work thread                   
 [2012-10-05 02:33:17] Reusing stratum work                   
 [2012-10-05 02:33:17] Generated stratum merkle 277419191d07451d9cca09d5e8b5a7cb9228d24155ec5e3788545a00ea5ffde8                   
 [2012-10-05 02:33:17] Generated stratum header 00000002858ad41b7ae76b38c49400052ce2dfa185fa1214458430250000057a00000000277419191d07451d9cca09d5e8b5a7cb9228d24155ec5e3788545a00ea5ffde8506ea93d1a057e0800000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000                   
 [2012-10-05 02:33:17] Work job_id 1bff nonce2 04000000 ntime 506ea93d                   
 [2012-10-05 02:33:17] Generated target ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000                   
 [2012-10-05 02:33:17] BFL0: block data: ea85d83701f996f328f1795af8ac6199183b595aa96a061c60cb499d826fd4eeea5ffde8506ea93d1a057e08   

(only started 1 miner this time)
still corrupt

bedtime...bbl
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Code:
 [2012-10-05 01:35:29] Submitting share 4170db0c to pool 0                    
 [2012-10-05 01:35:29] SEND: {"params": ["xxxx", "", "n", "2024", "229896f9"], "id": 4, "method": "mining.submit"}                   
 [2012-10-05 01:35:29] Popping work to work thread                   
 [2012-10-05 01:35:29] Generated stratum merkle cc95510e6a4e1827a0a827e526a655483ffdc1a147ab0e2395adf625e00aed50                   
 [2012-10-05 01:35:29] Generated stratum header 00000002e9e9f48adc78181008747a20018b4286890db02aee4afe2d000000c500000000cc95510e6a4e1827a0a827e526a655483ffdc1a147ab0e2395adf625e00aed50506e9bc21a057e0800000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000                   
 [2012-10-05 01:35:29] Work job_id 1b84 nonce2 06000000 ntime 506e9bc2                   
 [2012-10-05 01:35:29] Generated target ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000                   
 [2012-10-05 01:35:29] BFL1: block data: c68555222103a5e1c6078755fc8fc3624de3e5f84c81d6624d5e6afb14bbb2dee00aed50506e9bc21a057e08                   
 [2012-10-05 01:35:30] Failed to recv sock in recv_line                   

no error in the response (RECVD) this time, but still get the repeating "Failed to recv sock in recv_line"
Sent message is still corrupted, though job_id, nonce2 and ntime are all intact earlier on. Can you git pull and try again please.
hero member
Activity: 631
Merit: 500
Code:
 [2012-10-05 01:35:29] Submitting share 4170db0c to pool 0                    
 [2012-10-05 01:35:29] SEND: {"params": ["xxxx", "", "n", "2024", "229896f9"], "id": 4, "method": "mining.submit"}                   
 [2012-10-05 01:35:29] Popping work to work thread                   
 [2012-10-05 01:35:29] Generated stratum merkle cc95510e6a4e1827a0a827e526a655483ffdc1a147ab0e2395adf625e00aed50                   
 [2012-10-05 01:35:29] Generated stratum header 00000002e9e9f48adc78181008747a20018b4286890db02aee4afe2d000000c500000000cc95510e6a4e1827a0a827e526a655483ffdc1a147ab0e2395adf625e00aed50506e9bc21a057e0800000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000                   
 [2012-10-05 01:35:29] Work job_id 1b84 nonce2 06000000 ntime 506e9bc2                   
 [2012-10-05 01:35:29] Generated target ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000                   
 [2012-10-05 01:35:29] BFL1: block data: c68555222103a5e1c6078755fc8fc3624de3e5f84c81d6624d5e6afb14bbb2dee00aed50506e9bc21a057e08                   
 [2012-10-05 01:35:30] Failed to recv sock in recv_line                   

no error in the response (RECVD) this time, but still get the repeating "Failed to recv sock in recv_line"
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Code:
 [2012-10-05 00:49:01] SEND: {"params": ["xxxxx", "", "sh/", "", "bae154a2"], "id": 6, "method": "mining.submit"}      
Interesting, extranonce2 is coming up blank. Can you git pull and try again?
hero member
Activity: 631
Merit: 500
Code:
[2012-10-05 00:48:56] Generated target ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000                    
 [2012-10-05 00:48:56] BFL0: block data: a0a899cc1baff682058393fe1151e648939ba67b6efa320f064e33610167c2eb464a1a7d506e90d71a057e08                   
 [2012-10-05 00:48:56] BFL1: block data: 28b4192cb7c87b49aae3d55d94e8ed53b35fa310db59293c4c15ea7697fa3fc953306e21506e90d71a057e08                   
 [2012-10-05 00:49:00] BFL0: Wait time changed to: 3750, waited 4260                   
 [2012-10-05 00:49:00] BFL0: waited 4260ms until NONCE-FOUND:A254E1BA,BCAD6DB8
                   
 [2012-10-05 00:49:01]  Proof: 000000006197050ed0accca347eb15aeb8708e71d718d15751f2664f76cd08bf
Target: 00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
TrgVal? YES (hash < target)                   
 [2012-10-05 00:49:01] Pushing submit work to work thread                   
 [2012-10-05 00:49:01] Creating extra submit work thread                   
 [2012-10-05 00:49:01]  Proof: 00000000ff1d2f09b6e42f69685724c5507d1a6ec55971b9bef5e2cbac365948
Target: 00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
TrgVal? YES (hash < target)                   
 [2012-10-05 00:49:01] Submitting share 6197050e to pool 0                   
 [2012-10-05 00:49:01] SEND: {"params": ["xxxxx", "", "sh/", "", "bae154a2"], "id": 6, "method": "mining.submit"}                   
 [2012-10-05 00:49:01] Popping work to work thread                   
 [2012-10-05 00:49:01] Pushing submit work to work thread                   
 [2012-10-05 00:49:01] [thread 0: 8589934590 hashes, 794139.7 khash/sec]                   
 [2012-10-05 00:49:01] Creating extra submit work thread                   
 [2012-10-05 00:49:01] Submitting share ff1d2f09 to pool 0                   
 [2012-10-05 00:49:01] SEND: {"params": ["xxxxx", "", "sh/", "", "b86dadbc"], "id": 7, "method": "mining.submit"}                   
 [2012-10-05 00:49:01] Reusing stratum work                   
 [2012-10-05 00:49:01] Generated stratum merkle 52a0a31a21d08eb4e3ddbcd8c516bfeeec48c05d537d57c29bf8aa81fb1bc64b                   
 [2012-10-05 00:49:01] Generated stratum header 00000002149b6a02dc6694db213d99d8ff9c0b24e472b5ef7ed52ae2000001470000000052a0a31a21d08eb4e3ddbcd8c516bfeeec48c05d537d57c29bf8aa81fb1bc64b506e90d71a057e0800000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000                   
 [2012-10-05 00:49:01] Generated target ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000                   
 [2012-10-05 00:49:01] Popping work to work thread                   
 [2012-10-05 00:49:01] BFL0: block data: 13436fa9efeb06eafcf552097b30d47cbc410cd20fcb8be8ea26dcffc975e07cfb1bc64b506e90d71a057e08                   
 [2012-10-05 00:49:01] RECVD: {"error": [-2, "Incorrect size of extranonce2. Expected 8 chars", null], "id": 5, "result": null}                   
 [2012-10-05 00:49:01] PROOF OF WORK RESULT: false (booooo)                   
 [2012-10-05 00:49:01] Rejected 636e8606 Diff 1 BFL 1 pool 0 (Incorrect size of extranonce                     
 [2012-10-05 00:49:01] Failed to recv sock in recv_line                   

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
pulled the latest changes

now debug output keeps repeating

Quote
[2012-10-05 00:29:36] Failed to recv sock in recv_line

Can you give us the leadup up to the first time you see that message when you have the debugging options --verbose -D -P -T please
Jump to: