-
Notifications
You must be signed in to change notification settings - Fork 1
Disable race detector so that replica doesn't leak memory #1024
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
Conversation
Until golang/go#26813 is resolved, running lantern with the race detector causes memory and cpu usage to explode until the machine is rendered unusable. |
I suspect |
Oh yeah definitely for production builds we don't use the race flag. |
I agree we definitely want to use -race for tests -- it's really very useful in general for identifying races, and I think it's existence is actually the main reason it doesn't seem super useful now -- i.e. we've eliminated the races it's flagged for us! |
BUILD_RACE ?= '-race' | ||
# The race detector leaks memory so we disable it in testing until | ||
# https://github.com/golang/go/issues/26813 is resolved | ||
# BUILD_RACE ?= '-race' | ||
REVISION_DATE := $(shell git log -1 --pretty=format:%ad --date=format:%Y%m%d.%H%M%S) | ||
BUILD_DATE := $(shell date -u +%Y%m%d.%H%M%S) | ||
|
||
ifeq ($(OS),Windows_NT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should be done with go env
😆
I would keep the comment about how memory might leak for future developers. |
Setting it to the empty string or -x is not portable across operating systems
e17bdff
to
581f044
Compare
I think this has been pushed to by accident. It seemed like some of the PR was of interest, the comment, and some of the fixes around |
I've been keeping it up to date with devel for myself. Whenever I run flashlight for long enough my cpu usage goes to 100% still without this. @kalliroi had some trouble with this today so I pushed for her to have access to the branch.
… On Apr 8, 2021, at 7:14 PM, Matt Joiner ***@***.***> wrote:
I think this has been pushed to by accident. It seemed like some of the PR was of interest, the comment, and some of the fixes around -x is that right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Closing this. For development, we can just build with |
No description provided.