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

Thread safety issue #26

Closed
xiaopengli89 opened this issue Sep 7, 2022 · 5 comments
Closed

Thread safety issue #26

xiaopengli89 opened this issue Sep 7, 2022 · 5 comments

Comments

@xiaopengli89
Copy link

ferrisetw has a thread safety issue(xiaopengli89/precord#9), I checked the code and the cause of the issue should be here:

https://github.com/n4r1b/ferrisetw/blob/master/src/trace.rs#L99

@daladim
Copy link
Collaborator

daladim commented Sep 9, 2022

There definitely could be some thread-safety issues, I'll have a look at it.

Do you have more context? Did you run into bugs/crashes? Is there any debugging log you'd like to share? What makes you think that line is the cause of your issue?

Thanks

@xiaopengli89
Copy link
Author

Multiple threads modify schemas at the same time(https://github.com/n4r1b/ferrisetw/blob/master/src/schema.rs#L130), resulting in crashes or memory errors.

@daladim
Copy link
Collaborator

daladim commented Sep 19, 2022

I'm planning to take care of this in an upcoming release of this crate

@daladim
Copy link
Collaborator

daladim commented Oct 7, 2022

Hello. If you're on a hurry, you can have try to use this temporary branch, which resolves the very issue you've pinpointed.
That's a draft of version 1.0, which has breaking changes from the released 0.1.1

There is some extra work to do however regarding possible race conditions between threads where one thread would drop the UserTrace while another is still running a callback. I'll fix this in an upcoming PR as well.

@daladim
Copy link
Collaborator

daladim commented Jan 13, 2023

This has been fixed in ferrisetw 1.0

@daladim daladim closed this as completed Jan 13, 2023
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