Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant