ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.97k stars 2.29k forks source link

segfault when --cuda-devices specified on command line #721

Closed tczaugg closed 6 years ago

tczaugg commented 6 years ago

I'm getting segfaults when I try to run on a single GPU.

MariusVanDerWijden commented 6 years ago

can you post the whole command you use?

tczaugg commented 6 years ago

This command results in a segfault:

/usr/local/bin/ethminer --farm-recheck 100 --cuda-devices 0 -RH -U -S us1.ethermine.org:4444 -O .zMiner10

The last version I used was commit 6271d8dc9ea421ab292d7321e7fc3b4bbc024436, for which this command works fine. Without the --cuda-devices option it works fine too. But I run all my cards with their own instance of ethminer.

On Sat, Feb 10, 2018 at 4:27 AM, Marius van der Wijden < notifications@github.com> wrote:

can you post the whole command you use?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ethereum-mining/ethminer/issues/721#issuecomment-364638609, or mute the thread https://github.com/notifications/unsubscribe-auth/ANUh0R7nEM7JjUzCTHVM9iLEz0JCBoi_ks5tTWEBgaJpZM4SAwtx .

DeadManWalkingTO commented 6 years ago

Yes, you have right. I try --cuda-devices 0 and get error. (Win10 - Nvidia Driver 390.77)

DeadManWalkingTO commented 6 years ago

Why you wan to run all cards with their own instance of ethminer?

tczaugg commented 6 years ago

I have an auto-tuning program I wrote that adjusts the memory clock rates and monitors each card and restarts it when there is a problem. If I run all the cards in one instance of ethminer then I have to restart the whole thing when a card has a problem. That equates to more down time.

On Sat, Feb 10, 2018 at 1:59 PM, DeadManWalking notifications@github.com wrote:

Why you wan to run all cards with their own instance of ethminer?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ethereum-mining/ethminer/issues/721#issuecomment-364680742, or mute the thread https://github.com/notifications/unsubscribe-auth/ANUh0ZZpWMftrcIzo8aggZUExk6VSHhjks5tTeckgaJpZM4SAwtx .

jcejohnson commented 6 years ago

Same problem on Ubuntu 16.04.3 with nvidia-390. It looks like it might be in the command-line parsing.

` $ ~/ethereum-mining-ethminer/build$ ../build/ethminer/ethminer --cuda-devices 0 -x --farm-recheck 200 -U -RH -SP 1 -S eth-us-east1.nanopool.org:9999 -O foo Segmentation fault (core dumped)

$ ~/ethereum-mining-ethminer/build$ ../build/ethminer/ethminer -x --cuda-devices 0 --farm-recheck 200 -U -RH -SP 1 -S eth-us-east1.nanopool.org:9999 -O foo Invalid argument: -x `

jean-m-cyr commented 6 years ago

@jcejohnson Why would you use the -X option if your intent is to run a single Nvidia card. Your second command line should work fine without the -X. With this instance you are supporting a single CUDA card, so -U is appropriate.

jean-m-cyr commented 6 years ago

@jcejohnson Also, in Stratum mode the --farm-recheck parameter is a old Getwork parameter that has been reused to control the frequency of the hash rate logs, it has no effect on performance. Set it to something larger like 5000, or 10000

tczaugg commented 6 years ago

In my case, I usually run through a proxy server on the same machine as my cards, so I use the -F rather than the -S option. But in diagnosing the problem I switched over to stratum before I discovered that the problem was in the --cuda-devices option. However, I did not change the --farm-recheck setting, which does affect the stale shares I get when running through the proxy.

On Sat, Feb 10, 2018 at 5:54 PM, Jean Cyr notifications@github.com wrote:

@jcejohnson https://github.com/jcejohnson Also, in Stratum mode the --farm-recheck parameter is a old Getwork parameter that has been reused to control the frequency of the hash rate logs, it has no effect on performance. Set it to something larger like 5000, or 10000

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ethereum-mining/ethminer/issues/721#issuecomment-364702523, or mute the thread https://github.com/notifications/unsubscribe-auth/ANUh0Q9NkCgwA-NgxNgCx5SEA8-v7Wqdks5tTh4kgaJpZM4SAwtx .

jcejohnson commented 6 years ago

@jean-m-cyr - Because I know it's a bogus option (-x, not -X). Putting it before --cuda-devices gives me an "invalid argument" error. Omitting it gives me a segfault. That makes me think that the error may be in the command line processing rather than in whatever happens afterwards. Or it could be meaningless. Just reporting my observation.

jean-m-cyr commented 6 years ago

@jcejohnson Correct, it does fault in cmd line processing.

DeadManWalkingTO commented 6 years ago

Problem still standing (--cuda-devices 0 error). (Win10 - Nvidia Driver 390.77)

lexruee commented 6 years ago

I also encounter a segfault when I use the option --opencl-devices 0 on my RX580 Rig.

Example command to crash latest master branch (489aa476cb407b5f345402ede9762d38b6d6f0da):

ethminer -Z --opencl --opencl-devices 0
jean-m-cyr commented 6 years ago

Fixed