-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Debian Packages Strip Symbols from Shared Object Files #2624
Comments
This is not directly related to the symbol packaging work I'm doing. @dagood has more experience with the symbol stripping stuff. |
As written, this has more to do with how |
I am from Fedora land, where a similar problem would happen, I suppose. From what I understand, the packaging tool, during the package build process, goes over all binaries and strips them. The stripped binaries are put into a separate package ( See AutomaticDebugPackages for how debian packages get stripped during build. The debian announcement lists a few options to disable the stripping during package build. |
My understanding matches that of @omajid. Likely we just need to disable the stripping when producing packages. |
A tangential question: is there some way to automatically verify that symbols needed for performance testing are available? |
Yes, you could do something like nm libcoreclr.so and make sure that the result is not "no symbols". |
Or, you could also take the output of nm before and after the production of the package and diff them. |
Thanks, those are good suggestions. That said, is there some way to verify the functionality itself? What I mean is that the format for debugging symbols seems to be evolving. I know that (some versions of) lldb have trouble reading debugging symbols processed by some versions of |
I think it would be perfectly fine to provide a separate debuginfo package and put full symbols in it. This makes installation faster and smaller, and most users and production deployments won't need the debuginfo anyway. I realize it might complicate things on your end a bit, but that's what most packages use. Even fundamentals like libc would usually have minimal symbols embedded and then a debuginfo package with full symbols. @omajid Performance tracing actually works just fine without symbols. You simply don't have symbols on your call stacks for libcoreclr.so and other native modules. It is not critical for performance tracing user code, although is of course very nice to have. There is an even bigger problem around tracing crossgen'd symbols, which I brought up with Brian on a DL. |
This is what we are doing in Fedora [1]. There's a .NET Core package ( |
Assigning to @rakeshsinghranchi per @gkhanna79 |
@chcosta - is this the same thing you are working on? Same as https://github.com/dotnet/core-setup/issues/186? I'll assign to you. |
@brianrob , can you help me understand this change? I actually think this is the opposite of the thing I recently worked on. #2450 was a change to ensure we stripped symbols from our nupkgs and produced separate symbols packages. It sounds like you're asking for the opposite behavior for deb packages. @rakeshsinghranchi , is this something you're aware of / familiar with? |
Moving to 2.1.0 per response from @brianrob . His suggestion is to get the fix in 2.1.0 sooner. |
@dagood ,is dotnet/source-build#272 required to be ported for this issue ? |
No, porting that (removing That said, I don't know the proper fix for this issue. |
Just thinking out loud here. removing Maybe we can add an option to the build for this.
|
That's a good point, I don't see a reason stripping has to happen during the initial native build. The flag just runs commands on the outputs: ( |
@dagood , can you help with enabling --separate-symbols option , am not familiar with build process. Thanks. |
I can't right now (and my cmake knowledge is pretty rudimentary), but the overall idea, I think, is to copy |
I don't think it can be done for release 2.1.0 . Moving this to future. |
This came up recently in dotnet/symstore#126 due to the unexpected difference between the I don't think turning off symbol stripping and leaving it to We do have this issue tracking making proper debuginfo/dbgpkg packages now, though: dotnet/core-setup#8356. 🙂 |
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595810 has some hints on how to do that. I haven't tested/verified it. |
@brianrob is this still an issue for perf tracing or do you utilize a workaround? Is this needed for 5.0? |
@NikolaMilosavljevic I think its safe to close this now. We have a tool for downloading symbols now. Thanks. |
The process of producing the .deb package files strips symbols out of the .so files. However, we explicitly include function-level symbols in native binaries for use during performance tracing. tar.gz files are unaffected.
Steps to reproduce
Expected behavior
Function-level symbols are displayed.
Actual behavior
No symbols are displayed.
Environment data
The text was updated successfully, but these errors were encountered: