-
Notifications
You must be signed in to change notification settings - Fork 7
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
The result of the failed optimization is either Input bitseq incorrect or RECHECK #59
Comments
I'm only using the Vsyncer default configuration during the optimization process,and optimize with
depending on the configuration, the Dat3M backend will also check the case where pthread_create fails. But Vsyncer's default model checker is GenMC, I don’t know whether this configuration is used by VSyncer. Does Dat3M also check during optimization? |
This looks weird. I ran this command locally just to try to reproduce your issue, but it seems ok. Here is the output:
Since your bitseq is shorter than mine, it seems that you have changed I find however quite weird that you only have such short bitseq. This can be caused by having multiple lock implementations in the same .c file. I would strongly suggest you to split your code in multiple .h or .c files. In your test case you include the .c or .h file that you want to test. Two things to note:
|
Another thing: we never really ran genmc on RISC-V. You don't need to run vsyncer inside your target machine. You can run that on a normal Intel CPU if you prefer. The model checking happens at the builtin atomic level, which is mapped by the compiler to the target architecture when the real program is compiled. |
Yes, I modified the lock for examples, but I also had no problem running examples/ttasklock.c locally. In screenshot one, my bitseq is shorter than yours because I ran lock() and unlock() in it multiple times. If you run lock() and unlock() only once, you can get optimization results. Screenshot 2 may be due to the fact that multiple locks are implemented in the same .c file. When I run it in Ubuntu22, I still get the above error. |
The code is placed in a compressed package for reference. |
When I want to explore whether the optimization suggestions given by vsyncer are based on the implementation of the synchronization primitive, or whether the optimization suggestions of the primitive are based on the call in the invocation scenario, I try to define multiple locks such as lock1 and lock2, and pass the locks as variables to the lock() and unlock() functions, and call the run() function, but the result is stuck in 'RECHECK'.
![RECHECK](https://private-user-images.githubusercontent.com/72495223/385222575-6b2baefb-41c2-42c4-ad75-4ed88f64fb9a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODI1MDAsIm5iZiI6MTczOTE4MjIwMCwicGF0aCI6Ii83MjQ5NTIyMy8zODUyMjI1NzUtNmIyYmFlZmItNDFjMi00MmM0LWFkNzUtNGVkODhmNjRmYjlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEwMTAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVkODhkNjMyMWFiYTBjYjA4MGJlNDNhZmExZWI5YTE1NTMxMGMzNmU1MmUzNjcyMzU0MTlkMjRmNDBkZjAzNmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.r-Dhkya9UxiS_5YqX51ntMHRj9nJKIzJ1LdJww3XH3I)
![Input bitseq incorrect](https://private-user-images.githubusercontent.com/72495223/385225293-07640a48-f9fa-4f0f-bf77-77e007732258.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODI1MDAsIm5iZiI6MTczOTE4MjIwMCwicGF0aCI6Ii83MjQ5NTIyMy8zODUyMjUyOTMtMDc2NDBhNDgtZjlmYS00ZjBmLWJmNzctNzdlMDA3NzMyMjU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEwMTAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxZTJmZGI1YTAxMDgwMWQ2NTEyZjFiNTExYTcxYmVjYWMyMTRlMWU2ZTZjZDlhYTllZmM3MGVkNzBhNDUwOWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.a9f8AxDhnT_TFydcDUvrKu6-YagdkhaqFpXYntvYoBE)
In addition, when I implement multiple types of locks in client code and call their respective lock() and unlock() in run(), the result is Input bitseq incorrect.
The code is placed in a compressed package for reference.
vsyncer_problem.zip
The text was updated successfully, but these errors were encountered: