mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[GH-ISSUE #590] P5D enters weird softlock state while exploring menus due to thread management(?) #136
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Da-nu on GitHub (Aug 26, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/590
heres what I found notable in the logs
[Kernel.Pthread] <Info> thread_management.cpp:scePthreadAttrSetaffinity:295: called[Kernel.Pthread] <Info> thread_management.cpp:scePthreadCreate:1040: thread create name = UNLOCK Thread[Core.Linker] <Error> linker.cpp:InitTlsForThread:346: TLS user malloc called, using std::malloc[Core] <Error> stubs.cpp:CommonStub:42: Stub: sceRazorCpuFiberSwitch (nid: PAytDtFGpqY) called, returning zero to 0x91fffd896[Lib.UserService] <Info> userservice.cpp:sceUserServiceGetInitialUser:492: called[Core] <Error> stubs.cpp:CommonStub:42: Stub: sceRazorCpuFiberSwitch (nid: PAytDtFGpqY) called, returning zero to 0x91fffd896[Kernel.Pthread] <Info> thread_management.cpp:scePthreadJoin:1113: scePthreadJoin result = 0here is my latest shad_log.txt
shad_log.txt
UPDATE: issue is probably due to thread management and not TLS. I am already aware someone is working on a rewrite for thread management and will wait for that to release.
@Hermiten commented on GitHub (Sep 4, 2024):
So nice, everything on the same line !
Can be close ? This is not really usefull and I think no developer pays attention to this kind of issue
@Da-nu commented on GitHub (Sep 4, 2024):
I tried to put it in new lines but github refused to let me do so
@polybiusproxy commented on GitHub (Sep 4, 2024):
@Da-nu Do you have these
sceRazorCpuFiberSwitchstubs on every frame?Try adding
libSceRazorCputo the sys_modules too.@Da-nu commented on GitHub (Sep 4, 2024):
Yes it is every frame, adding libSceRazorCpu did nothing
@polybiusproxy commented on GitHub (Sep 4, 2024):
I forgot to mention that you have to modify the source of the emulator to make it load the LLE module: https://github.com/shadps4-emu/shadPS4/blob/main/src/emulator.cpp#L198-L208
@Da-nu commented on GitHub (Sep 4, 2024):
haven't tried compiling it before, will see if i can figure it out when I get home
@StevenMiller123 commented on GitHub (Sep 4, 2024):
@Da-nu You can avoid that by adding the module to the game's sys_modules folder instead. Just remember to remove it when you're done testing.
@StevenMiller123 commented on GitHub (Sep 4, 2024):
As a side note, I've seen soft lock issues in other games using libSceFiber as well (mainly the Kingdom Hearts series). Could there be issues related to using LLE Fiber?
@Da-nu commented on GitHub (Sep 4, 2024):
Do the KH games also enter a state where it just stops loading new things alongside it? with P5D whatever part of the menu im in still functions, but when it tries to transition to a new part of the menu it just softlocks. It also stops loading any new assets or models that the current menu calls for when it happens.
@StevenMiller123 commented on GitHub (Sep 4, 2024):
Talking to NPCs occasionally caused softlocks like that, where everything still rendered normally, but the game itself was not responding to any controls and the NPC's dialog never showed. Most of the softlocks occurred when changing areas or loading cutscenes though.
@Da-nu commented on GitHub (Sep 4, 2024):
Huh, so it does sort of act like how P5D does. The different parts of the menu are essentially different areas in P5D.
@Da-nu commented on GitHub (Sep 4, 2024):
I originally said it was "due to TLS user malloc" because thats what I see show up in the logs each time this softlock state occurs
@StevenMiller123 commented on GitHub (Sep 4, 2024):
I don't think the TLS user malloc is related, but I know the Dragon Ball Xenoverse games started deadlocking on sceAudioOutOpen when the TLS user malloc thing was implemented, just waiting a minute or so resolves that issue though. My point is, I'd expect it to be completely unresponsive if it were the TLS user malloc.
@StevenMiller123 commented on GitHub (Sep 4, 2024):
@polybiusproxy As a heads up, the RazorCpu spam occurs in all games using libSceFiber. It usually doesn't seem to cause issues, and the issues I've seen in games aren't resolved by adding libSceRazorCpu LLE.
@polybiusproxy commented on GitHub (Sep 4, 2024):
Ah, that makes more sense.
@Da-nu commented on GitHub (Sep 27, 2024):
sorry if im necrobumping, but what if its related to thread management itself?
[Kernel.Pthread] <Info> thread_management.cpp:scePthreadJoin:1111: scePthreadJoin result = 0@StevenMiller123 commented on GitHub (Sep 27, 2024):
I mean, most issues at this point are related to thread management. The thread management code is rather messy, to the point where one of the devs is working on a complete rewrite of that stuff.
@Da-nu commented on GitHub (Sep 27, 2024):
at this point its the only explanation to the game's weird softlock behavior.
All we can do now is wait.
@Da-nu commented on GitHub (Oct 14, 2024):
Completed? As far as I am aware the game still softlocks?
@Hermiten commented on GitHub (Oct 14, 2024):
We will follow on your new issue. Thanks you