diff --git a/A5_coredump/Dockerfile.processor b/A5_coredump/Dockerfile.processor new file mode 100644 index 0000000..40dc509 --- /dev/null +++ b/A5_coredump/Dockerfile.processor @@ -0,0 +1,33 @@ +# syntax=docker/dockerfile:1.4 +FROM ubuntu:22.04 as BASE + +WORKDIR /scratch + +COPY --chmod=755 < /proc/sysrq-trigger + +kill -SIGKILL PID +pidof program_name +``` + +## Resources + +- NotMyFault v4.21 (windows only) [here](https://learn.microsoft.com/en-us/sysinternals/downloads/notmyfault) +- Cause a Linux Kernel Panic or a Windows BSOD [here](https://blog.technodrone.cloud/2012/03/cause-linux-kernel-panic-or-windows.html) +- Debug symbol packages [here](https://ubuntu.com/server/docs/debug-symbol-packages) +- About debuginfod [here](https://ubuntu.com/server/docs/about-debuginfod) +- ELFUTILS DEBUGINFOD [here](https://sourceware.org/elfutils/Debuginfod.html) +- Pleasant debugging with GDB and DDD [here](https://begriffs.com/posts/2022-07-17-debugging-gdb-ddd.html#gdb-front-ends) +- Configuring and Managing Core Dumps in Linux [here](https://www.baeldung.com/linux/managing-core-dumps) +- core - core dump file [here](https://man7.org/linux/man-pages/man5/core.5.html) +- Configuring core dumps in docker [here](https://ddanilov.me/how-to-configure-core-dump-in-docker-container) +- The Core Pattern (core_pattern), or how to specify filename and path for core dumps [here](https://sigquit.wordpress.com/2009/03/13/the-core-pattern/) + diff --git a/A5_coredump/justfile b/A5_coredump/justfile new file mode 100644 index 0000000..0a0b160 --- /dev/null +++ b/A5_coredump/justfile @@ -0,0 +1,40 @@ +set dotenv-load := true + +export IMAGE_NAME:='a5_core_dump' + +# default lists actions +default: + @just -f justfile --list + + +build distro="processor": + #!/usr/bin/env bash + docker buildx build --progress=plain --load -f "Dockerfile.{{ distro }}" -t "${IMAGE_NAME}_{{ distro }}:latest" . + +start distro="processor": (build distro) + #!/usr/bin/env bash + docker run -it --rm "${IMAGE_NAME}_{{ distro }}:latest" + +debug distro="processor": (build distro) + #!/usr/bin/env bash + docker run -it --rm --entrypoint /bin/bash "${IMAGE_NAME}_{{ distro }}:latest" + +dive distro="processor": (build distro) + #!/usr/bin/env bash + dive "${IMAGE_NAME}_{{ distro }}:latest" + +details distro="processor": (build distro) + #!/usr/bin/env bash + @echo "******************************" + @echo "** Labels" + @echo "******************************" + docker inspect -f '{{{{ .Config.Labels }}}}' "${IMAGE_NAME}_{{ distro }}:latest" + @echo "******************************" + @echo "** Dive CI" + @echo "******************************" + dive "${IMAGE_NAME}_{{ distro }}:latest" --ci || true + @echo "******************************" + @echo "** Size" + @echo "******************************" + container-diff analyze --json daemon://"${IMAGE_NAME}_{{ distro }}:latest" | jq . +