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

LLVM assertion failed when loading from LLVM cache #3745

Closed
valpackett opened this issue Nov 16, 2017 · 5 comments
Closed

LLVM assertion failed when loading from LLVM cache #3745

valpackett opened this issue Nov 16, 2017 · 5 comments

Comments

@valpackett
Copy link
Contributor

RPCS3 v0.0.4-14-gc435b328, FreeBSD 12-CURRENT, LLVM 4.0.1 (OS packaged LLVM, which is built with assertions enabled).

When a game does not have previously cached PPU code (right after compilation), it launches successfully.

When a game does have cached code, RPCS3 crashes on game launch:

Assertion failed: (ObjectBufferMap.find(Key) == ObjectBufferMap.end() && "Second attempt to perform debug registration."), function NotifyObjectEmitted, file /wrkdirs/usr/ports/devel/llvm40/work/llvm-4.0.1.src/lib/ExecutionEngine/GDBRegistrationListener.cpp, line 167.

Other projects have hit this assertion: https://sft.its.cern.ch/jira/browse/ROOT-7741

GDBRegistrationListener is used by MCJIT by default, looks like there's no way to unregister it (created in the constructor without saving a reference anywhere, and the vector of listeners is private).

@Nekotekina
Copy link
Member

Did you try to build LLVM from the submodule?

@valpackett
Copy link
Contributor Author

Yeah, just tested, the failure does not happen with LLVM from the submodule. It's not built with assertions.

@jbeich
Copy link
Contributor

jbeich commented Nov 21, 2017

Bundled LLVM (e.g., after #4504) doesn't help. On FreeBSD 12.0-CURRENT small (e.g., Scogger HD, Bomberman Ultra) and medium-sized (e.g., Aquapazza) games don't crash on first launch but big ones (e.g., Persona 5) still do frequently. On older FreeBSD releases any game always crashes when using LLVM cache.

$ pkg install rpcs3 mesa-dri xkeyboard-config
$ service dbus onestart
$ rpcs3
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-foo'
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Assertion failed: (ObjectBufferMap.find(Key) == ObjectBufferMap.end() && "Second attempt to perform debug registration."), function NotifyObjectEmitted, file /wrkdirs/usr/ports/emulators/rpcs3/work/rpcs3-0.0.5-259-g76a1d0d8f/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp, line 167.
Abort trap

@scribam
Copy link
Contributor

scribam commented May 10, 2018

With the master branch (737db90), LLVM is now built exclusively from submodule and doesn't use OS packaged LLVM anymore.
I think this issue can be closed, what do you think about it @myfreeweb?

@jbeich
Copy link
Contributor

jbeich commented May 11, 2018

OS packaged LLVM, which is built with assertions enabled

devel/llvm* packages on FreeBSD are built without LLVM_ENABLE_ASSERTIONS but downstream overrides CMAKE_*_FLAGS_RELEASE, losing default -DNDEBUG.
https://github.com/freebsd/freebsd-ports/blob/68f424f62259/Mk/Uses/cmake.mk#L84
https://github.com/Kitware/CMake/blob/v3.11.1/Modules/Compiler/GNU.cmake#L43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants