mbevand / silentarmy

Zcash miner optimized for AMD & Nvidia GPUs
342 stars 188 forks source link

Memory leaks #79

Open aleksander opened 7 years ago

aleksander commented 7 years ago

Arch Linux / AMDGPU-Pro 16.30

At start SilentArmy memory consumption is about 40 Mb. After 20 hours of mining SilentArmy memory consumption is about 4 Gb.

Clang static analyzer found no problems. I'll try to find any with valgrind.

ddobreff commented 7 years ago

Confirmed but only with eXtremal's optimizations.

ghost commented 7 years ago

Confirmed on Ubuntu 16.04.1 / AMDGPU-Pro 16.40.

ghost commented 7 years ago

@aleksander, give this a try: https://github.com/mbevand/silentarmy/pull/83

aleksander commented 7 years ago

@jramos, thank you! testing it right now.

ghost commented 7 years ago

I let it run overnight on my machine. There's still a slight memory leak somewhere, but it's much better for me now.

RichAyotte commented 7 years ago

Here's a quick script that whipped up that restarts the miner every hour.

#!/bin/bash

trap ctrl_c INT
function ctrl_c() {
    /usr/bin/pkill silentarmy
    exit
}

while :
do
    /usr/bin/pkill silentarmy
    sleep 5
    /path-to-/silentarmy -c stratum+tcp://your-pool.com:2323 -u t1xxxxxxxxxxxxxxxxxxxxxxxx/xxxxxx0/me@email.com -p "password" --use=0 & 
    sleep 3600
done
mbevand commented 7 years ago

I have committed jramos's pull request #83. I am currently in the middle of a major rewrite. I'll investigate the (other?) leaks later.