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

Run race detector in V2 #671

Closed
rcoreilly opened this issue Dec 25, 2023 · 5 comments
Closed

Run race detector in V2 #671

rcoreilly opened this issue Dec 25, 2023 · 5 comments
Assignees
Milestone

Comments

@rcoreilly
Copy link
Member

should be all good but might be a few cases here and there.

Also, can look at need for style and other mutexes -- in general most likely not needed due to way things get updated and top-level UpdateStartAsync logic.

@kkoreilly
Copy link
Member

The Goki Demo fails to start very occasionally on my windows computer; I would say about 1% of the time.

@rcoreilly
Copy link
Member Author

Did this with async test example, and it looks pretty clean (after fixing some things): just the atomic flag checking routines -- which are fine.

key command for running that prevents immediate fail in vulkan / glfw:

go build -race -gcflags=all=-d=checkptr=0

@rcoreilly
Copy link
Member Author

just commented out StyMu and BBoxMu and ran async race detector without any additional issues related to those things, so likely can remove pending further testing.

fbf166e

@rcoreilly
Copy link
Member Author

to be more explicit: everything is protected by the RenderCtx mutex lock that happens at the start of event processing, rendering, and Async processing, so we don't need finer-grained mutexes within widgets etc. This strategy precludes parallel processing of widgets, but that doesn't make sense for lots of reasons anyway, so this big global mutex strategy is probably the best way to go.

@kkoreilly
Copy link
Member

After more testing, it is clear that StyMu and BBoxMu are not necessary, so I cleaned up the old code for that in the commit above. The race detector output seems to be good, and there are no clear outstanding issues, so I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants