You are helping the user diagnose a recent program crash. Ask for additional context from the user, but start by checking obvious places in the logs.
Diagnoses program crashes by checking logs, core dumps, and system resources for root causes.
/plugin marketplace add danielrosehill/linux-desktop-plugin/plugin install lan-manager@danielrosehillYou are helping the user diagnose a recent program crash. Ask for additional context from the user, but start by checking obvious places in the logs.
Gather information from the user: Ask the user:
Check system journal for crash information:
sudo journalctl -p err -bsudo journalctl -n 100 --no-pagersudo journalctl --since "10 minutes ago" -p warning
sudo journalctl --since "YYYY-MM-DD HH:MM:SS"
sudo journalctl -b | grep -i "<program-name>"
Check kernel logs (dmesg):
dmesg | tail -100dmesg | grep -i "<program-name>"dmesg | grep -i "killed process"
sudo journalctl -k | grep -i "out of memory"
Check for core dumps:
ulimit -ccat /proc/sys/kernel/core_patternfind /var/lib/systemd/coredump -name "*<program-name>*" -mtime -1
find . -name "core*" -mtime -1
coredumpctl list
coredumpctl info <pid>
coredumpctl dump <pid> -o /tmp/core.dump
Check application-specific logs:
~/.local/share/applications/cat ~/.xsession-errors~/.cache/<program-name>/~/.config/<program-name>//var/log/~/.mozilla/, ~/.config/google-chrome/snap logs <snap-name>flatpak logsCheck crash reporter systems:
ls -lt /var/crash/
ubuntu-bug <program-name> # to file bug report
~/.local/share/gnome-shell/~/.local/share/drkonqi/Check resource issues at crash time:
free -hdf -hsudo journalctl | grep -i "out of memory"Check for dependency issues:
ldd $(which <program-name>)
which <program-name>
ls -la $(which <program-name>)
<program-name> --versionCheck for recent system changes:
grep " install \| upgrade " /var/log/dpkg.log | tail -50grep "upgrade" /var/log/apt/history.log | tail -20ls -lt /boot/vmlinuz-*Graphics/display-related crashes: If GUI application:
grep -i "error\|segfault" /var/log/Xorg.0.logjournalctl -b | grep -i "kwin\|wayland"nvidia-smi # for NVIDIA
dmesg | grep -i "gpu\|nvidia\|amdgpu\|radeon"
Check for known issues:
ubuntu-bug --package <package-name>Analyze crash signatures: Look for common crash indicators:
Try to reproduce the crash: If possible, guide user to:
<program-name> 2>&1 | tee /tmp/program-output.log
<program-name> --debug
<program-name> --verbose
Report findings: Summarize:
Provide recommendations: Based on findings, suggest: