public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mitchell Dorrell <mwd@psc.edu>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Cat a binary = system crash?
Date: Thu, 8 May 2025 22:12:31 -0400	[thread overview]
Message-ID: <CAHqckJ0qyRVabD99inyKN8vqVB-jSEA6A4k7Bqd9bHo4G2RpRg@mail.gmail.com> (raw)

This is not a bug report and I'm not really seeking assistance, I'm just
inviting discussion because... this shouldn't be able to happen, right?

Earlier today, I opened a terminal using urxvt, then initiated an SSH
connection to a remote machine. On the remote machine, I ran a command
roughly like this (but as a one-liner):

for d in path1 path2 path3; do
  files=$(find $d -not -type d -exec readlink -f {} \; | sort -u);
  for f in $files; do
    cat $f | tr ' ' '\n' | pipe_through_sed_and_grep_etc;
  done;
done

... which caused grep to mention finding some matches inside binary data
via stdin. After (insufficiently) adding to the pipeline to filter the
output down to just the matching strings, I added '-a' to the grep
commands, hit enter, briefly saw some junk printed to the terminal, and
then my screen went black and I noticed that my power LED was dark.

There are 468 null bytes in /var/log/messages at the crash time.

Neither urxvt, nor bash, nor ssh were running as root, and I'm pretty
sure I had rebooted since my last @world update, so there shouldn't be
any outdated libraries in play.

Userspace applications shouldn't be able to crash the system, right?

I haven't tried to reproduce it yet. I'm in no hurry to deliberately
crash my daily-driver, but since I know the bug report might be
important, I'll try it anyway when I can.

As an aside, this laptop has been having trouble resuming from
hibernation, but that's been a problem for a while now. I doubt it's
related.

Any thoughts?
-MD



Machine details:

uname -rp: 6.14.4-gentoo-dist AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Portage profile: default/linux/amd64/23.0/split-usr/desktop
Global USE flags:
"dist-kernel pulseaudio sqlite vaapi vdpau xinerama -gtk -qt5 -wayland"
VIDEO_CARDS="amdgpu radeonsi radeon" (Why all three? I don't remember.)

Packages of interest:
sys-kernel/gentoo-kernel-6.14.4 USE="-initramfs"
x11-base/xorg-server-21.1.16
x11-drivers/xf86-video-amdgpu-23.0.0
x11-drivers/xf86-video-ati-22.0.0
x11-terms/rxvt-unicode-9.31-r3 USE="24-bit-color"
app-shells/bash-5.2_p37
net-misc/openssh-9.9_p2-r3

NOTE: I apply an extra (maybe no-longer-needed) patch to rxvt-unicode:
"0001-Revert-rxvt-unicode-screen.C-to-rxvt-unicode-9.30-st.patch"
(found here: https://bugs.archlinux.org/task/77062)

Based on Xorg.log, only the amdgpu driver is being loaded, not the ati.

Loaded graphics-related kernel modules:
amdgpu,amdxcp,amdxdna,cec,drm_buddy,drm_client_lib,drm_display_helper,
drm_exec,drm_kms_helper,drm_panel_backlight_quirks,drm_shmem_helper,
drm_suballoc_helper,drm_ttm_helper,gpu_sched,i2c_algo_bit,ttm,video,wmi,
wmi_bmof


             reply	other threads:[~2025-05-09  2:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  2:12 Mitchell Dorrell [this message]
2025-05-09  2:21 ` [gentoo-user] Cat a binary = system crash? Nate Eldredge
2025-05-09  2:57 ` Eli Schwartz
2025-05-09  4:44   ` Mitchell Dorrell
2025-05-14  2:40     ` Mitchell Dorrell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHqckJ0qyRVabD99inyKN8vqVB-jSEA6A4k7Bqd9bHo4G2RpRg@mail.gmail.com \
    --to=mwd@psc.edu \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox