-
Notifications
You must be signed in to change notification settings - Fork 57
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
Possibility for savestates without using /proc/self/pagemap? #223
Comments
/proc/self/pagemap is necessary for incremental savestates. Otherwise, it is only used to detect virtual pages that are not mapped to real pages, and could be work around (with increased savestate memory probably). So I guess you managed to run libTAS and a game in WSL? |
WSL1 is like a reverse-Wine, and it's doubtful it'll ever have perfect Linux compatibility. You might have better luck when WSL2 comes out, which literally runs a VM with a real Linux kernel and disk image to do its thing. |
Yeah got libTAS working in WSL mostly because for reasons I don't want to dual boot linux. So you think it should be possible if incremental savestates is not used? Since I don't need incremental savestates that would be great. Would you be able to point me to some material that I should read to figure out how to implement this? |
I mean more like how to avoid this line libTAS/src/library/checkpoint/Checkpoint.cpp Line 1064 in 77ee47b
|
Yes, there are minor modifications to the code to work around reading /proc/self/pagemap, I will take care of that. |
Fixed in d7b7512. You still need to disable "Incremental savestates". |
Thanks for doing this! savestates_in_ram must also be disabled because of microsoft/WSL#3542 After that the savestate appears to work ! But after the savestate completes control doesn't seem to return to the program. A log is at https://pastebin.com/e1xyuY0r if that helps. |
With gdb attached it says Thread 19 "GAME_LOADER" received signal SIGSEGV, Segmentation fault. |
If memfd_create is not available, then you should disable "Prevent writing to disk", but I don't think it will solve this problem. The log is not very helpful, there seems to be a crash in fmodstudio code, but I don't know how it is related to savestating. |
Can confirm Prevent writing to disk is disabled, Recycle threads is disabled, and Mute is checked. I've been trying to find fmod libraries built with -g but doesn't seem like those exist. Getting a friend with an actual linux installation to check if the exact same settings works for them. |
Verified the problem has to do with the thread suspend/resume rather than the actual checkpointing (same problem with the raise(SIGUSR2) commented) |
Could you check "Runtime > Debug > Print categories > Checkpoint" and "Runtime > Debug > Log to file", then perform a checkpoint (keep raise(SIGUSR2) commented if it's irrelevant to the issue) and copy the obtained log here? The log file is created in the same directory as the executable. |
For other reasons I'm probably just going to have to dualboot linux anyways, so this issue doesn't matter to me anymore. Thanks a lot for the help. |
It seems that my system (windows subsystem for linux) does not have /proc/self/pagemap (it has /proc/self/maps though). I don't really understand how these low level stuff works so this might be a stupid question but is it possible to implement savestates without accessing /proc/self/pagemap?
The text was updated successfully, but these errors were encountered: