Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows - libethash - multiple concurrent miners crash application #89

Open
ghost opened this issue Jan 17, 2017 · 0 comments
Open

Windows - libethash - multiple concurrent miners crash application #89

ghost opened this issue Jan 17, 2017 · 0 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 17, 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 chriseth added the bug label Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant