parca-agent icon indicating copy to clipboard operation
parca-agent copied to clipboard

unwinding/dwarf: Add `.debug_frame` based stack unwinding

Open kakkoyun opened this issue 3 years ago • 7 comments

related #293 also, see https://github.com/parca-dev/parca-agent/issues/782 (.zdebug_frame)

  • [ ] DWARF64 parsing support
  • [ ] Ability to specify additional debug information

kakkoyun avatar Jul 25 '22 11:07 kakkoyun

This has some good information on the differences: https://docs.rs/gimli/0.16.0/gimli/struct.DebugFrame.html#differences-between-debug_frame-and-eh_frame

v-thakkar avatar Sep 18 '22 13:09 v-thakkar

Parca Agent amd64 and arm64 of v0.9.1 have .eh_frame sections: https://gist.github.com/brancz/b163d154e9f8179051ef457f0f4a9983

brancz avatar Sep 21 '22 17:09 brancz

The x86_64 ABI require .eh_frame (it's a loadable section), but not .debug_frame. So far we've been able to profile all the native processes we tried with the DWARF CFI info in the former section.

Are there any users/customers that need .debug_frame support?

javierhonduco avatar Apr 24 '23 15:04 javierhonduco

The x86_64 ABI require .eh_frame (it's a loadable section), but not .debug_frame. So far we've been able to profile all the native processes we tried with the DWARF CFI info in the former section.

Are there any users/customers that need .debug_frame support?

Maybe another question, is there a case where we don't have .eh_frame but .debug_frame?

I'm happy to close it until we have an actual request or real-life case.

kakkoyun avatar Apr 24 '23 17:04 kakkoyun

Maybe another question, is there a case where we don't have .eh_frame but .debug_frame?

Not that I know of, but my knowledge here might not be complete

javierhonduco avatar Apr 25 '23 08:04 javierhonduco

The x86_64 ABI require .eh_frame (it's a loadable section), but not .debug_frame. So far we've been able to profile all the native processes we tried with the DWARF CFI info in the former section. Are there any users/customers that need .debug_frame support?

Maybe another question, is there a case where we don't have .eh_frame but .debug_frame?

Wasn't that the case with CGO applications :thinking: But I don't remember exactly what was the conclusion of the research when we looked for it last time.

I agree though. We should probably wait for working on this until we come across the real use case.

v-thakkar avatar Apr 25 '23 08:04 v-thakkar

I've been put in contact with the engineers working on debuginfo on the GraalVM and it turns out that it only populates .debug_frame, and any entries in .eh_frame only happen to be there because of GCC. (RE: #1915)

brancz avatar Aug 09 '23 14:08 brancz