-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
SIGSEGV on launched application when running with RenderDocCmd on arm64 build #1480
Comments
I'm unclear, is this an android device you're using or is it linux? The log seems to indicate that it's linux but you're running on an ARM CPU and specifying You'd need to give me more information about what exactly is crashing. Knowing that the application hits a SIGSEGV is not useful in itself because it doesn't tell us anything about what is going wrong. If I can't reproduce the problem myself I'd need to know at least the callstack where it fails so I can make educated guesses. If this is android then this should be available in the adb logcat as the system dumps out the crash information - if everything is working correctly RenderDoc should pull the logcat into its own log which you can view in Help -> View Diagnostic Log. |
So this is just Linux I'm running on the board with a proprietary distribution (release name can be seen above). I have builded RenderDoc almost all the time with Below there is a valgrind log for command
I also tried to run renderdoccmd with other sorts of commands such as |
If this is linux then you shouldn't be touching The valgrind log provides a partial picture of what's wrong. It says directly in what you pasted that there's a stack overflow in This suggests that something went wrong when processing the GLX hooks. Normally the onward function pointer is fetched via calling The possibilities I can see are either that renderdoc's code is getting its own function pointer instead of the real function pointer, which seems unlikely but is still possible. Or that somehow Unfortunately I do not support ARM linux builds so unless you can repro this on a supported platform I can't help fix this. If you have questions you can ask them here or email me and I can explain what should be happening to help you debug it yourself, but I can't help with bugs on unsupported platforms and I definitely can't help with bugs that only appear on a proprietary linux distribution and hardware. |
Just to clarify some things: glmark2-es2-wayland is a GLES application and it should not register glX hooks in the first place (I suppose), but as you can see below in the following log:
This app registers not only EGL (as it should), but also GLX and Vulkan. Do you have any idea why is this happening? And also, can you provide me some information about the hook selection process in the code? (Like where does renderdoc decide to register EGL hooks for a GLES app) |
You have a mistaken assumption about what the log messages mean. It is impossible to know in advance what API or APIs an application will use, so RenderDoc registers hooks for all supported APIs at startup. This only means that APIs which are registered can be hooked, it doesn't mean that there's an expectation that an application will use all of them. Similarly having them registered doesn't preclude the selection of API by the application. |
OK, I understand what you mean. Now correct me if I'm wrong: a GLES only app should not go through code from |
Generally speaking I wouldn't particularly expect it, but there's nothing to stop an application from doing so. There's no rule that the application can't call both EGL and GLX entry points as long as they are valid respectively. E.g. on GL function loaders are common so the application may be populating function pointers via This is about your application not RenderDoc, you should check your source code to see which functions you're calling. |
I kind of fixed this bug by disabling the GL support which at run time will try to register GLX hooks, although later I found out that if our EGL driver will try to call on something like GetProcAddress when creating EGLContext for the GLES app, it will actually "ask" renderdoc's wrapper on dlopen (created to register hooks), instead of the system's version for the function addresses which will be invalid. At this point I'm trying to patch the driver regarding this problem.
While browsing through some other issues I found this comment from you. Does this affirmation still remain valid at this moment? |
Yes due to the LD_PRELOAD hooking on linux if your driver calls back out to a public interface that will cause an infinite loop. Please see #853 . I'm looking at adding wayland support since others had indicated that it's shipping already on some distros like Fedora. With that said it still seems to be in a really poor/unstable state as I've had a lot of trouble even getting a system working with it, so I may defer the work until wayland is more ready. |
I'm already building this version as we speak, trying my luck here 😄 |
You do have in fact an experimental support on Wayland (capture only) on the release version, which made my GLES apps finally launch. But now the problem is that the capture menu doesn't show up. I also tried to remote capture using Qrenderdoc from my local machine, and the behavior is pretty much the same: the application launches, but no capture option is available. Do you have any suggestions for this? If you need any more details, fill me in. |
The wayland support is as you say experimental, not supported, and was only just added recently with barely any testing since I could hardly get wayland to work. I don't know what you mean by a capture menu, that's not a term I can mentally map to anything within RenderDoc, and I'm unclear what 'no capture option is available' means either. This issue was closed quite a while ago because your platform is not supported and I can't help with problems on unsupported platforms, nor even with supported platforms unless I have that platform to reproduce on. I said that I would answer specific questions about how the code is intended to behave on supported platforms in case you wanted to implement and/or contribute support for your platform, but what you are asking for is essentially support for your unsupported platform so I'm going to lock this issue. If you have specific questions about how the code works that I can answer within the context of supported platforms, please feel free to contact me via email or open an issue if you wish. Or if you can reproduce a problem on a supported platform such as 64-bit x86 linux then open an issue with a repro case and I will investigate. But I can't keep answering support questions and helping you debug problems that appear on a specific unsupported platform. |
Description
Hi! I'm trying to integrate renderdoccmd into a Linux image necessary for an i.MX NXP board.
My main objective on this is to capture frames on Vulkan applications, but at this point I only trying to do this only on GLES samples, for validation puposes.
The renderdoccmd build is sourced on a custom aarch64 SDK and has the following params:
At this point, everytime I run renderdocmd with to capture option on a GLES sample, the console tells that the application has lauched, but in fact, it was terminated with SIGSEGV, as I have seen this from dmesg, and even modified the code a bit here to see what signal did terminate the graphical application launched by RenderDoc (here is some example with dmesg):
[19407.131965] audit: type=1701 audit(1564581738.063:108): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=9837 comm="glmark2-es2-way" exe="/usr/bin/glmark2-es2-wayland" sig=11 res=1
I have also printed the environment from the code, before this execve() call to see if anything is out of place:
But it doesn't seem like the new process is launched incorrectly.
Here is the output of the log file:
Another idea that came in my mine was the fact that actual problem could be related with the display protocol used, since the OS uses Wayland with xwayland support, instead of Xorg. So I have read some issues and found this disscusion. From what I can understand, the Wayland support has not been yet implemented. I have tried to run the contributor's branch with preliminary commits on this matter, but the result was the same. I cannot assert yet the fact that this may cause the problem since my experience on this subject is very limited, so maybe I can get some help from here.
If there is any other kind of additional information, let me know.
Looking forward for any reply, thank you in advance!
Repro steps
Run this script:
Assuming the fact that you have the YoctoSDK (At this point this can be only tested by me, I'm only providing as much additional info as possible).
Upload the resulted build directory to the board.
On the board from the build/bin/ directory, run
./renderdoccmd capture <path_to_opengles_sample_exec>
. Th consule outputs that renderdoc has launched the application (example):Environment
The text was updated successfully, but these errors were encountered: