actions / runner-images

GitHub Actions runner images
MIT License
10.13k stars 3.05k forks source link

Add systemd-coredump #10480

Open grahamc opened 2 months ago

grahamc commented 2 months ago

Tool name

systemd-coredump

Tool license

GPL 2.0

Add or 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:

  systemd-coredump@.service 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

Runner images where you need the tool

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
vidyasagarnimmagaddi commented 2 months ago

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.

grahamc commented 2 months ago

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

jnsgruk commented 2 months ago

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!

grahamc commented 2 months ago

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 commented 1 month ago

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

Prabhatkumar59 commented 1 month ago

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

grahamc commented 2 weeks ago

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?

Prabhatkumar59 commented 2 weeks ago

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 shortly on creating a PR. Thanks!