Subject: 30.0.93; Large /proc/* file are read incompletely

From: Daniel Mendler <[email-masked]>
Date: Wed, 15 Jan 2025 01:21:03 +0100

When opening a large file in /proc/* like /proc/cpuinfo in Emacs via
find-file, the buffer content is incomplete, when comparing the output
to the output produced by /bin/cat. The Eshell command eshell/cat has
the same problem.The proc file system doesn't report file sizes since
the files are dynamically generated. ls -l /proc/cpuinfo reports size 0.
Emacs doesn't handle this well, limiting its reads to 16KiB.

In Eshell:

cat /proc/cpuinfo > #<buffer bug>  ==> truncated buffer (exactly 16KiB)
*cat /proc/cpuinfo > #<buffer bug> ==> complete buffer (larger than 16KiB)

In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.2, Xaw scroll bars) of 2025-01-14
Windowing system distributor 'The X.Org Foundation', version 11.0.12101015
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --with-tree-sitter
 --with-native-compilation --with-x-toolkit=athena --with-dbus
 --without-selinux --without-threads --without-gsettings --without-gpm
 --with-cairo --with-cairo-xcb --disable-gc-mark-trace --with-xinput2'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix