Pages:
Author

Topic: [ANN]: cpuminer-opt v3.8.8.1, open source optimized multi-algo CPU miner - page 95. (Read 444043 times)

legendary
Activity: 1470
Merit: 1114
i have the logfile   "report.log"    from Eypsylon version of CL    but its a huge file .
if it helps  how can i deliver it to you     or simply posting here ?

Just look for keywords like Memcheck. stack, error, etc, as well as the last few lines when it crashed.
I don't know exactly what to look for, just anything suspicious that indicates problems with the stack.

Did you try compiling with -fno-stack-protector?
full member
Activity: 144
Merit: 100
Eager to learn
i have the logfile   "report.log"    from Eypsylon version of CL    but its a huge file .
if it helps  how can i deliver it to you     or simply posting here ?
legendary
Activity: 1470
Merit: 1114
until now nothing has solved the problem ,
i found this  here:  from this source
http://stackoverflow.com/questions/2340259/how-to-turn-off-gcc-compiler-optimization-to-enable-buffer-overflow

maybe something from works

On newer distros (as of 2016), it seems that PIE is enabled by default so you will need to disable it explicitly when compiling.

Here's a little summary of commands which can be helpful when playing locally with buffer overflow exercises in general:

Disable canary:

gcc vuln.c -o vuln_disable_canary -fno-stack-protector ./build.sh       << tested     no succes   same error (stack overflow   terminated) 

Disable DEP:

gcc vuln.c -o vuln_disable_dep -z execstack

Disable PIE:

gcc vuln.c -o vuln_disable_pie -no-pie

Disable all of protection mechanisms listed above (warning: for local testing only):

gcc vuln.c -o vuln_disable_all -fno-stack-protector -z execstack -no-pie



have also tried like Epsylon adviced , no succes   

-fno-stack-protector should prevent the stack smashing detection but may still result in a segfault. That would
be a successful test as it indicates the stack smashing detection is not causing a problem, only detecting
a problem.

I presume you saw nothing unusual when running with valgrind. I would expect some extra data surrouding
the crash.
full member
Activity: 144
Merit: 100
Eager to learn
until now nothing has solved the problem ,
i found this  here:  from this source
http://stackoverflow.com/questions/2340259/how-to-turn-off-gcc-compiler-optimization-to-enable-buffer-overflow

maybe something from works

On newer distros (as of 2016), it seems that PIE is enabled by default so you will need to disable it explicitly when compiling.

Here's a little summary of commands which can be helpful when playing locally with buffer overflow exercises in general:

Disable canary:

gcc vuln.c -o vuln_disable_canary -fno-stack-protector ./build.sh       << tested     no succes   same error (stack overflow   terminated) 

Disable DEP:

gcc vuln.c -o vuln_disable_dep -z execstack

Disable PIE:

gcc vuln.c -o vuln_disable_pie -no-pie

Disable all of protection mechanisms listed above (warning: for local testing only):

gcc vuln.c -o vuln_disable_all -fno-stack-protector -z execstack -no-pie



have also tried like Epsylon adviced , no succes   
legendary
Activity: 1470
Merit: 1114
I was looking at sia in cpuminer-multi, it didn't submit a share after several minutes although it
appeared to be hashing sanely. Dos it work? It looks like the wrong nonce offset [19] is used
all through scanhash_sia but [8] (32 bytes) is used in miner_thread.
legendary
Activity: 1470
Merit: 1114
I'm not sure what I'm looking for with valgrind. leak-check is done at program exit and reports
some potential leaks that appear to be false positives. Regardless leaks are not the issue,

Memcheck seems to be what I'm looking for and it appears to be enabled by default. But I didn't
see anything that stood out. There was no mention of Memcheck other than in the report header
and no mention of any stack problems other than the suspected leaks. As these appear to be in
systen code allocating a stack and the man page does warn of false positives i don't
think they are significant. Here's a sample showing one of 4 identical reports and the summary.

I saw no difference after implementing the smaller stack frame.

Code:
==20686== 320 bytes in 1 blocks are possibly lost in loss record 72 of 80
==20686==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20686==    by 0x4012E54: allocate_dtv (dl-tls.c:296)
==20686==    by 0x4012E54: _dl_allocate_tls (dl-tls.c:460)
==20686==    by 0x50A1DA0: allocate_stack (allocatestack.c:589)
==20686==    by 0x50A1DA0: pthread_create@@GLIBC_2.2.5 (pthread_create.c:500)
==20686==    by 0x4059FF: main (in /home/coin/devel/cpuminer/cpuminer/3.5.9/cpuminer-opt-3.5.9-dev/cpuminer)
==20686==
==20686== LEAK SUMMARY:
==20686==    definitely lost: 0 bytes in 0 blocks
==20686==    indirectly lost: 0 bytes in 0 blocks
==20686==      possibly lost: 1,280 bytes in 4 blocks
==20686==    still reachable: 133,323 bytes in 84 blocks
==20686==         suppressed: 0 bytes in 0 blocks
==20686== Reachable blocks (those to which a pointer was found) are not shown.
==20686== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==20686==
==20686== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
==20686== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)

legendary
Activity: 1484
Merit: 1082
ccminer/cpuminer developer
Code:
valgrind --leak-check=full -v --log-file=report.log ./cpuminer ....

that will use secure memory allocations and logs overflows etc. This error is happening if you write too far in an array... and indeed doesnt crash all the time..
legendary
Activity: 1470
Merit: 1114
so far so good . thank you for the response
but how to downgrade or fix by myself ,   and is it worth because you said you will try to fix this in next releases

If it works with stack protector disabled go with it until the next release, then try reenabling it to see
if the problem is fixed.
full member
Activity: 144
Merit: 100
Eager to learn
so far so good . thank you for the response
but how to downgrade or fix by myself ,   and is it worth because you said you will try to fix this in next releases
legendary
Activity: 1470
Merit: 1114
        **********  cpuminer-opt 3.5.8  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU:         Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
CPU features: SSE2 AES AVX
SW built on Feb 16 2017 with GCC 5.4.0
SW features: SSE2 AES AVX
Algo features: SSE2 AES AVX AVX2
Start mining with SSE2 AES AVX

[2017-02-21 00:56:57] Starting Stratum on stratum+tcp://yiimp.ccminer.org:3747
[2017-02-21 00:56:57] 8 miner threads started, using 'hmq1725' algorithm.
[2017-02-21 00:56:57] Stratum difficulty set to 8 (0.00012)
[2017-02-21 00:56:57] hmq1725 block 31296, diff 4.637
[2017-02-21 00:56:59] hmq1725 block 31297, diff 4.637
*** stack smashing detected ***: ./cpuminer terminated
*** stack smashing detected ***: ./cpuminer terminated
Abgebrochen (Speicherabzug geschrieben)
sklave@miner-HP-Compaq-8200:~/joblo8$

im so happy im not the only one  Wink


Both are with GCC 5.4.0, I compile with 4.8.4. It's the best clue so far.

There were some problem reported a long time ago with newer compilers. I'll have to try to find
that discussion unless someone else finds it first. I thought it had been resolved but don't recall how.

Found this.

http://stackoverflow.com/questions/39237085/stack-smashing-detected-comes-in-ubuntu-16-04

It's worth a try. If nothing else it will blow up somewhere else giving another clue.

Edit: as far as root cause goes, I've reviewed the code many times for rogue pointers that could corrupt
the stack (Im very familiar with my issues with pointer arithmetic) but can't find anything suspicious.

It may be a stack overflow which can go unoticed if it it doesn't go too far. That could explain why it
works when compiled with GCC 4.8.4 presumably with no stack protector.

If it is a stack overflow the next release will have reduced stack usage. The context struct for this algo
is the biggest of any algos, including xevan so I've moved it from local to global In a sense it is the canary.
I may move more context structs if this proves to be the issue.
full member
Activity: 144
Merit: 100
Eager to learn
         **********  cpuminer-opt 3.5.8  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU:         Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
CPU features: SSE2 AES AVX
SW built on Feb 16 2017 with GCC 5.4.0
SW features: SSE2 AES AVX
Algo features: SSE2 AES AVX AVX2
Start mining with SSE2 AES AVX

[2017-02-21 00:56:57] Starting Stratum on stratum+tcp://yiimp.ccminer.org:3747
[2017-02-21 00:56:57] 8 miner threads started, using 'hmq1725' algorithm.
[2017-02-21 00:56:57] Stratum difficulty set to 8 (0.00012)
[2017-02-21 00:56:57] hmq1725 block 31296, diff 4.637
[2017-02-21 00:56:59] hmq1725 block 31297, diff 4.637
*** stack smashing detected ***: ./cpuminer terminated
*** stack smashing detected ***: ./cpuminer terminated
Abgebrochen (Speicherabzug geschrieben)
sklave@miner-HP-Compaq-8200:~/joblo8$

im so happy im not the only one  Wink
sr. member
Activity: 430
Merit: 250
on windows i used the precompiled from cryptominingblog. exact same cpu. give me a few minutes and ill recompile. same thing. i may just give up on this algo lol. might not be worth the trouble with my shitty comp.

Cryptominingblog stopped building binaries of cpuminer-opt a long time ago. Sigh.
thats the one that works for me :/...only on windows though.
legendary
Activity: 1470
Merit: 1114
on windows i used the precompiled from cryptominingblog. exact same cpu. give me a few minutes and ill recompile. same thing. i may just give up on this algo lol. might not be worth the trouble with my shitty comp.

Cryptominingblog stopped building binaries of cpuminer-opt a long time ago. Sigh.
sr. member
Activity: 430
Merit: 250
on windows i used the precompiled from cryptominingblog. exact same cpu. give me a few minutes and ill recompile. same thing. i may just give up on this algo lol. might not be worth the trouble with my shitty comp.
         **********  cpuminer-opt 3.5.8  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU:        Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
CPU features: SSE2 AES AVX
SW built on Feb 19 2017 with GCC 5.4.0
SW features: SSE2
Algo features: SSE2 AES AVX AVX2
Start mining with SSE2

[2017-02-19 14:15:37] Starting Stratum on stratum+tcp://boat.suprnova.cc:4156
[2017-02-19 14:15:37] Binding thread 0 to cpu 0 (mask 1)
[2017-02-19 14:15:37] 2 miner threads started, using 'hmq1725' algorithm.
[2017-02-19 14:15:37] Binding thread 1 to cpu 1 (mask 2)
[2017-02-19 14:15:38] Stratum session id: deadbeefcafebabe4a2b000000000000
[2017-02-19 14:15:41] stratum extranonce subscribe timed out
[2017-02-19 14:15:41] DEBUG: job_id='8e98' extranonce2=00000000 ntime=58a9fcd9
[2017-02-19 14:15:41] Stratum difficulty set to 1 (0.00002)
[2017-02-19 14:15:41] hmq1725 block 29284, diff 2.743
[2017-02-19 14:15:49] DEBUG: hash <= target
Hash:   00003f4440d4cd15afcad7a6d0e24960d04db69040e9e7447dfbf7307610aed3
Target: 0000ffff00000000000000000000000000000000000000000000000000000000
*** stack smashing detected ***: ./cpuminer terminated
Aborted (core dumped)
name@name-VPCEH32FX:~/cpuminer-opt$
legendary
Activity: 1470
Merit: 1114
i really do apologize for being a pain in the ass. I compiled on Ubuntu 16.04. i hope this is the output your asking for. If not how do i find the other
name@name-VPCEH32FX:~/cpuminer-opt$ ./cpuminer -a hmq1725 -o stratum+tcp://boat.suprnova.cc:4156 -u twiztid1.2 -p x -t 2

      **********  cpuminer-opt 3.5.8  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU:        Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
CPU features: SSE2 AES AVX
SW built on Feb 19 2017 with GCC 5.4.0
SW features: SSE2 AES AVX
Algo features: SSE2 AES AVX AVX2
Start mining with SSE2 AES AVX

[2017-02-19 13:30:09] Starting Stratum on stratum+tcp://boat.suprnova.cc:4156
[2017-02-19 13:30:09] Binding thread 0 to cpu 0 (mask 1)
[2017-02-19 13:30:09] 2 miner threads started, using 'hmq1725' algorithm.
[2017-02-19 13:30:09] Binding thread 1 to cpu 1 (mask 2)
[2017-02-19 13:30:09] Stratum session id: deadbeefcafebabe382b000000000000
[2017-02-19 13:30:12] stratum extranonce subscribe timed out
[2017-02-19 13:30:12] DEBUG: job_id='8e47' extranonce2=00000000 ntime=58a9f235
[2017-02-19 13:30:12] Stratum difficulty set to 1 (0.00002)
[2017-02-19 13:30:12] hmq1725 block 29228, diff 3.345
[2017-02-19 13:30:13] DEBUG: hash <= target
Hash:   00004bd64e027695caea3732e8c8c775d6c12260d3829714b213d30aa27f960d
Target: 0000ffff00000000000000000000000000000000000000000000000000000000
*** stack smashing detected ***: ./cpuminer terminated
Aborted (core dumped)
name@name-VPCEH32FX:~/cpuminer-opt$


Thanks. This tells me where it crashed, after finding a nonce but before displaying the hash message.
It's going to be a difficult troubleshooting and I need every clue I can get.

Can you tell me about Windows? Did you compile it or use the binaries? What kind of CPU?

On Linux can you try compiling with -march=core2  instead of -march=native. This will cause some different
code to run and I want to know if it crashes as well.

sr. member
Activity: 430
Merit: 250
i really do apologize for being a pain in the ass. I compiled on Ubuntu 16.04. i hope this is the output your asking for. If not how do i find the other
name@name-VPCEH32FX:~/cpuminer-opt$ ./cpuminer -a hmq1725 -o stratum+tcp://boat.suprnova.cc:4156 -u twiztid1.2 -p x -t 2

      **********  cpuminer-opt 3.5.8  ***********
     A CPU miner with multi algo support and optimized for CPUs
     with AES_NI and AVX extensions.
     BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT
     Forked from TPruvot's cpuminer-multi with credits
     to Lucas Jones, elmad, palmd, djm34, pooler, ig0tik3d,
     Wolf0, Jeff Garzik and Optiminer.

CPU:        Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
CPU features: SSE2 AES AVX
SW built on Feb 19 2017 with GCC 5.4.0
SW features: SSE2 AES AVX
Algo features: SSE2 AES AVX AVX2
Start mining with SSE2 AES AVX

[2017-02-19 13:30:09] Starting Stratum on stratum+tcp://boat.suprnova.cc:4156
[2017-02-19 13:30:09] Binding thread 0 to cpu 0 (mask 1)
[2017-02-19 13:30:09] 2 miner threads started, using 'hmq1725' algorithm.
[2017-02-19 13:30:09] Binding thread 1 to cpu 1 (mask 2)
[2017-02-19 13:30:09] Stratum session id: deadbeefcafebabe382b000000000000
[2017-02-19 13:30:12] stratum extranonce subscribe timed out
[2017-02-19 13:30:12] DEBUG: job_id='8e47' extranonce2=00000000 ntime=58a9f235
[2017-02-19 13:30:12] Stratum difficulty set to 1 (0.00002)
[2017-02-19 13:30:12] hmq1725 block 29228, diff 3.345
[2017-02-19 13:30:13] DEBUG: hash <= target
Hash:   00004bd64e027695caea3732e8c8c775d6c12260d3829714b213d30aa27f960d
Target: 0000ffff00000000000000000000000000000000000000000000000000000000
*** stack smashing detected ***: ./cpuminer terminated
Aborted (core dumped)
name@name-VPCEH32FX:~/cpuminer-opt$
legendary
Activity: 1470
Merit: 1114
Hmq1725 Algo isn't working. Says stack smashing detected.

It works for me. Can you provide more details?
all algos work just fine except for that one. Was trying to mine doubloons on suprnova and it just crashes immediately after the difficulty shows up. Tried it on multiple computers. I'm on linux

That's where I tested. Show me the output. What CPU do you have? What version of cpuminer-opt? When did
it break? Does 3.4.12 work? What version of Linux? How did you compile? I can't reproduce it so you need to
give me all the details.
I have the newest and the one you asked if I had. Both do the same thing. It broke as soon as I tried to mine the coin. I'm on Ubuntu 16.04. I have a i5-2450. Miner works perfect in Windows but I'd rather run it in Linux. I used ./build.sh and the ./autogen.sh way. Both compiled fine but crash the same way.

It works on my i5-2400. I reviewed the code and found no suspicious pointer usage. This algo shares much of its code with other
algos that work for you, and hmq1725 works for you on Windows.

I have nothing to work with. You hinted that you compiled on Windows. I asked for all the details but you only gave me a little more.
If you compiled on Windows try using the precompiled binaries to see if they work also. Also try different archiectures (except AVX2)
to see if the problem is architecture specific.

Unless you can come up with more details of what works and what doesn't, as well as posting the program output ( I specifically asked
for that too) I won't be able to help.

Edit: I just noticed your CPU is a laptop, it would have been worth mentioning that or at least correctly identify it as i5-2450M.
Are you trying to make things more difficult?

hmq1725 has a very large stack frame, it is possible the crash is a simple stack overflow rather than the more ominous "smashing".
I will make a change in the next release to reduce the stack usage but I have no idea if it will fix your problem.
sr. member
Activity: 430
Merit: 250
Hmq1725 Algo isn't working. Says stack smashing detected.

It works for me. Can you provide more details?
all algos work just fine except for that one. Was trying to mine doubloons on suprnova and it just crashes immediately after the difficulty shows up. Tried it on multiple computers. I'm on linux

That's where I tested. Show me the output. What CPU do you have? What version of cpuminer-opt? When did
it break? Does 3.4.12 work? What version of Linux? How did you compile? I can't reproduce it so you need to
give me all the details.
I have the newest and the one you asked if I had. Both do the same thing. It broke as soon as I tried to mine the coin. I'm on Ubuntu 16.04. I have a i5-2450. Miner works perfect in Windows but I'd rather run it in Linux. I used ./build.sh and the ./autogen.sh way. Both compiled fine but crash the same way.
legendary
Activity: 1470
Merit: 1114
Hmq1725 Algo isn't working. Says stack smashing detected.

It works for me. Can you provide more details?
all algos work just fine except for that one. Was trying to mine doubloons on suprnova and it just crashes immediately after the difficulty shows up. Tried it on multiple computers. I'm on linux

That's where I tested. Show me the output. What CPU do you have? What version of cpuminer-opt? When did
it break? Does 3.4.12 work? What version of Linux? How did you compile? I can't reproduce it so you need to
give me all the details.
sr. member
Activity: 430
Merit: 250
Hmq1725 Algo isn't working. Says stack smashing detected.

It works for me. Can you provide more details?
all algos work just fine except for that one. Was trying to mine doubloons on suprnova and it just crashes immediately after the difficulty shows up. Tried it on multiple computers. I'm on linux
Pages:
Jump to: