-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Unable to bundle sources to be send from a Linux Environment #2186
Comments
@jopheno I am not really sure where this error is coming from. Could you perhaps try uploading your debug files using this command, instead: sentry-cli debug-files upload --include-sources /path/to/files When using the Please let me know whether this suggestion fixes your problem. |
@szokeasaurusrex That I had already tried before, it works, and uploads just fine, but no sources are included... The main issue is that the sources are not being sent so when looking for the backtraces on sentry dashboard, it just doesn't work... On windows it works out of the box once it uploads the .pdb file, but on Linux, it doesn't work from the ELF as, I guess, it was supposed to... Idk where the other message went, but I also received on my email the following so I tried it out:
I compiled from sources and ran using the cargo run pointing the path where the application executable is (which is compiled with symbols) the source code is also beneath this path inside folders; gdb can track the source files just fine on my executable so I don't think it is neither permissions or cuz the executable source path is wrong; Using the command you passed earlier it didn't send any new information, on the sentry dashboard it still only sends symtab and unwind, but not sources; It also sends the binary as shown above, again, no sources included... Also by following some tutorial I also created a ELF file with only debug information to try it out: That file was done using the following command: Finally I also did: I tried on the project main folder and inside the build folder, using tree I extracted the folder structure:
First I was using the sentry-cli from tools which is the already built for linux on 2.37.0, just made a symb link; Then I compiled that version, and now I compiled the most recent version 2.38.0 as requested, still, not uploading sources... I also added this on CMake to auto upload:
|
Hi @jopheno, I had deleted that comment because I realized shortly after posting it that our release builds don't include debug symbols, rendering the backtrace useless. But, since you compiled the binary manually, you got the backtrace after all. From the backtrace, I can see that the error is originating from this line: Line 220 in 6d0729d
Digging deeper into the Since Sentry CLI tries to traverse the directory in order to find sources and debug files, is it perhaps possible that your directory contains (or links to) an external device which is not mounted or might be experiencing some other hardware issue? |
I tried reading all the files, and I saw no further issues on it, I don't think I am having any hardware issues and the only symbolic link I have is the one on sentry executable that can be seen on the tools folder on the structure I presented above... What else would you recommend me to test? I am running out of options on testing here... I even updated my Linux distribution to be the most up-to-date LTS version, nothing changed... There there is any further change you guys would like me to try, please let me know. |
@jopheno have you tried removing the symbolic link? |
Yes, even without the symbolic link; or inside the build folder;
|
@jopheno very strange. Do you get this same error running the command from any directory? Perhaps you could try making a new empty directory, and running the command there |
I am most certain I already answered this, but I opened it again today and my answer is not here... Who knows... Anyway, basically I can't really see anymore but it was a standard Ubuntu Minimal Server installation, so pretty sure it was ext4; I can't really see anymore since I repurposed the server I was using to test it out... And yes, maybe the thing is that I shouldn't pass a directory anyway, I found the documentation very confusing and I am still trying to bundle the sources so they appear on the sentry platform, but I just can't; It never grabs the data to be sent, I am running out of options; |
@jopheno I believe @Dav1dde's comment is correct. Maybe the confusion is that you are passing a path to one of your source files or to the executable? |
I faced with the same issue.
|
@UrbanNuke the |
Yes, the command only accepts an executable file, I understood it the hard way cuz the command doesn't provide any useful error message... The main issue I first opened this issue for is that, I cannot extract the source code from the executable... So, even tho I pass in the executable file it is not being able to extract the source code info and there is no way to debug this as far as I know... So basically our sentry solution is only worthy on development environment, on production that we use a Linux server, I just can't have the source code entangled with the solution to aid on evaluating the crashes; I can't consider this issue closed until I can get source code to be entangled with the web solution on Linux environment which does not have a .pdb file. What I would suggest is to improve this command to allow, first of all, to say that you must pass in a file and not a directory, but also to say something that could help us understand why it is not being able to extract the source code... Invalid file? Symbols not present? Arm incompatibility? GDB is being able to show the source code correctly on it, lines etc... So I would guess that there is nothing wrong with my executable, but idk, this just doesn't work for us on Sentry. |
@jopheno Are you still experiencing the |
Yes I do, when I pass in a directory; It should show an error instead saying to pass an executable file. The main issue which solution I am pursuing here is that I am not being able to send source code data to the sentry application on Linux environment... I tried using this command because the "automagically" didn't work, and I was trying to fetch some more information on why it wasn't doing the source bundle... But as it turns out, this command didn't help at all and I still cannot get this working on Linux... I showed the file structure, how the files are being sent to the web app, etc... I've ran out of ideas, the command doesn't provide any relevant information, even when being misused; If you guys have any other ways that I can use to diagnose the issue, or maybe what I am pursuing is currently unsupported and there is no place showing that... Who knows... |
Okay @jopheno, so to confirm, if you pass in a single file instead of a directory, are you still getting the
Also, what is the "automagically" you are referring to? I need you to describe your problem specifically so that I can help effectively here. |
CLI Version
sentry-cli 2.37.0
Operating System and Architecture
Operating System Version
Ubuntu 22.04.3 LTS
Link to reproduction repository
No response
CLI Command
sentry-cli --log-level=debug debug-files bundle-sources .
Exact Reproduction Steps
Using a native C++ application (I used GDB to check if symbols were missing or if the source path was somehow wrong, but gdb was able to see all the sources just fine...)
Expected Results
It should correctly generate the source bundle debug files that would be uploaded to the sentry backend, but it didn't work;
Actual Results
I am unsure if I am using it wrongly, but I have no idea what
No such device
means, if I indeed add a path that doesn't exists, it does sayNo such file or directory
, but passing the executable, or the path where the executable is, or any path at all grants me withNo such device (os error 19)
Even tried adding a symbolic link so that I could execute using sentry-cli directly instead of having to pass the whole repository; Got no results;
Logs
The text was updated successfully, but these errors were encountered: