rplant8 / cpuminer-opt-rplant

105 stars 75 forks source link

cpuminer freezes when it is started with no parameters #46

Closed PSLLSP closed 4 months ago

PSLLSP commented 12 months ago

cpuminer for Linux, downloaded from github, file cpuminer-opt-linux.tar.gz

When it is started with no parameters, it cannot be easily stopped. It would be nice to just print help and exit when no parameter is added...

$ ./cpuminer-sse2
...
         **********  cpuminer-rplant 5.0.34L-sse2 *********** 
Found 8 logical processors across 4 physical cores

Miner cannot be stopped from console with CTRL+C or send to background with CTRL+Z. It has to be killed with signal 9 from other terminal, like kill -9 PID

when I run it with strace, I see a problem (SIGSEGV):

$ strace ./cpuminer-sse2
execve("./cpuminer-sse2", ["./cpuminer-sse2"], 0x7ffe7ad8c070 /* 33 vars */) = 0
open("/proc/self/exe", O_RDONLY)        = 3
mmap(NULL, 3246206, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdafc7d7000
mmap(0x7fdafc7d7000, 3245808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x7fdafc7d7000
mprotect(0x7fdafcaee000, 6270, PROT_READ|PROT_EXEC) = 0
...
read(3, "h_l1d\nbugs\t\t: cpu_meltdown spect"..., 1024) = 1024
read(3, "pcid_single pti ssbd ibrs ibpb s"..., 1024) = 424
read(3, "", 1024)                       = 0
close(3)                                = 0
write(1, "Found 8 logical processors acros"..., 51Found 8 logical processors across 4 physical cores
) = 51
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
rplant8 commented 4 months ago

fixed