-
-
Notifications
You must be signed in to change notification settings - Fork 222
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 |
Nope, same issue:
I even tried full path directory:
|
Okay. I am really unsure where this error could be coming from. We will try to add some better error handling in #2225 which will at least be able to tell us what file the error comes from, hopefully |
@jopheno can you try running the sentry-cli command with |
@jopheno, are you perhaps using SELinux or AppArmor? These access control policies can sometimes prevent programs like Sentry CLI from being able to do what they need to do without proper configuration. You could also check If that does not help, please proceed with @Dav1dde's suggestion. |
I thought it could have been some further issue on my machine, or even on virtualization layer, so since I recently acquired a new host I installed it Ubuntu 24.04 LTS version and installed it natively (not using any virtualization) and tried again, for my surprise, it happens the exact same error:
I downloaded the most up to date sentry-cli, and compiled the most up-to-date sentry-native, everything works like a charm on the sentry-native part, it let us know in case it crashes, etc... however I still can't get my sentry-cli which still shows up By installing a brand new OS which LTS version I thought this wouldn't happen anymore, but it seems it is still happening... As far as I can tell, AppArmor is included by default on Ubuntu Server Minimized 24.04 LTS, however I don't think it also uses SELinux... I did disable AppArmor for a test, but I still got the errors...
AppArmor Loaded, but not running (I stopped, disabled and rebooted):
Inside this build folder has the executable file of my application and all the compiled source code as well:
It was supposed to find the source code on the folder above "../src" which is where GDB finds normally since I compiled in debug mode;
Using
Even when I try passing the executable files directly so that it can extract the source code from it, then it says (no files found):
Idk what is going on, on Windows it works like a charm by reading the .pdb file, but on Linux it is being a nightmare to get the source code to show on the platform... On development we have people using Windows and it works just fine, but I can't make this work for a production environment on Linux, and it is such a great product, it is a shame I can't get this working; Please let me know if I can help with any further information; Downloaded the CLI through:
|
It seems like the culprit is this Checking the manpage:
The 2nd last argument of the Can you check what filesystem this path ( But I am also a bit confused that it tries to @szokeasaurusrex is |
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? |
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: