Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Windows - libethash - multiple concurrent miners crash application #3484

Open
ghost opened this issue Jan 5, 2017 · 3 comments
Open

Windows - libethash - multiple concurrent miners crash application #3484

ghost opened this issue Jan 5, 2017 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jan 5, 2017

Attempting to run multiple separate miners in Windows (7/8/10) crashes out. After initial miner started any subsequent miner will fail when attempting to open the DAG. This isn't happening in Linux.

The issue is that the ethash_fopen function in io_win32.c calls fopen_s which opens files exclusively in Windows environment. I suggest we could change:

FILE* ethash_fopen(char const* file_name, char const* mode)
{
	FILE* f;
	return fopen_s(&f, file_name, mode) == 0 ? f : NULL;
}

to

FILE* ethash_fopen(char const* file_name, char const* mode)
{
	return _fsopen( file_name, mode, _SH_DENYNO );
}

I've changed and tested this locally and have had no issues so far with it.

Let me know if you'd like my to open a pull request with the change in place for review. I'm new to contributing to github projects so I'm not up to speed on good etiquette...

@chriseth
Copy link
Contributor

chriseth commented Jan 5, 2017

Are you using the cpp-ethereum miner or the genoil miner? It might be better to just make that change in the genoil miner, because it is better maintained.

@ghost
Copy link
Author

ghost commented Jan 5, 2017 via email

@chriseth
Copy link
Contributor

chriseth commented Jan 6, 2017

Ah, then it might make sense reporting this to http://github.com/ethereum/ethash - but please also keep this one here open as a reminder for us.

@axic axic added the ethminer label Jan 24, 2018
@chfast chfast self-assigned this May 16, 2018
@chfast chfast added the bug label May 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants