-
Notifications
You must be signed in to change notification settings - Fork 8
gdb can't catch any trace from sharun AppImages #24
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
Comments
Is it possible this is related to the appimage still having an |
@Samueru-sama Unfortunately, no |
Every binary you packaged with lib4bin was run through strip ( Also note the executables in And the files |
Testing without that option, the traces are still empty. I don't have a link for the appimage yet but will post it soon.
I don't know how to proceed with libexec/gimp-debug-tool* because GIMP doesn't search for it on PATH but lib4bin insists on putting every executable on PATH (usr/shared/bin<>usr/bin). Just to note, gimp-debug-tool isn't needed to catch the traces, only to display a gui with them.
They already are. |
Only
so I had an older build. |
What I mean with "path" is that if I put that binary (it does the same with the plug-ins) on lib4bin call it will wrongly put it on ${SHARUN_DIR}/bin (which is on PATH).
There is the latest build: https://gitlab.gnome.org/GNOME/gimp/-/jobs/4946237/artifacts/browse/build/linux/appimage/_Output/ It only runs calling AppRun after appimage--extract but it helps for triaging the stacktrace bug |
You can move them manually and create symlinks as I described above. |
I don't think it will be possible to debug with GDB applications wrapped with sharun, because sharun uses a hack to run applications with userland-execve by mapping the interpreter (such as ld-linux-x86-64.so.2) into memory, creating a stack for it (containing the auxiliary vector, arguments, and environment variables), and then jumping to the entry point with the new stack and passing as arguments the necessary executable file to this interpreter and paths with libraries. If you compare the debug of an application not wrapped in sharun and the same application run through sharun, you will see that GDB simply cannot load the symbol table even if the application has not been stripped. Because GDB sees only the executable file of sharun itself. But I'm not a hardcore GDB user. |
Also, it seems a bit odd to me to supply debug symbols and thereby inflate the size of an application that should be portable and take up as little space as possible. It seems better to leave/debug with GDB for system (or debug) versions of the application. |
This is not related to debug symbols. GIMP, babl and GEGL binaries have debug symbols and the traces are empty. The others are avaiable by installing |
check out the screenshots above |
What the screenshots are saying is that gdb don't know the original binary that have the debug symbols so yeah this is related to debug symbols but they are there |
|
I want to add that the original idea of having the symlink and I was under the wrong assuption that when sharun was hardlinked as the However I also discovered that you have symlinks in |
@VHSgunzo Thanks, done it.
@Samueru-sama Even this not helping with ARGV0 your idea is very interesting. Runnung a binary sems to be less prone to error and faster than calling host sh 😁 |
I have done that with:
But I get the following error: There is the appimage: https://gitlab.gnome.org/GNOME/gimp/-/jobs/4946575/artifacts/browse/build/linux/appimage/_Output/ |
create relative symlinks |
This is because when hardlinks are used, sharun uses You have to run it like this Or symlink to sharun instead of hardlink. However note that every respective symlink/file has to have its equivalent in |
I think I'll fix it in the next release though. |
Another thing that I noticed is that debuginfod can't download .debug symbols from sharun appimage but it can with the go-appimage one. |
@Samueru-sama @brunvonlope |
The reason is the same, GDB/debuginfod doesn't understand how sharun runs dynamically linked binaries |
Description
Not sure if this is a sharun bug or something related to the overall AppImage design, but it's not possible to get a trace using gdb from host.
Reproduction
Let's prepare the environment:
To reproduce the bug:
$HOME/.config/GIMP/3.0/CrashLog/*.txt
for the stacktrace with the timestamp of the time GIMP crashedExpected behavior: GIMP crashes can be caught by GDB since sharun appimages don't suffer from build-id mismatch of other appimages (https://gitlab.gnome.org/GNOME/gimp/-/issues/12929#note_2350842)
Actual behavior: none of the threads have minimally meaningful frames
The text was updated successfully, but these errors were encountered: