public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Cat a binary = system crash?
@ 2025-05-09  2:12 Mitchell Dorrell
  2025-05-09  2:21 ` Nate Eldredge
  2025-05-09  2:57 ` Eli Schwartz
  0 siblings, 2 replies; 5+ messages in thread
From: Mitchell Dorrell @ 2025-05-09  2:12 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-14  2:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09  2:12 [gentoo-user] Cat a binary = system crash? Mitchell Dorrell
2025-05-09  2:21 ` Nate Eldredge
2025-05-09  2:57 ` Eli Schwartz
2025-05-09  4:44   ` Mitchell Dorrell
2025-05-14  2:40     ` Mitchell Dorrell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox