-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
[FileEmulationFramework Deadlock Discussion] #399
Comments
Try clearing your cache by deleting |
That didn't work, it gave me the same list of errors |
Can you hit Chances are it's a rare mod incompatibility resolveable by changing the enabled mods. The set would be useful in reproducing it however. |
Absolutely |
For reference I have tried running it in steam first, resetting my PC, readding P5R within Reloaded II, and closing and opening the game multiple times. |
I'll CC @LTSophia and @AnimatedSwine37 who worked on that part of PersonaEssentials in the meantime. If they can reproduce it, it'll hopefully be fixable. Till then, just disable all the mods and re-enable them one by one. You'll know when things break. |
Will do! I'll let you know if I get any more errors |
Okay it looks like it's the Gy Joker mod that is causing the issue! I can activate all of them besides that (and the Gy Joker cheat sheet patch) without any issue. Should I maybe attempt to uninstall and reinstall it? That is the main reason I began modding in the first place lol. Also I am censoring because I am new on GitHub and don't want to be flagged/banned |
oh the asterisks I was using as placeholders italicized the text, I should have seen that coming. |
There's no censorship on this site. |
Oh gotcha, good to know. Thanks for the timely help, I really really appreciate it! You seem like a very busy person, props to you. Should I message them as well to follow up? |
They'll see it eventually. I won't worry about it too much :p |
Alrighty! Thanks again man, take care! |
I checked and I was able to reproduce the error which is good, I'll try and find a fix later today. |
Alright, this is a weird edge case. The gay Joker mod uses pak emulator on The game should be case insensitive so I've just changed all routes to uppercase so this doesn't happen and everything seems fine so far. |
Actually, it isn't that simple, doing that causes some more edge cases where stuff won't work. Anyway, maybe it could be fixed with code but it'll probably be a lot of work to make sure the changes don't break more stuff. For now I think we just get Cornflakes to change the case of that file in Unhardcoded Romances and generally encourage people to stick to the case that the game's file uses in the hopes that this just doesn't happen again. |
Did my recent change trigger this? @AnimatedSwine37 The one where I reduced the locks and asked PM to test, because some guy was hitting a deadlock due to (presumably driver induced) parallel reads with dependency. Edit: I ask because it doesn't repro on my end. So I couldn't look into this myself before. |
Looks like it is, I just went back to 2.2.0 of File Emulation Framework Base Mod and it doesn't happen for me anymore. |
Does it repro if you move the lock up to the loop which tries to create the emulators here? That might be worth a try. |
Nope, it still happens |
I'm guessing the lock might need lifting all the way up to And if not that, well, diff time Sewer56/FileEmulationFramework@d9be97e |
Nope, still get the error. To be sure though, this is what I did lock (ThreadLock)
{
// Try Accept New File (virtual override)
if (PathToVirtualFileMap.TryGetValue(newFilePath, out var fileInfo))
{
// Reuse of emulated file (backed by stream) is safe because file access is single threaded.
HandleToInfoMap[hndl] = new(fileInfo.FilePath, 0, fileInfo.File);
PathToHandleMap[newFilePath] = hndl;
return ntStatus;
}
// Try accept new file (emulator)
for (var x = 0; x < Emulators.Count; x++)
{
var emulator = Emulators[x];
if (!emulator.TryCreateFile(hndl, newFilePath, currentRoute.FullPath, out var emulatedFile))
continue;
HandleToInfoMap[hndl] = new(newFilePath, 0, emulatedFile);
PathToHandleMap[newFilePath] = hndl;
return ntStatus;
}
} |
Ah, pain. I guess the only way around it is to diff then, see where the locks need moved to make this work. |
Adding the lock back around |
Is that in conjunction with further locking emulator creation? (the code snippet above) |
Nope, just adding back that one lock fixes it, I put back the |
That might work. Would need to check with the guy back at https://discord.com/channels/746211612981198989/1252770490469056572/1252871602824282196 , non-zero chance it'll bring back their deadlock. Also with moving the lock back up here. #399 (comment) |
On another note, it might be worth debugging what's really going on here a bit more. If you look at So if locking that fixes up the problem; it does slightly concern me; because, that might mean we're using one handle to read from multiple threads at the same time. I'd consider that invalid use of the Here's an idea, make a |
@AnimatedSwine37 Since I can't really reproduce this, would you be down for picking this up/investigating? Reaching out to the 1 person who had the deadlock originally, seeing if the compromise works, and also having a debug check to see if multiple threads are hitting. |
Did you install the Prerequisites?
Yes.
Describe the Issue
When attempting to launch P5R from Reloaded II, multiple error messages pop up despite having followed the directions on gamebanana to the letter.
Screenshots
Result: Error message, when closed P5R opens and runs but without any mods.
Intended: No error message, P5R with mods.
The text was updated successfully, but these errors were encountered: