runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

Add systemd-coredump

Open grahamc opened this issue 1 year ago • 8 comments

Tool name

systemd-coredump

Tool license

GPL 2.0

Add or update?

  • [X] Add
  • [ ] Update

Desired version

whatever is available in the package repository

Approximate size

60 kB

Brief description of tool

Ubuntu ships with apport, which is primarily for reporting bugs in Ubuntu's packaging back to Ubuntu. Configuring it in a way to get core dumps and back traces is non-trivial, and involves installing gdb, and writing some pretty nasty scripts.

This is not necessary, however, with systemd-coredump and coredumpctl. Simply running coredumpctl info will show backtraces of all the recent core dumps and crashes automatically.

This simplified and more developer-centric tool means much less futzing around as a user of GitHub Actions to get back traces of in-CI crashes.

I think that justification is really what is wanted here, but just in case -- here is a description of the package as requested:

  [email protected] is a system service to process core dumps. It
  will log a summary of the event to systemd-journald.service(8),
  including information about the process identifier, owner, the signal
  that killed the process, and the stack trace if possible. It may also
  save the core dump for later processing. See the "Information about the
  crashed process" section below.

URL for tool's homepage

https://www.freedesktop.org/software/systemd/man/latest/systemd-coredump.html

Provide a basic test case to validate the tool's functionality.

echo 'int main() { *(volatile int *)0 = 0; }' > test.c
gcc ./test.c
./a.out || true
if ! coredumpctl info --no-pager a.out; then
  echo "coredumpctl failed" >&2
  exit 1
fi

Platforms where you need the tool

  • [X] Azure DevOps
  • [X] GitHub Actions

Runner images where you need the tool

  • [X] Ubuntu 20.04
  • [X] Ubuntu 22.04
  • [X] Ubuntu 24.04
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [ ] macOS 14
  • [ ] macOS 14 Arm64
  • [ ] Windows Server 2019
  • [ ] Windows Server 2022

Can this tool be installed during the build?

Yes:


sudo apt install systemd-coredump


### Tool installation time in runtime

13 seconds

### Are you willing to submit a PR?

Yes

grahamc avatar Aug 24 '24 01:08 grahamc

Hi @grahamc , Thank you for bringing this issue to us. We are looking into this issue and will update you on this issue after investigating.

vidyasagarnimmagaddi avatar Aug 26 '24 06:08 vidyasagarnimmagaddi

Thanks @vidyasagarnimmagaddi! Let me know if I can be of help.

grahamc avatar Aug 26 '24 13:08 grahamc

Had a chat with some folks internally at Canonical - I don't think this is likely to cause any issue, and as far as I can tell the Github Runner images are not part of the catalog of images that we build, so I don't think we'd need any involvement.

That said, if I can help in anyway - feel free to reach out!

jnsgruk avatar Sep 02 '24 14:09 jnsgruk

Thank you, @jnsgruk! I'm glad to know it won't cause issues for Canonical. This'd make a big difference for developers on GHA! :)

grahamc avatar Sep 02 '24 15:09 grahamc

Hi @vidyasagarnimmagaddi / @Prabhatkumar59, just wondering if you've had a chance to investigate this change? Does @jnsgruk's +1 help?

grahamc avatar Sep 10 '24 14:09 grahamc

Hi @grahamc - Thanks for your reply, We are looking into this issue and will update you shortly.

Prabhatkumar59 avatar Sep 11 '24 11:09 Prabhatkumar59

Hi @Prabhatkumar59 I don't want to be a bother here. Can you share more about the status of this ticket, and what is next? Has the team decided against it? Could I send a PR implementing it?

grahamc avatar Oct 17 '24 14:10 grahamc

Hi @grahamc - Thank you for following up on this request. The team is currently reviewing the proposal to add systemd-coredump as a tool in the runtime environment for GitHub Actions on Ubuntu. We appreciate the justification you've provided, and it aligns well with improving the developer experience for handling crashes and core dumps.

However, We will update you on creating a PR. Thanks!

Prabhatkumar59 avatar Oct 18 '24 08:10 Prabhatkumar59

Hi @grahamc, the systemd-coredump was added to all ubuntu images.

Alexey-Ayupov avatar Dec 09 '24 18:12 Alexey-Ayupov

Woohoo! Thank you so much!!

grahamc avatar Feb 25 '25 19:02 grahamc